Subject: assertion failed: perl:amd64 not marked as install despite no auto_inst

From: Giuseppe Sacco <[email-masked]>
Date: Mon, 09 Oct 2023 12:16:55 +0200

Package: crossgrader
Version: 0.0.3+nmu3
Severity: normal

Hello,
crossgrader second stage stops with assertion failed. This is an attempt of
switching from i386 to amd64 on Debian 12 machine.

Complete output is:

root@aristotele:~# crossgrader amd64 --second-stage --force-unavailable
Installing initramfs binary architecture check hook...
arch check hook already installed.
Hook installation failed.
Hit http://security.debian.org/debian-security bookworm-security InRelease                                                                     
Hit http://ftp.debian.org/debian bookworm InRelease                                                                                            
Ign https://download.webmin.com/download/newkey/repository stable InRelease                                                                    
Get:1 https://download.webmin.com/download/newkey/repository stable Release [16.0 kB]                                                          
Get:2 https://download.webmin.com/download/newkey/repository stable Release.gpg [819 B]                                                        
Err https://download.webmin.com/download/newkey/repository stable Release.gpg                                                                  
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2D223B918916F2A2                            
Fetched 16.8 kB in 0s (0 B/s)                                                                                                                  
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py", line 175, in __init__
    self._apt_cache.update(apt.progress.text.AcquireProgress())
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 603, in update
    raise FetchFailedException()
apt.cache.FetchFailedException
Ignoring...
Couldn't find linux-image-6.1.0-9-686-pae:amd64, ignoring...
Couldn't find linux-image-6.1.0-12-686-pae:amd64, ignoring...
Couldn't find linux-image-686-pae:amd64, ignoring...
Couldn't find linux-image-6.1.0-13-686-pae:amd64, ignoring...
364 targets found.
Do you want to continue [y/N]? Y
Could not mark perl:amd64 for install, fixing manually.
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 258, in main
    second_stage(args)
  File "/usr/lib/python3/dist-packages/debian_crossgrader/__main__.py", line 112, in second_stage
    crossgrader.cache_package_debs(targets)
  File "/usr/lib/python3/dist-packages/debian_crossgrader/crossgrader.py", line 581, in cache_package_debs
    assert target.marked_install, \
AssertionError: perl:amd64 not marked as install despite no auto_inst

Thank you,
Giuseppe