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=4610332047d2609fc26146024227f4a51de9d8f5

commit 4610332047d2609fc26146024227f4a51de9d8f5 (HEAD -> main)
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Sep 12 02:36:10 2025 +0200

    Remove support for MSDOS-Filename field
    
    This is a relic from the past, where distributions had to possibly
    support installation from MS-DOS systems, or transport binary packages
    in FAT formatted media.
    
    This has not been the case for a very long time. And front-ends like
    apt do not even support handling MSDOS-Filename in repositories, and
    VFAT support is wide-spread nowadays.
---
 dselect/methods/file/install.sh  | 10 +---------
 dselect/methods/media/install.sh | 10 +---------
 lib/dpkg/dpkg-db.h               |  1 -
 lib/dpkg/fields.c                |  4 +++-
 lib/dpkg/parse.c                 |  1 -
 man/dpkg-query.pod               |  2 --
 src/main/unpack.c                |  1 -
 7 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/dselect/methods/file/install.sh b/dselect/methods/file/install.sh
index f5e3dae3c..6d1c57efd 100755
--- a/dselect/methods/file/install.sh
+++ b/dselect/methods/file/install.sh
@@ -46,13 +46,9 @@ while true; do
                s/\s*\n$//;
                $package = $_ if s/^Package: //i;
                @filename = split(/ /,$_) if s/^Filename: //i;
-               @msdosfilename = split(/ /,$_) if s/^MSDOS-Filename: //i;
        }
        die "internal error - no package" if length($package) == 0;
        die "internal error - no filename" if not @filename;
-       die "internal error - mismatch >@filename< >@msdosfilename<"
-               if @filename && @msdosfilename &&
-                  @filename != @msdosfilename;
        @invoke = (); $| = 1;
        for ($i = 0; $i <= $#filename; $i++) {
                $ppart = $i+1;
@@ -60,12 +56,8 @@ while true; do
                if (-f "$binaryprefix$filename[$i]") {
                        $print = $filename[$i];
                        $invoke = "$binaryprefix$filename[$i]";
-               } elsif (-f "$binaryprefix$msdosfilename[$i]") {
-                       $print = $msdosfilename[$i];
-                       $invoke = "$binaryprefix$msdosfilename[$i]";
                } else {
                        $base = $filename[$i]; $base =~ s,.*/,,;
-                       $msdosbase = $msdosfilename[$i]; $msdosbase =~ s,.*/,,;
                        $c = open(X, "-|"));
                        if (not defined $c) {
                                die "failed to fork for find: $!\n";
@@ -74,7 +66,7 @@ while true; do
                                exec("find", "-L",
                                     length($binaryprefix) ?
                                     $binaryprefix : ".",
-                                    "-name",$base,"-o","-name",$msdosbase);
+                                    "-name", $base);
                                die "failed to exec find: $!\n";
                        }
                        while (chop($invoke = <X>)) { last if -f $invoke; }
diff --git a/dselect/methods/media/install.sh b/dselect/methods/media/install.sh
index 91e717df8..190f59ad7 100755
--- a/dselect/methods/media/install.sh
+++ b/dselect/methods/media/install.sh
@@ -88,13 +88,9 @@ while true; do
                $package = $_ if s/^Package: //i;
                /^X-Medium:\s+(.*)\s*/ and $medium = $1;
                @filename = split(/ /,$_) if s/^Filename: //i;
-               @msdosfilename = split(/ /,$_) if s/^MSDOS-Filename: //i;
        }
        die "internal error - no package" if length($package) == 0;
        die "internal error - no filename" if not @filename;
-       die "internal error - mismatch >@filename< >@msdosfilename<"
-               if @filename && @msdosfilename &&
-                  @filename != @msdosfilename;
        if ($medium && ($medium ne $thisdisk)) {
                print "
 
@@ -114,12 +110,8 @@ Please change the discs and press <RETURN>.
                if (-f "$binaryprefix$filename[$i]") {
                        $print = $filename[$i];
                        $invoke = "$binaryprefix$filename[$i]";
-               } elsif (-f "$binaryprefix$msdosfilename[$i]") {
-                       $print = $msdosfilename[$i];
-                       $invoke = "$binaryprefix$msdosfilename[$i]";
                } else {
                        $base = $filename[$i]; $base =~ s,.*/,,;
-                       $msdosbase = $msdosfilename[$i]; $msdosbase =~ s,.*/,,;
                        $c = open(X, "-|"));
                        if (not defined $c) {
                                die "failed to fork for find: $!\n";
@@ -127,7 +119,7 @@ Please change the discs and press <RETURN>.
                        if (!$c) {
                                exec("find", "-L",
                                     length($binaryprefix) ? $binaryprefix : 
".",
-                                    "-name",$base,"-o","-name",$msdosbase);
+                                    "-name", $base);
                                die "failed to exec find: $!\n";
                        }
                        while (chop($invoke = <X>)) { last if -f $invoke; }
diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h
index 2d9b25655..ce7a96812 100644
--- a/lib/dpkg/dpkg-db.h
+++ b/lib/dpkg/dpkg-db.h
@@ -96,7 +96,6 @@ struct conffile {
 struct archivedetails {
   struct archivedetails *next;
   const char *name;
-  const char *msdosname;
   const char *size;
   const char *md5sum;
 };
diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index efcfb26c6..0b09001e6 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -142,7 +142,9 @@ f_archives(struct pkginfo *pkg, struct pkgbin *pkgbin,
                       "(compared to others)"), fip->name);
       fdp = nfmalloc(sizeof(*fdp));
       fdp->next= NULL;
-      fdp->name= fdp->msdosname= fdp->size= fdp->md5sum= NULL;
+      fdp->name = NULL;
+      fdp->size = NULL;
+      fdp->md5sum = NULL;
       *fdpp= fdp;
     }
     STRUCTFIELD(fdp, fip->integer, const char *) = cpos;
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 718dc1b6e..cdfa30ad9 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -80,7 +80,6 @@ const struct fieldinfo fieldinfos[]= {
   { FIELD("Filename"),         f_archives,        w_archives,       
ARCHIVEFOFF(name)        },
   { FIELD("Size"),             f_archives,        w_archives,       
ARCHIVEFOFF(size)        },
   { FIELD("MD5sum"),           f_archives,        w_archives,       
ARCHIVEFOFF(md5sum)      },
-  { FIELD("MSDOS-Filename"),   f_archives,        w_archives,       
ARCHIVEFOFF(msdosname)   },
   { FIELD("Description"),      f_charfield,       w_charfield,      
PKGIFPOFF(description)   },
   { FIELD("Triggers-Pending"), f_trigpend,        w_trigpend                   
              },
   { FIELD("Triggers-Awaited"), f_trigaw,          w_trigaw                     
              },
diff --git a/man/dpkg-query.pod b/man/dpkg-query.pod
index 69239fca2..fe0dfcac6 100644
--- a/man/dpkg-query.pod
+++ b/man/dpkg-query.pod
@@ -352,8 +352,6 @@ fields or fields stored in the binary package end up in it):
 
 =item B<MD5sum> (internal, front-end related)
 
-=item B<MSDOS-Filename> (internal, front-end related)
-
 =item B<Maintainer>
 
 =item B<Origin>
diff --git a/src/main/unpack.c b/src/main/unpack.c
index 107d5661e..335af8be2 100644
--- a/src/main/unpack.c
+++ b/src/main/unpack.c
@@ -1279,7 +1279,6 @@ void process_archive(const char *filename) {
     pkg->archives = nfmalloc(sizeof(*pkg->archives));
     pkg->archives->next = NULL;
     pkg->archives->name = NULL;
-    pkg->archives->msdosname = NULL;
     pkg->archives->md5sum = NULL;
   }
   /* Always nfmalloc. Otherwise, we may overwrite some other field (like

-- 
Dpkg.Org's dpkg

Reply via email to