From 693e214b84e219c5ad88065d538ad764f50e485d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 28 Jun 2005 06:36:18 +0000 Subject: Add LDAP media at the end --- urpm/ldap.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/urpm/ldap.pm b/urpm/ldap.pm index 792699d2..2188ef4f 100644 --- a/urpm/ldap.pm +++ b/urpm/ldap.pm @@ -147,6 +147,7 @@ sub load_ldap_media($%) { $config->{host} . ($config->{port} ? ":" . $config->{port} : "") . "/"; } + my $priority = 100; #- too add ldap media at the end eval { my $ldap = Net::LDAP->new($config->{uri}) or die N("Cannot connect to ldap uri :"), $config->{uri}; @@ -183,6 +184,7 @@ sub load_ldap_media($%) { #- TODO check if name already defined ? $medium->{name} = "ldap_" . $medium->{name}; $medium->{ldap} = 1; + $medium->{priority} = $priority++; next if !check_ldap_medium($medium); $urpm->probe_medium($medium, %options) and push @{$urpm->{media}}, $medium; write_ldap_cache($urpm,$medium) or $urpm->{log}(N("Could not write ldap cache : %s", $_)); -- cgit v1.2.1