#1106576 apt: use of snapshot date with grml repo leads to IOT instruction (core dumped)

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Christopher Bock
Date:
2025-05-26 16:49:02 UTC
Severity:
normal
#1106576#5
Date:
2025-05-26 16:41:14 UTC
From:
To:
Beloved apt maintainers,

the use of --snapshot will fail with the grml repo as the default
handling is "Snapshot: enable" unless disabled.
This won't happen if you use the provided deb822.sources from
grml-keyring as this was disabled by me
(https://github.com/grml/grml-keyring/pull/22). But as this error can still
be reproduced and IIRC it doesn't explicitely have to be grml so it would
still be a good idea to fix it.

How to break apt:
---
root@trixie ~ # apt-get install grml-keyring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  grml-keyring
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/8448 B of archives.
After this operation, 26.6 kB of additional disk space will be used.
Selecting previously unselected package grml-keyring.
(Reading database ... 36134 files and directories currently installed.)
Preparing to unpack .../grml-keyring_2025.03.11_all.deb ...
Unpacking grml-keyring (2025.03.11) ...
Setting up grml-keyring (2025.03.11) ...
root@trixie ~ # sed 's/^Sna/#&/' /usr/share/grml-keyring/grml.sources > /etc/apt/sources.list.d/grml.sources
100 root@trixie ~ # sed 's/^Sna/#&/' /usr/share/grml-keyring/grml.sources > /etc/apt/sources.list.d/grml.sources
root@trixie ~ # apt-get --snapshot `date +%Y%m%d -d'last week'` update
apt-get: ./apt-pkg/deb/debmetaindex.cc:1352: bool debSLTypeDebian::CreateItemInternal(std::vector<metaIndex*>&, std::string, const std::string&, const std::string&, const bool&, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >) const: Assertion `List.back() == Deb' failed.
[1]    56252 IOT instruction (core dumped)  apt-get --snapshot `date +%Y%m%d -d'last week'` update
---

o/
Christopher Bock