Package: crossgrader
Version: 0.0.3+nmu2
Severity: important

Trying to do an amd64 -> i386 crossgrade after debootstrap
of the amd64 chroot fails with:

# crossgrader --third-stage amd64 i386
Installing initramfs binary architecture check hook...
arch check hook already installed.
Hook installation failed.
Hit http://deb.debian.org/debian sid InRelease
Fetched 0 B in 0s (0 B/s)
4 targets found.
gcc-10-base:amd64
libc6:amd64
libcrypt1:amd64
libgcc-s1:amd64
Do you want to continue [y/N]? y
dpkg: error processing package libcrypt1:amd64 (--purge):
 this is a protected package; it should not be removed
dpkg: error processing package libgcc-s1:amd64 (--purge):
 this is a protected package; it should not be removed
dpkg: dependency problems prevent removal of gcc-10-base:amd64:
 libgcc-s1:amd64 depends on gcc-10-base (= 10.2.1-6).

dpkg: error processing package gcc-10-base:amd64 (--purge):
 dependency problems - not removing
(Reading database ... 18110 files and directories currently installed.)
Removing libc6:amd64 (2.31-12) ...
Purging configuration files for libc6:amd64 (2.31-12) ...
Processing triggers for libc-bin (2.31-12) ...
Errors were encountered while processing:
 libcrypt1:amd64
 libgcc-s1:amd64
 gcc-10-base:amd64
Traceback (most recent call last):
  File "/usr/bin/crossgrader", line 33, in <module>
    sys.exit(load_entry_point('debian-crossgrader==0.0.3', 'console_scripts', 
'crossgrader')())
  File "/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py", line 
260, in main
    third_stage(args)
  File "/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py", line 
141, in third_stage
    subprocess.check_call(['dpkg', '--purge'] + targets)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dpkg', '--purge', 
'gcc-10-base:amd64', 'libc6:amd64', 'libcrypt1:amd64', 'libgcc-s1:amd64']' 
returned non-zero exit status 1.
#


libgcc-s1 and libcrypt1 both got
  Protected: yes
to prevent accidental removal in some buster -> bullseye upgrade situations,
some additional forcing seems necessary to overwrite that.


It works after changing line 141 in
/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py to:
        if cont == 'y':
            subprocess.check_call(['dpkg', '--purge', 
'--force-remove-protected'] + targets)

Reply via email to