The following commit has been merged in the master branch:
commit 5ed64b297e3f9ce9490372abc9b269126e2bd0a4
Author: Raphaël Hertzog <[email protected]>
Date:   Thu Oct 1 22:40:39 2009 +0200

    dpkg-scanpackages: add new --medium option
    
    This feature is supported in the dpkg-scanpackages implementation provided
    by dpkg-multicd. Unfortunately it was using the "-m" option which got
    granted to --multiversion in the official dpkg-scanpackages.
    
    This option will only be useful for people wishing to create Packages.cd
    files for use by the multicd dselect access method. Closes: #402527

diff --git a/debian/changelog b/debian/changelog
index 1dd9f08..e37975a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,9 @@ dpkg (1.15.5) UNRELEASED; urgency=low
     to a new vendor hook post-process-changelog-entry. Closes: #536066
   * Integrate dpkg-ftp into dselect. Add the required Replaces and Conflicts.
   * dpkg-scanpackages/dpkg-scansources now supports compressed override files.
+  * dpkg-scanpackages now supports a new --medium option as needed to
+    generate Packages.cd file for consumption by the multicd dselect access
+    method. Closes: #402527
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).
diff --git a/man/dpkg-scanpackages.1 b/man/dpkg-scanpackages.1
index 2584dcd..c01fb42 100644
--- a/man/dpkg-scanpackages.1
+++ b/man/dpkg-scanpackages.1
@@ -91,6 +91,11 @@ scanning for all debs,
 .BR \-m ", " \-\-multiversion
 Include all found packages in the output.
 .TP
+.BR \-M ", " \-\-medium " \fIid\-string\fP"
+Add an X-Medium field containing the value \fIid\-string\fP. This field
+is required if you want to generate \fBPackages.cd\fP files for use
+by the multicd access method of dselect.
+.TP
 .BR \-h ", " \-\-help
 Show the usage message and exit.
 .TP
diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl
index 40bca97..6d06f51 100755
--- a/scripts/dpkg-scanpackages.pl
+++ b/scripts/dpkg-scanpackages.pl
@@ -32,11 +32,13 @@ my %options = (help            => sub { usage(); exit 0; },
               arch            => undef,
               multiversion    => 0,
               'extra-override'=> undef,
+               medium          => undef,
              );
 
 my $result = GetOptions(\%options,
                         'help|h|?', 'version', 'type|t=s', 'udeb|u!',
-                        'arch|a=s', 'multiversion|m!', 'extra-override|e=s');
+                        'arch|a=s', 'multiversion|m!', 'extra-override|e=s',
+                        'medium|M=s');
 
 sub version {
     printf _g("Debian %s version %s.\n"), $progname, $version;
@@ -54,6 +56,7 @@ Options:
   -m, --multiversion       allow multiple versions of a single package.
   -e, --extra-override <file>
                            use extra override file.
+  -M, --medium <medium>    add X-Medium field for dselect multicd access method
   -h, --help               show this help message.
       --version            show the version.
 "), $progname;
@@ -238,6 +241,7 @@ FILE:
             }
         }
        $fields->{'Size'} = $size;
+        $fields->{'X-Medium'} = $options{medium} if defined $options{medium};
        
        push @{$packages{$p}}, $fields;
     }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to