From b3882cb0b3bb23a164995070212d3bcb8888fe8b Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 3 Nov 2005 13:25:30 +0000 Subject: Don't use functions from MDK::Common --- urpm/ldap.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'urpm/ldap.pm') 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($) { -- cgit v1.2.1