This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2d1bdce360c4ec32fb1b478cb011745f4e99c641

commit 2d1bdce360c4ec32fb1b478cb011745f4e99c641
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Sep 11 13:51:02 2025 +0200

    dselect: Add missing Version field parsing to method scripts
    
    The code is using a $version variable to print the package version, but
    it was not parsing it from the Version field.
    
    Changelog: internal
---
 dselect/methods/file/install.sh  | 4 ++++
 dselect/methods/media/install.sh | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/dselect/methods/file/install.sh b/dselect/methods/file/install.sh
index 0633ae454..ab46a841c 100755
--- a/dselect/methods/file/install.sh
+++ b/dselect/methods/file/install.sh
@@ -41,10 +41,14 @@ while true; do
   perl -e '
        ($binaryprefix,$predep) = @ARGV;
        $binaryprefix =~ s,/*$,/, if length($binaryprefix);
+
+        my $version;
+
        open(P, "< $predep") or die "cannot open $predep: $!\n";
        while (<P>) {
                s/\s*\n$//;
                $package = $_ if s/^Package: //i;
+                $version = $_ if s{^Version: }{}i;
                @filename = split(/ /,$_) if s/^Filename: //i;
        }
        die "internal error - no package" if length($package) == 0;
diff --git a/dselect/methods/media/install.sh b/dselect/methods/media/install.sh
index 885a9de24..f8e63b19f 100755
--- a/dselect/methods/media/install.sh
+++ b/dselect/methods/media/install.sh
@@ -82,10 +82,14 @@ while true; do
 
   perl -e '
        ($binaryprefix,$predep,$thisdisk) = @ARGV;
+
+        my $version;
+
        open(P, "< $predep") or die "cannot open $predep: $!\n";
        while (<P>) {
                s/\s*\n$//;
                $package = $_ if s/^Package: //i;
+                $version = $_ if s{^Version: }{}i;
                /^X-Medium:\s+(.*)\s*/ and $medium = $1;
                @filename = split(/ /,$_) if s/^Filename: //i;
        }

-- 
Dpkg.Org's dpkg

Reply via email to