diff options
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/BuildFlags.pm | 3 | ||||
-rw-r--r-- | scripts/Dpkg/Control.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Control/Types.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Vendor.pm | 11 |
4 files changed, 10 insertions, 8 deletions
diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm index 689926e71..6fe65781c 100644 --- a/scripts/Dpkg/BuildFlags.pm +++ b/scripts/Dpkg/BuildFlags.pm @@ -20,6 +20,7 @@ use warnings; our $VERSION = '1.03'; +use Dpkg qw(); use Dpkg::Gettext; use Dpkg::BuildEnv; use Dpkg::BuildOptions; @@ -106,7 +107,7 @@ Update flags from the system configuration. sub load_system_config { my ($self) = @_; - $self->update_from_conffile('/etc/dpkg/buildflags.conf', 'system'); + $self->update_from_conffile("$Dpkg::CONFDIR/buildflags.conf", 'system'); } =item $bf->load_user_config() diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm index 31149116a..a77914b1f 100644 --- a/scripts/Dpkg/Control.pm +++ b/scripts/Dpkg/Control.pm @@ -89,7 +89,7 @@ Corresponds to a .changes file. =item CTRL_FILE_VENDOR -Corresponds to a vendor file in /etc/dpkg/origins/. +Corresponds to a vendor file in $Dpkg::CONFDIR/origins/. =item CTRL_FILE_STATUS diff --git a/scripts/Dpkg/Control/Types.pm b/scripts/Dpkg/Control/Types.pm index f743f1dd0..7a2ec63be 100644 --- a/scripts/Dpkg/Control/Types.pm +++ b/scripts/Dpkg/Control/Types.pm @@ -46,7 +46,7 @@ use constant { CTRL_PKG_SRC => 16, # .dsc file of source package CTRL_PKG_DEB => 32, # DEBIAN/control in binary packages CTRL_FILE_CHANGES => 64, # .changes file - CTRL_FILE_VENDOR => 128, # File in /etc/dpkg/origins + CTRL_FILE_VENDOR => 128, # File in $Dpkg::CONFDIR/origins CTRL_FILE_STATUS => 256, # /var/lib/dpkg/status CTRL_CHANGELOG => 512, # Output of dpkg-parsechangelog }; diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm index 2b7c5a41a..bccbcb60a 100644 --- a/scripts/Dpkg/Vendor.pm +++ b/scripts/Dpkg/Vendor.pm @@ -20,6 +20,7 @@ use warnings; our $VERSION = '1.01'; +use Dpkg qw(); use Dpkg::ErrorHandling; use Dpkg::Gettext; use Dpkg::BuildEnv; @@ -29,7 +30,7 @@ use base qw(Exporter); our @EXPORT_OK = qw(get_vendor_info get_current_vendor get_vendor_file get_vendor_dir get_vendor_object run_vendor_hook); -my $origins = '/etc/dpkg/origins'; +my $origins = "$Dpkg::CONFDIR/origins"; $origins = $ENV{DPKG_ORIGINS_DIR} if $ENV{DPKG_ORIGINS_DIR}; =encoding utf8 @@ -40,7 +41,7 @@ Dpkg::Vendor - get access to some vendor specific information =head1 DESCRIPTION -The files in /etc/dpkg/origins/ can provide information about various +The files in $Dpkg::CONFDIR/origins/ can provide information about various vendors who are providing Debian packages. Currently those files look like this: @@ -73,8 +74,8 @@ sub get_vendor_dir { =item $fields = Dpkg::Vendor::get_vendor_info($name) Returns a Dpkg::Control object with the information parsed from the -corresponding vendor file in /etc/dpkg/origins/. If $name is omitted, -it will use /etc/dpkg/origins/default which is supposed to be a symlink +corresponding vendor file in $Dpkg::CONFDIR/origins/. If $name is omitted, +it will use $Dpkg::CONFDIR/origins/default which is supposed to be a symlink to the vendor of the currently installed operating system. Returns undef if there's no file for the given vendor. @@ -112,7 +113,7 @@ sub get_vendor_file(;$) { =item $name = Dpkg::Vendor::get_current_vendor() Returns the name of the current vendor. If DEB_VENDOR is set, it uses -that first, otherwise it falls back to parsing /etc/dpkg/origins/default. +that first, otherwise it falls back to parsing $Dpkg::CONFDIR/origins/default. If that file doesn't exist, it returns undef. =cut |