Package: debmirror
Version: 1:2.9
Severity: wishlist
Tags: patch
with the attached patch you can specify a configuration file by
exporting DEBMIRRORCONF.
Stefan
diff --git a/debmirror b/debmirror
index 0c50a2f..a36f4ca 100755
--- a/debmirror
+++ b/debmirror
@@ -493,7 +493,8 @@ excluding the section 'debug' and the package 'foo-doc':
~/.debmirror.conf
Debmirror will look for the presence of these files and load them
- in the indicated order if they exist.
+ in the indicated order if they exist. If you specify a configuration
+ file by exporting DEBMIRRORCONF, these files are not loaded.
See the example in /usr/share/doc/debmirror/examples for syntax.
~/.gnupg/trustedkeys.gpg
@@ -579,8 +580,13 @@ my $HOME;
($HOME = $ENV{'HOME'}) or die "HOME not defined in environment!\n";
# Load in config files
-require "/etc/debmirror.conf" if -r "/etc/debmirror.conf";
-require "$HOME/.debmirror.conf" if -r "$HOME/.debmirror.conf";
+my $conf;
+if ($conf = $ENV{'DEBMIRRORCONF'}) {
+ require "$conf" if -r "$conf" or die "Error reading configuration file $conf";
+} else {
+ require "/etc/debmirror.conf" if -r "/etc/debmirror.conf";
+ require "$HOME/.debmirror.conf" if -r "$HOME/.debmirror.conf";
+}
# This hash contains the releases to mirror. If both codename and suite can be
# determined from the Release file, the codename is used in the key. If not,