Bug#1063233: qemu-system-{arch} packages provide themselves

2024-02-24 Thread Michael Tokarev

Control: reopen -1
Control: Version -1 1:8.0+dfsg-1

On Mon, 05 Feb 2024 20:21:18 +0100 Daniel Vacek  wrote:


echo 'qemu:Provides=$(if $3,qemu-kvm (=${DEB_VERSION})${comma})\
-$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma}, any $2 $(foreach
q,$2,${system-alias-$q}))' \
+$(filter-out $1,$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma},
any $2 $(foreach q,$2,${system-alias-$q})))' \


Actually.. neither your solution nor mine works, it's a bit more complicated
than that.

Your solution filters the whole thing with includes version info, so the
end result is:
  Provides: qemu-system-any (=8.2.1), (=8.2.1), qemu-system-armel (=8.2.1)

which is obviously wrong.

Mine actually does nothing, since it tries to filter out qemu-system-bar
out of foo bar baz.

That needs additional tweaking.

/mjt



Bug#1063233: qemu-system-{arch} packages provide themselves

2024-02-05 Thread Daniel Vacek
Package: qemu-system
Severity: minor
Tags: patch
X-Debbugs-Cc: neel...@gmail.com

Hi,

Providing itself seems useless as it only adds complexity to the package
relationship graph with no added value.

This would be easily fixed with the following patch:

```
--- debian/rules~orig   2024-02-05 19:44:03.297707965 +0100
+++ debian/rules2024-02-05 19:49:41.658434785 +0100
@@ -185,7 +185,7 @@
dh_link -p $1 usr/share/man/man1/$3.1 usr/share/man/man1/kvm.1
 )
echo 'qemu:Provides=$(if $3,qemu-kvm (=${DEB_VERSION})${comma})\
-$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma}, any $2 $(foreach
q,$2,${system-alias-$q}))' \
+$(filter-out $1,$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma},
any $2 $(foreach q,$2,${system-alias-$q})))' \
| tr _ - >> debian/$1.substvars
 # construct list `arch1 arch2 (alias) arch3..' for Description
 # and word-wrap it into two lines if too long
```

If I'm missing something, please disregard this report and close the bug. Thank
you.

Have a nice day,

--nX


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.8-rt-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FORCED_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages qemu-system depends on:
ii  qemu-system-arm [qemu-system-arm]  1:8.2.1+ds-1
pn  qemu-system-mips   
pn  qemu-system-misc   
pn  qemu-system-ppc
pn  qemu-system-sparc  
ii  qemu-system-x861:8.2.1+ds-1

qemu-system recommends no packages.

qemu-system suggests no packages.
--- debian/rules~orig   2024-02-05 19:44:03.297707965 +0100
+++ debian/rules2024-02-05 19:49:41.658434785 +0100
@@ -185,7 +185,7 @@
dh_link -p $1 usr/share/man/man1/$3.1 usr/share/man/man1/kvm.1
 )
echo 'qemu:Provides=$(if $3,qemu-kvm (=${DEB_VERSION})${comma})\
-$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma}, any $2 $(foreach 
q,$2,${system-alias-$q}))' \
+$(filter-out $1,$(patsubst %,qemu-system-% (=${DEB_VERSION})${comma}, 
any $2 $(foreach q,$2,${system-alias-$q})))' \
| tr _ - >> debian/$1.substvars
 # construct list `arch1 arch2 (alias) arch3..' for Description
 # and word-wrap it into two lines if too long