In an earlier version of sbuild "apt distclean" was enabled by default: sbuild (0.91.3) unstable; urgency=medium [ Jochen Sprickerhof ] * Actually use UNSHARE_MMDEBSTRAP_ENV_CMD * Replace APT_UPDATE_ARCHIVE_ONLY by static definition * Enable apt distclean by default ... While this is a perfectly reasonable default in many respects, and there is a way to turn it off in the sbuild configuration file by setting: $clean_apt_cache = 0; There are some corner cases where this behavior would be nice to disable on an ad-hoc basis, for which a commandline option such as --no-apt-distclean would make sense (or something that mirrors the variable name?). Or possibly extending the --no-apt-clean to also not run distclean, as that was the first option I tried to use. As far as I could tell reading the manpage, there is no way to disable this from the commandline, short of specifying a custom configuration file (which requires passing SBUILD_CONFIG as an environment variable... ?) The situation in which I needed this was while traveling without reliable network access (on a North American train), and I wanted to run lintian and other hooks that required installing packages after the build was finished, and I had a local caching proxy with all the relevent packages available, but practically speaking no network, and the Packages files may have been out of sync, so could not download them from the caching proxy to then install the .deb packages... my sbuild tarballs include the Packages files so that cases like this will work, but this disclean feature works against me here. --no-apt-update got me most of the way there, and I could actually build a package with --no-run-lintian, but in order to install lintian and other packages, I needed to tweak my ~/.sbuildrc with the above mentioned configuration. I've set the version to the version where this issue first presumably appeared, but also confirmed as best I could that this is not an option in newer versions. Thanks for maintaining sbuild! live well, vagrant
Hello, Bug #1135581 in sbuild reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debian/sbuild/-/commit/39db2c37ad3f8cf37df76d5bb279d8375c0a4565 ------------------------------------------------------------------------ Add --apt-distclean commandline option Closes: #1135581 ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1135581
We believe that the bug you reported is fixed in the latest version of sbuild, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1135581@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Jochen Sprickerhof <jspricke@debian.org> (supplier of updated sbuild package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Sat, 27 Jun 2026 12:06:03 +0200 Source: sbuild Architecture: source Version: 0.91.10 Distribution: unstable Urgency: medium Maintainer: sbuild maintainers <sbuild@packages.debian.org> Changed-By: Jochen Sprickerhof <jspricke@debian.org> Closes: 1135581 1137071 Changes: sbuild (0.91.10) unstable; urgency=medium . [ Luca Boccassi ] * Install and use sysusers.d/tmpfiles.d config files . [ Arnaud Rebillout ] * Fix default value for UNSHARE_MMDEBSTRAP_EXTRA_ARGS (Closes: #1137071) . [ Tianyu Chen ] * Add ; for examples in sbuild.conf . [ Benjamin Drung ] * Map *-proposed pocket to base suite * Mark autopkgtests needing Internet access * Support chroot in /usr/bin (LP: #2133900) . [ Philippe SWARTVAGHER ] * Fix running autopkgtest with --extra-package=/dir/ . [ Jochen Sprickerhof ] * Add --apt-distclean commandline option (Closes: #1135581) * Drop duplicated build dependency * Fix some groff warnings * Add d/clean * Deprecate the buildd package * Drop optional priority * Drop R³ * Bump policy version (no changes) . [ Johannes Schauer Marin Rodrigues ] * man/sbuild.1.in: move the unshare backend docs to the top Checksums-Sha1: d7fcffa20dac861bb691e8f12f6cdbc9bfc4dd56 2784 sbuild_0.91.10.dsc ea7975656031e2872b7d230076e99f3e2981f93b 265004 sbuild_0.91.10.tar.xz Checksums-Sha256: 76d465d831f3ea546675880d6ee0987b1e94362973370f0ed2912a3a7d77791c 2784 sbuild_0.91.10.dsc 5568f5a87ece0669dfe3910e907ef63f0b75a3d7cab82e904e7ec97761ad8fb4 265004 sbuild_0.91.10.tar.xz Files: 8467f5143b9901d52e32bda1eaca1559 2784 devel optional sbuild_0.91.10.dsc 6f60bf3c7ee4465fd9ce40f6b69d6797 265004 devel optional sbuild_0.91.10.tar.xz -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmo/oLQACgkQW//cwljm lDMGcQ//SpXMX00pxzFkXi4mYgZO3u0308L5e5GTDDTN5RISyabGW8zy6jcKaLXL 39hZMjrg5LvD9wHQtN4cZxVDEbQ8ojawIWeTzXoYL9A5ubJGG3Zfz67/D1PKDq4L PdGsRcmY5b40mKNwaaRT2xhE8pSt1OZAx1tSbjupJ7M3y3vMIMtxKIGWWR5dENha Mt1utWUPlY0KqPBOs4kilBQOBqCTUsGcKXPKxiaBWFcZWb92c5QRygv48VbULblS gL9YMRB8RjE5cbSkaxxK2V9bTGdwmEFRWCJJ8IcIIpZRJ0PD6wj/EAB9v7cQz3ot bAdE+mLleBLnzwcyaOpwsa+mYzphGgKm5bK3yUboFFPnWpCwXz2mIqowsrMQJqyc HJGgCHmQ0fD7lkLase+8vUwvkjP4KcxAX2GwMOH54J+R5ZisfXe/bNSbOPYh8P/F jLh4d3ay5kIy5Oug5SOaT1tv+CnCxP406d0VQKA3/eesFOO1Cvffz/XMbIYAeh2I wxIujtseUz5a89cBxBfrzfcqHpkcOA/9WTqVFkerNS4gWH+e9ijOFabez4rXU/h5 vQf8nZ5R0hDJ40Da4dq693f1ipcbHWVUxJuY5xMb0N1U/YnJRjReENXF80GnbLPg 9boxmuzkGVhALPiLeCI1pZLkyjuj9Kqe9yFhMeu5O5lWePVyMXI= =N/rJ -----END PGP SIGNATURE-----