+2007-02-28 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-checkbuilddeps.pl: Make getopt parse '--admindir'.
+ ($admindir): New variable.
+ (usage): Document '--admindir'.
+ (parse_status): The status argument is not optional anymore.
+ * scripts/dpkg-shlibdeps.pl: Parse '--admindir'.
+ ($admindir): New variable.
+ ($shlibsppdir): Initialize it after parsing the arguments.
+ (usage): Document '--admindir'.
+ * scripts/dpkg-buildpackage.sh: Parse '--admindir', and document it in
+ usage output. Pass it to dpkg-checkbuilddeps.
+
2007-02-28 Guillem Jover <guillem@debian.org>
* scripts/update-alternatives.pl (usage): Use '$altdir' instead of
* Fix regular expression special-casing Origin, Bugs and Maintainer fields
which was making X[SBC]- fields containing such strings to propagate into
the .deb control file unprocessed. Thanks to Colin Watson.
+ * Add support for '--admindir' in dpkg-buildpackage, dpkg-checkbuilddeps
+ and dpkg-shlibdeps. Closes: #162348
[ Updated dpkg translations ]
* Romanian (Eddy Petrișor).
+2007-02-28 Guillem Jover <guillem@debian.org>
+
+ * dpkg-source.1: Document new option '--admindir'.
+ * dpkg-checkbuilddeps.1: Likewise.
+
2007-01-24 Frank Lichtenheld <djpig@debian.org>
* 822-date.1: 822-date is now deprecated. Document this fact in
-.TH dpkg\-checkbuilddeps 1 "2006-05-23" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "2007-02-28" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-checkbuilddeps - check build dependencies and conflicts
.
.SH SYNOPSIS
-\fBdpkg\-checkbuilddeps\fR \fB\-B\fR [\fIcontrol-file\fR]
+\fBdpkg\-checkbuilddeps\fR [\fIoptions\fR] [\fIcontrol-file\fR]
.
.SH DESCRIPTION
This program checks the installed packages in the system against the build
.
.SH OPTIONS
.TP
+\fB\-\-admindir=\fIdir\fP
+Change the location of the \fBdpkg\fR database. The default location is
+\fI/var/lib/dpkg\fP.
+.TP
.B \-B
Ignore \fIBuild\-Depends\-Indep\fR lines. Use when no arch-indep packages will
be built.
.\" Authors: Ian Jackson
-.TH dpkg\-source 1 "2006-05-23" "Debian Project" "dpkg utilities"
+.TH dpkg\-source 1 "2007-02-28" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges,
dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
information.
This option is understood by all the source package tools.
.TP
+.BI \-\-admindir= dir
+In
+.BR dpkg\-buildpackage " and " dpkg\-shlibdeps
+change the location of the \fBdpkg\fR database. The default location is
+\fI/var/lib/dpkg\fP.
+.TP
.BI \-v version
In
.BR dpkg\-buildpackage ", " dpkg\-genchanges " and " dpkg\-parsechangelog
-E when -W is turned on, -E turned it off. } dpkg-source
-i[<regex>] ignore diffs of files matching regex. } only passed
-I<filename> filter out files when building tarballs. } to dpkg-source
+ --admindir=<directory>
+ change the administrative directory.
-h, --help show this help message.
--version show the version.
END
usepause=false
warnable_error=0
passopts=''
+admindir=''
while [ $# != 0 ]
do
- value="`echo x\"$1\" | sed -e 's/^x-.//'`"
+ value="`echo x\"$1\" | sed -e 's/x--.*=//;s/^x-.//'`"
case "$1" in
-h|--help)
usage; exit 0 ;;
--version)
showversion; exit 0 ;;
+ --admindir=*)
+ admindir="$value" ;;
-r*) rootcommand="$value" ;;
-p*) signcommand="$value" ;;
-k*) signkey="$value" ;;
}
if [ "$checkbuilddep" = "true" ]; then
+ if [ -n "$admindir" ]; then
+ checkbuilddep_args="$checkbuilddep_args --admindir=$admindir"
+ fi
+
if ! dpkg-checkbuilddeps $checkbuilddep_args; then
echo >&2 "$progname: Build dependencies/conflicts unsatisfied; aborting."
echo >&2 "$progname: (Use -d flag to override.)"
use Getopt::Long;
my $dpkglibdir="/usr/lib/dpkg";
+my $admindir = "/var/lib/dpkg";
push(@INC,$dpkglibdir);
#my $controlfile;
require 'controllib.pl';
Options:
control-file control file to process (default: debian/control).
-B binary-only, ignore -Indep.
+ --admindir=<directory>
+ change the administrative directory.
-h show this help message.
"), $progname;
}
my $binary_only=0;
my $want_help=0;
if (! GetOptions('-B' => \$binary_only,
- '-h' => \$want_help)) {
+ '-h' => \$want_help,
+ '--admindir=s' => \$admindir)) {
usage();
exit(2);
}
parsecontrolfile($controlfile);
-my @status=parse_status();
+my @status = parse_status("$admindir/status");
my (@unmet, @conflicts);
local $/='';
# thanks to Matt Zimmerman. Returns two hash references that
# are exactly what the other functions need...
sub parse_status {
- my $status=shift || "/var/lib/dpkg/status";
+ my $status = shift;
my %providers;
my %version;
# $Id$
my $dpkglibdir="/usr/lib/dpkg";
+my $admindir = "/var/lib/dpkg";
my $version="1.4.1.19"; # This line modified by Makefile
use English;
my $shlibsoverride= '/etc/dpkg/shlibs.override';
my $shlibsdefault= '/etc/dpkg/shlibs.default';
my $shlibslocal= 'debian/shlibs.local';
-my $shlibsppdir= '/var/lib/dpkg/info';
+my $shlibsppdir;
my $shlibsppext= '.shlibs';
my $varnameprefix= 'shlibs';
my $dependencyfield= 'Depends';
-L<localshlibsfile> shlibs override file, not debian/shlibs.local.
-T<varlistfile> update variables here, not debian/substvars.
-t<type> set package type (default is deb).
+ --admindir=<directory> change the administrative directory.
-h, --help show this help message.
--version show the version.
usage; exit(0);
} elsif (m/^--version$/) {
version; exit(0);
+ } elsif (m/^--admindir=/) {
+ $admindir = $POSTMATCH;
+ -d $admindir ||
+ error(sprintf(_g("administrative directory '%s' does not exist"),
+ $admindir));
} elsif (m/^-d/) {
$dependencyfield= capit($POSTMATCH);
defined($depstrength{$dependencyfield}) ||
}
}
+$shlibsppdir = "$admindir/info";
+
@exec || usageerr(_g("need at least one executable"));
sub isbin {