Bug#1068312: piuparts: Error when Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged' (bullseye)

2024-04-08 Thread Helmut Grohne
Control: tags -1 + confirmd patch
Control: forwarded -1 
https://salsa.debian.org/debian/piuparts/-/merge_requests/56

On Wed, Apr 03, 2024 at 01:40:28PM +0200, Fab Stz wrote:
> I have a CI job on salsa running piuparts with bullseye.
> Recently it started failing with this error:
> 
> 0m4.3s DUMP:
>   Enabling dpkg --force-unsafe-io.
>   Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged'
>   ln: failed to create symbolic link '/bin/sync': File exists
> 0m4.3s ERROR: Command failed (status=1): ['chroot', '/tmp/tmpoj1y68a1',
> 'eatmydata', 'tmp/scripts/post_setup_force-unsafe-io']
>   Enabling dpkg --force-unsafe-io.
>   Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged'
>   ln: failed to create symbolic link '/bin/sync': File exists
> 
> 
> Maybe this is somehow related to the latest changes in 1.4.1 mentioned as 
> "also fix /bin/sync diversion for bookworm"?

I confirm the problem and understand the failure. Mea culpa.

When I adapted the code for bookworm (which is /usr-merged, but has
/bin/sync), I failed to notice that I also conditionalized the moving
code, so the unmerged-/usr path would now divert with --no-rename and
not move /bin/sync either. That makes ln unhappy as we can see.

I've created a merge request to address this regression and am sorry for
having broken piuparts so many times.

Helmut



Bug#1068312: piuparts: Error when Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged' (bullseye)

2024-04-03 Thread Fab Stz
Package: piuparts
Version: 1.4.1
Severity: normal

Dear Maintainer,

I have a CI job on salsa running piuparts with bullseye.
Recently it started failing with this error:

0m4.3s DUMP:
  Enabling dpkg --force-unsafe-io.
  Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged'
  ln: failed to create symbolic link '/bin/sync': File exists
0m4.3s ERROR: Command failed (status=1): ['chroot', '/tmp/tmpoj1y68a1',
'eatmydata', 'tmp/scripts/post_setup_force-unsafe-io']
  Enabling dpkg --force-unsafe-io.
  Adding 'local diversion of /bin/sync to /bin/sync.distrib.usr-is-merged'
  ln: failed to create symbolic link '/bin/sync': File exists


Maybe this is somehow related to the latest changes in 1.4.1 mentioned as 
"also fix /bin/sync diversion for bookworm"?

Log is attached.


-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (991, 'stable-updates'), (991, 'stable-security'), (991, 
'stable'), (990, 'proposed-updates'), (390, 'oldstable-security'), (390, 
'oldstable'), (389, 'oldstable-updates'), (380, 'oldoldstable'), (379, 
'oldoldstable-updates'), (370, 'oldoldstable'), (95, 'testing'), (94, 
'unstable'), (93, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages piuparts depends on:
ii  debootstrap  1.0.128+nmu2+deb12u1
pn  debsums  
ii  dpkg 1.21.22
ii  libjs-sphinxdoc  5.3.0-4
ii  lsb-release  12.0-1
ii  lsof 4.95.0-1
ii  mount2.38.1-5+deb12u1
pn  piuparts-common  
pn  python   
pn  python-debian
ii  python3  3.11.2-1+b1
ii  python3-debian   0.1.49

Versions of packages piuparts recommends:
pn  adequate  

Versions of packages piuparts suggests:
pn  docker.io  
ii  schroot1.6.13-3+b2


salsa-piuparts-log.gz
Description: application/gzip