summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-03 13:25:30 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-03 13:25:30 +0000
commitb3882cb0b3bb23a164995070212d3bcb8888fe8b (patch)
tree27499dda928bc8aa547df76ec3a26920cd014255
parent4c739cb2352af8f2102464714b4563ce2c53912f (diff)
downloadurpmi-b3882cb0b3bb23a164995070212d3bcb8888fe8b.tar
urpmi-b3882cb0b3bb23a164995070212d3bcb8888fe8b.tar.gz
urpmi-b3882cb0b3bb23a164995070212d3bcb8888fe8b.tar.bz2
urpmi-b3882cb0b3bb23a164995070212d3bcb8888fe8b.tar.xz
urpmi-b3882cb0b3bb23a164995070212d3bcb8888fe8b.zip
Don't use functions from MDK::Common
-rw-r--r--urpm/ldap.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/urpm/ldap.pm b/urpm/ldap.pm
index 2188ef4f..79710654 100644
--- a/urpm/ldap.pm
+++ b/urpm/ldap.pm
@@ -1,12 +1,12 @@
package urpm::ldap;
+# $Id$
+
use strict;
use warnings;
use urpm;
use urpm::msg 'N';
-
use Net::LDAP;
-use MDK::Common;
our $LDAP_CONFIG_FILE = '/etc/ldap.conf';
my @per_media_opt = (@urpm::PER_MEDIA_OPT, qw(ftp-proxy http-proxy));
@@ -60,7 +60,8 @@ sub write_ldap_cache($$) {
my ($urpm, $medium) = @_;
my $ldap_cache = "$urpm->{cachedir}/ldap";
# FIXME what perm for cache ?
- mkdir_p($ldap_cache);
+ -d $ldap_cache or mkdir $ldap_cache
+ or die N("Cannot create ldap cache directory");
open my $cache, ">", "$ldap_cache/$medium->{name}"
or die N("Cannot write cache file for ldap\n");
print $cache "# internal cache file for disconnect ldap operation, do not edit\n";
@@ -69,6 +70,7 @@ sub write_ldap_cache($$) {
print $cache "$_ = $medium->{$_}\n";
}
close $cache;
+ return 1;
}
sub check_ldap_medium($) {