There was a small mistake in my previous patch.  Lines should be split in
3 columns, not 4.  This broke multi-word values in third column.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
--- /usr/bin/dpkg-scanpackages	2009-02-02 23:13:22.000000000 +0100
+++ dpkg-scanpackages	2009-07-21 23:37:49.000000000 +0200
@@ -27,7 +27,7 @@
                    Architecture Subarchitecture Essential Origin Bugs
                    Maintainer Installed-Size Installer-Menu-Item),
                 @pkg_dep_fields, qw(Filename Size MD5sum Section Priority
-                   Homepage Description Tag));
+                   Homepage Description Tag Task));
 
 # This maps the fields into the proper case
 my %field_case;
@@ -41,11 +41,12 @@
 	       udeb            => 0,
 	       arch            => undef,
 	       multiversion    => 0,
+	       extraoverride   => undef,
 	      );
 
 my $result = GetOptions(\%options,
                         'help|h|?', 'version', 'type|t=s', 'udeb|u!',
-                        'arch|a=s', 'multiversion|m!');
+                        'arch|a=s', 'multiversion|m!', 'extraoverride|e=s');
 
 sub version {
     printf _g("Debian %s version %s.\n"), $progname, $version;
@@ -61,6 +62,7 @@
   -u, --udeb               scan for udebs (obsolete alias for -tudeb).
   -a, --arch <arch>        architecture to scan for.
   -m, --multiversion       allow multiple versions of a single package.
+  -e, --extraoverride <file> extra override file
   -h, --help               show this help message.
       --version            show the version.
 "), $progname;
@@ -109,6 +111,29 @@
     close($override_fh);
 }
 
+sub load_override_extra
+{
+    my $override_fh = new IO::File $options{extraoverride}, 'r' or
+        syserr(_g("Couldn't open override file %s"), $options{extraoverride});
+
+    while (<$override_fh>) {
+	s/\#.*//;
+	s/\s+$//;
+	next unless $_;
+
+	my ($p, $field, $value) = split(/\s+/, $_, 3);
+
+	next unless defined($packages{$p});
+
+	for my $package (@{$packages{$p}}) {
+	    $$package{$field} = $value;
+	}
+	$overridden{$p} = 1;
+    }
+
+    close($override_fh);
+}
+
 usage() and exit 1 if not $result;
 
 if (not @ARGV >= 1 && @ARGV <= 3) {
@@ -244,6 +269,7 @@
 }
 
 load_override($override) if defined $override;
+load_override_extra($options{extraoverride}) if defined $options{extraoverride};
 
 my @missingover=();
 

Reply via email to