summaryrefslogtreecommitdiffstats
path: root/urpm/ldap.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-31 16:45:07 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-31 16:45:07 +0000
commitcacb329cadd72547cb886b0b785c3cc16e4aa590 (patch)
treeabc17ed2276c9539ab64934eab7ca9ad5d69d6a6 /urpm/ldap.pm
parent7e9b1cb1f471e6c968319904b2e9529cb44e5d21 (diff)
downloadurpmi-cacb329cadd72547cb886b0b785c3cc16e4aa590.tar
urpmi-cacb329cadd72547cb886b0b785c3cc16e4aa590.tar.gz
urpmi-cacb329cadd72547cb886b0b785c3cc16e4aa590.tar.bz2
urpmi-cacb329cadd72547cb886b0b785c3cc16e4aa590.tar.xz
urpmi-cacb329cadd72547cb886b0b785c3cc16e4aa590.zip
split POD documentation
Diffstat (limited to 'urpm/ldap.pm')
-rw-r--r--urpm/ldap.pm71
1 files changed, 44 insertions, 27 deletions
diff --git a/urpm/ldap.pm b/urpm/ldap.pm
index 79ee9100..50c95962 100644
--- a/urpm/ldap.pm
+++ b/urpm/ldap.pm
@@ -34,33 +34,6 @@ Writes the value fetched from ldap, in case of server failure. This should not
be used to reduce the load of the ldap server, as fetching is still needed, and
therefore, caching is useless if server is up.
-=item check_ldap_medium($medium)
-
-Checks if the ldap medium has all required attributes.
-
-=item read_ldap_cache($urpm)
-
-Reads the cache created by the C<write_ldap_cache> function. Should be called
-if the ldap server doesn't answer (upgrade, network problem, mobile user, etc.)
-
-=item clean_ldap_cache($urpm)
-
-Cleans the ldap cache, removes all files in the directory.
-
-=item load_ldap_media($urpm)
-
-Loads urpmi media configuration from ldap.
-
-=item get_ldap_config()
-
-=item get_ldap_config_file($file)
-
-=item get_ldap_config_dns()
-
-Not implemented yet.
-
-=back
-
=cut
sub write_ldap_cache($$) {
@@ -80,6 +53,13 @@ sub write_ldap_cache($$) {
return 1;
}
+
+=item check_ldap_medium($medium)
+
+Checks if the ldap medium has all required attributes.
+
+=cut
+
sub check_ldap_medium($) {
my ($medium) = @_;
return $medium->{name} && $medium->{url};
@@ -97,6 +77,13 @@ sub get_vars_from_sh {
%l;
}
+=item read_ldap_cache($urpm)
+
+Reads the cache created by the C<write_ldap_cache> function. Should be called
+if the ldap server doesn't answer (upgrade, network problem, mobile user, etc.)
+
+=cut
+
sub read_ldap_cache {
my ($urpm) = @_;
foreach (glob("$urpm->{cachedir}/ldap/*")) {
@@ -107,16 +94,31 @@ sub read_ldap_cache {
}
}
+=item clean_ldap_cache($urpm)
+
+Cleans the ldap cache, removes all files in the directory.
+
+=cut
+
#- clean the cache, before writing a new one
sub clean_ldap_cache($) {
my ($urpm) = @_;
unlink glob("$urpm->{cachedir}/ldap/*");
}
+
+=item get_ldap_config()
+
+=cut
+
sub get_ldap_config() {
return get_ldap_config_file($LDAP_CONFIG_FILE);
}
+=item get_ldap_config_file($file)
+
+=cut
+
sub get_ldap_config_file {
my ($file) = @_;
my %config;
@@ -132,6 +134,13 @@ sub get_ldap_config_file {
return %config && \%config;
}
+
+=item get_ldap_config_dns()
+
+Not implemented yet.
+
+=cut
+
sub get_ldap_config_dns() {
# TODO
die "not implemented yet\n";
@@ -145,6 +154,12 @@ my %ldap_changed_attributes = (
'media-info-dir' => 'media_info_dir',
);
+=item load_ldap_media($urpm)
+
+Loads urpmi media configuration from ldap.
+
+=cut
+
sub load_ldap_media {
my ($urpm) = @_;
@@ -220,6 +235,8 @@ sub load_ldap_media {
__END__
+=back
+
=head1 COPYRIGHT
Copyright (C) 2005 MandrakeSoft SA