home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   linux.debian.bugs.dist      Ohh some weird Debian bug report thing      28,835 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 28,140 of 28,835   
   Guillem Jover to Gioele Barabucci   
   Bug#1128325: dpkg-scanpackages --arch=am   
   19 Feb 26 03:50:01   
   
   XPost: linux.debian.maint.dpkg   
   From: guillem@debian.org   
      
   Hi!   
      
   On Wed, 2026-02-18 at 11:35:48 +0100, Gioele Barabucci wrote:   
   > Package: dpkg-dev   
   > Version: 1.23.5   
   > Severity: wishlist   
      
   > Running `dpkg-scanpackages --arch=amd64 dir/` generates a Packages   
   > file that includes both arch-amd64 and arch-all packages.   
   >   
   > (This made sense previously because Debian and other derivatives did   
   > not have a `main/binary-all` binary path, just `main/binary-$arch`.   
   > And it probably still makes sense until bugs like #915948 [1] are   
   > fully resolved.)   
      
   > [1]    
      
   I think for local repos it still makes sense, independently from how   
   Debian and derivatives organizes its repositories.   
      
   > However it would be nice to have a way to exclude arch-all packages   
   > while generating Packages files.   
      
   But I agree it would be nice to have the option to generate split   
   repos.   
      
   > Could `--arch=foo` be modified to mean "strictly foo, without all"?   
   > Alternatively could a new option like `--arch-strict=foo` be   
   > introduced, if you believe that the old behavior should not change?   
      
   I don't think changing the semantics for --arch would be correct, as   
   this is how it has been documented, and how people have relied on this   
   option working. Instead I've added a new --no-implicit-arch option,   
   which removes the implicit addition of the arch-all packages, so then   
   you can run twice with --arch=foo and then --arch=all for example.   
      
   (Attached the current change which I've queued for my next push   
   targeting the next dpkg release.)   
      
   Thanks,   
   Guillem   
      
   From cffafc7f9e4b9d557610e91fcc2691879925990b Mon Sep 17 00:00:00 2001   
   From: Guillem Jover    
   Date: Thu, 19 Feb 2026 03:41:09 +0100   
   Subject: [PATCH] dpkg-scanpackages: Add new --no-implicit-arch option   
   MIME-Version: 1.0   
   Content-Type: text/plain; charset=UTF-8   
   Content-Transfer-Encoding: 8bit   
      
   This option makes --arch not include the implicit =C2=ABall=C2=BB architect=   
   ure   
   when scanning for binary packages, so that callers can generate   
   separate architecture specific and architecture independent Packages   
   files.   
      
   Closes: #1128325   
   ---   
    man/dpkg-scanpackages.pod    | 12 ++++++++++--   
    scripts/dpkg-scanpackages.pl |  9 ++++++++-   
    2 files changed, 18 insertions(+), 3 deletions(-)   
      
   diff --git a/man/dpkg-scanpackages.pod b/man/dpkg-scanpackages.pod   
   index e8cba1fcd..ad2c8e163 100644   
   --- a/man/dpkg-scanpackages.pod   
   +++ b/man/dpkg-scanpackages.pod   
   @@ -103,8 +103,16 @@ for more information on its format.   
   =20   
    =3Ditem B<-a>, B<--arch> I   
   =20   
   -Use a pattern consisting of I<*_all.deb> and I<*_arch.deb> instead of   
   -scanning for all debs.   
   +Use a pattern consisting of I<*_all.deb> and I<*_arch.deb>,   
   +or I<*_arch.deb> if B<--no-implicit-arch> has been specified,   
   +instead of scanning for all debs.   
   +   
   +=3Ditem B<--no-implicit-arch>   
   +   
   +Do not implicitly add architecture B binary packages when specifying   
   +B<--arch>.   
   +   
   +Supported since dpkg 1.23.6.   
   =20   
    =3Ditem B<-h>, B<--hash> I   
   =20   
   diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl   
   index b5d0c8498..b01793468 100755   
   --- a/scripts/dpkg-scanpackages.pl   
   +++ b/scripts/dpkg-scanpackages.pl   
   @@ -54,6 +54,7 @@ my %options =3D (   
        },   
        type            =3D> undef,   
        arch            =3D> undef,   
   +    'implicit-arch' =3D> 1,   
        hash            =3D> undef,   
        multiversion    =3D> 0,   
        'extra-override' =3D> undef,   
   @@ -65,6 +66,7 @@ my @options_spec =3D (   
        'version',   
        'type|t=3Ds',   
        'arch|a=3Ds',   
   +    'implicit-arch!',   
        'hash|h=3Ds',   
        'multiversion|m!',   
        'extra-override|e=3Ds',   
   @@ -82,6 +84,7 @@ sub usage {   
    Options:   
      -t, --type         scan for  packages (default is 'deb').   
      -a, --arch         architecture to scan for.   
   +      --no-implicit-arch   do not add implicit architecture all to --arch.   
      -h, --hash    only generate hashes for the specified list.   
      -m, --multiversion       allow multiple versions of a single package.   
      -e, --extra-override    
   @@ -257,7 +260,11 @@ $pathprefix //=3D '';   
   =20   
    my $find_filter;   
    if ($options{arch}) {   
   -    $find_filter =3D qr/_(?:all|${arch})\.$type$/;   
   +    if ($options{'implicit-arch'}) {   
   +        $find_filter =3D qr/_(?:all|${arch})\.$type$/;   
   +    } else {   
   +        $find_filter =3D qr/_${arch}\.$type$/;   
   +    }   
    } else {   
        $find_filter =3D qr/\.$type$/;   
    }   
   --=20   
   2.51.0   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca