summaryrefslogtreecommitdiffstats
path: root/urpm/cfg.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-04-19 17:10:12 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-04-19 17:10:12 +0000
commit22d3107b3224f91c04e8825ba8bc812dba63a7ef (patch)
treeee8f28bf683e7634a039909a7503cd3e7e53967f /urpm/cfg.pm
parent7f79f78d1a0af648a116cd1e39a073e051502b9c (diff)
downloadurpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.gz
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.bz2
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.xz
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.zip
Some more cleanup and refactorization.
Diffstat (limited to 'urpm/cfg.pm')
-rw-r--r--urpm/cfg.pm41
1 files changed, 41 insertions, 0 deletions
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
new file mode 100644
index 00000000..aa485b53
--- /dev/null
+++ b/urpm/cfg.pm
@@ -0,0 +1,41 @@
+package urpm::cfg;
+
+use strict;
+use warnings;
+
+=head1 NAME
+
+urpm::cfg - routines to handle the urpmi configuration files
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=over
+
+=cut
+
+# Standard paths of the config files
+our $PROXY_CFG = "/etc/urpmi/proxy.cfg";
+
+=item set_environment($env_path)
+
+Modifies the paths of the config files, so they will be searched
+in the $env_path directory. This is obviously to be called early.
+
+=cut
+
+sub set_environment {
+ my ($env) = @_;
+ for ($PROXY_CFG) {
+ $env =~ s,^/etc/urpmi,$env,;
+ }
+}
+
+1;
+
+__END__
+
+=back
+
+=cut