+Mon Oct 27 09:49:29 CST 2003 Adam Heath <doogie@debian.org>
+
+ * scripts/dpkg-scanpackages.pl: Add -u -a<arch> commands.
+
Mon Oct 27 09:42:57 CST 2003 Adam Heath <doogie@debian.org>
* scripts/dpkg-checkbuilddeps.pl: Set $reduce_arch when calling parsedep.
* Branden Robinson <branden@debian.org>:
s/dpkg-checkbuild/dpkg-checkbuilddeps/ in usage.
* dpkg-checkbuilddeps now sets $reduce_arch. Closes: #212796.
+ * Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>:
+ Add -u in dpkg-scanpackages. Closes: #214123.
+ Add -a<arch> command to dpkg-scanpackages.
-- Wichert Akkerman <wakkerma@debian.org> UNRELEASED
.
.SH SYNOPSIS
.B dpkg-scanpackages
+.RI [ -u ]
+.RI [ -a<arch> ]
.I binarydir
.I overridefile
.RI [ pathprefix ]
.PP
.I pathprefix
is an optional string to be prepended to the Filename fields.
+.PP
+If
+.I -u
+is specified, then scan for *.udeb, instead of *.deb.
+.PP
+When -a\fI<arch>\fP is specified, then instead of scanning for all debs,
+a pattern consisting of *_all.deb and *_arch.deb is used.
.
.SH THE OVERRIDE FILE
While most information about a package can be found in the control file,
$written=0;
$i=100; grep($pri{$_}=$i--,@fieldpri);
+$udeb = 0;
+$arch = '';
+while ($ARGV[1] =~ m/^-.*/) {
+ my $opt = shift @ARGV;
+ if ($opt eq '-u') {
+ $udeb = 1;
+ } elsif ($opt =~ m/-a(.*)/) {
+ if ($1) {
+ $arch = $1;
+ } else {
+ $arch = shift @ARGV;
+ }
+ } else {
+ print STDERR "Unknown option($opt)!\n";
+ exit(1);
+ }
+}
+$ext = $udeb ? 'udeb' : 'deb';
+$pattern = $arch ? "-name '*_all.$ext' -o -name '*_$arch.$ext'" : "-name '*.$ext'";
+if ($ARGV[1] eq '-u') {
+ $udeb = 1;
+ shift @ARGV;
+}
+
$#ARGV == 1 || $#ARGV == 2
- or die "Usage: dpkg-scanpackages binarypath overridefile [pathprefix] > Packages\n";
+ or die "Usage: dpkg-scanpackages [-u] [-a<arch>] binarypath overridefile [pathprefix] > Packages\n";
($binarydir, $override, $pathprefix) = @ARGV;
-d $binarydir or die "Binary dir $binarydir not found\n";
-e $override or die "Override file $override not found\n";
}
# The extra slash causes symlinks to be followed.
-open(F,"find $binarydir/ -follow -name '*.deb' -print |")
+open(F,"find $binarydir/ -follow $pattern -print |")
or die "Couldn't open pipe to find: $!\n";
while (<F>) {
chomp($fn=$_);