Subject: Re: bug#625: amprolla generates InRelease without arch:all

From: Mark Hindley <[email-masked]>
Date: Sun, 24 Oct 2021 08:04:22 +0100

Boian,

Thanks for this.

On Sun, Oct 24, 2021 at 03:49:49AM +0300, Where all about bugs in Devuan packages is reported wrote:
> Package: amprolla
> Version: chimaera
> Severity: normal
> X-Debbugs-Cc: [email-masked]
> 
> It was reported on #devuan that "apt-file search" does not find some files
> while it finds others. The files in question were in arch:all packages.
> apt-file makes apt-get also fetch Contents-* and apt-get skips Contents-all
> on chimaera.
> 
> It was also reported that the same works fine in beowulf and bullseye.
> 
> After further checking, beowulf's and chimaera's InRelease does not have all
> in the arch list while bullseye has it.

I think there is something else going on here. If it works in beowulf but
beowulf's InRelease doesn't have arch:all in the list, that can't be the cause.

Arch all packages are (now) supposed to be duplicated in all the
binary-*/Packages files.

Can you give me an example package which is missing? The significant thing is
whether it is a forked or unforked package. That may point to a DAK
configuration error.

Thanks

Mark

---

From: Mark Hindley <[email-masked]>
Date: Mon, 25 Oct 2021 17:52:30 +0100

Boian and Ralph,

Thanks. I think I understand this now. Documenting it here, so we have it as a
reference.

Previously arch:all packages were included in arch specific index files (both
Packages and Contents). Obviously that is a duplication and from the Bullseye
cycle Debian has moved to reduce that duplication.  This requires clients to use
arch:all indicies directly, for which 'all' has to be included in the Release
Architectures (as Boian pointed out).

However, so this can be done in stages, the 'No-Support-for-Architecture-all:
Packages'[1] header was introduced which temporarily excludes Packages indicies
from the migration.

The inclusion of 'all' in Architectures is controlled in DAK by the per-suite
separate_{package,contents}_architecture_all options.

If we set

 separate_package_architecture_all=no
 separate_contents_architecture_all=yes

in DAK, we get 'all' added to Release Architectures and also
'No-Support-for-Architecture-all: Packages'. WHen merging, amprolla can then
test for 'all' in Devuan's DAK Release file and propagate that and the
No-Support-for-Architecture-all header to the merged Release file.

I prefer this approach as it keeps the configuration of this in a single place
(DAK) and doesn't change the behaviour for older releases (beowulf and earlier)
that still have dupicated arch:all.

Patch to be tested attached. I will change the config of ceres so it can
be tested.

Any comments/problems anybody can see?

Thanks

Mark

[1]  https://wiki.debian.org/DebianRepository/Format#No-Support-for-Architecture-all

From fb4e747cae4679ab0e5a41b1eb98f5e8ea521721 Mon Sep 17 00:00:00 2001
From: Mark Hindley <[email-masked]>
Date: Sun, 24 Oct 2021 18:21:50 +0100
Subject: [PATCH] Include 'all' in Release architectures if it is configured in
 DAK.

Set separate_{contents,packages}_architecture_all=False|True for the suite.
---
 lib/config.def.py | 1 +
 lib/release.py    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/config.def.py b/lib/config.def.py
index 59b5be8..b83ef44 100644
--- a/lib/config.def.py
+++ b/lib/config.def.py
@@ -312,6 +312,7 @@ release_keys = [
     'Components',
     'Description',
     'NotAutomatic',
+    'No-Support-for-Architecture-all',
     'ButAutomaticUpgrades',
     'Acquire-By-Hash',
 ]
diff --git a/lib/release.py b/lib/release.py
index 3099568..a264874 100644
--- a/lib/release.py
+++ b/lib/release.py
@@ -121,7 +121,8 @@ def write_release(oldrel, newrel, filelist, rmstr, rewrite=True):
     for i in arches(rel_cont['Codename']):
         if i == 'source':
             continue
-        if i == 'binary-all':
+        if i == 'binary-all' and not 'all' in rel_cont['Architectures'].split():
+            # DAK configuration separate_{contents,packages}_architecture_all=False
             continue
         i = i.replace('binary-', ' ')
         _archlist += i
-- 
2.20.1

---

From: Mark Hindley <[email-masked]>
Date: Tue, 26 Oct 2021 17:07:18 +0100

Deployed and appears to be working as expected.

Closing.

Mark