Article View: linux.debian.bugs.dist
Article #89Bug#1150273: autopkgtest: unshare does not reuse sbuild tarballs if XDG_CACHE_HOME is set
From: David Kalnischkies
Date: Wed, 07 Oct 2026 20:30
Date: Wed, 07 Oct 2026 20:30
94 lines
5600 bytes
5600 bytes
--ndw7ypqvtt5ly5x6
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: autopkgtest: unshare does not reuse sbuild tarballs if
XDG_CACHE_HOME is set
MIME-Version: 1.0
Package: autopkgtest
Version: 6.0
Severity: normal
File: /usr/bin/autopkgtest-virt-unshare
Tags: patch
Hi,
As per subject, if in your environment the variable XDG_CACHE_HOME is
set (and you don't pick a tarball explicitly with -t),
autopkgtest-virt-unshare will not pick up files from the directory
"${XDG_CACHE_HOME}/sbuild" but instead tries to attempt picking tarballs
=66rom "/sbuild" ~ which probably fails, causing the automatic tarball
creation to step in (~ which probably works, but is a waste in this case).
This is due to the way the path is joined as joinpath() is documented
| Calling this method is equivalent to combining the path with each of
| the given pathsegments in turn
which implicitly refers to PurePath() documentation containing this:
| If a segment is an absolute path, all previous segments are ignored
| (like os.path.join())
So, the issue should be easy to resolve (tested locally):
```diff
--- a/virt/autopkgtest-virt-unshare
+++ b/virt/autopkgtest-virt-unshare
@@ -115,7 +115,7 @@ def parse_args():
xdg_cache_home =3D pathlib.Path("~/.cache/sbuild").expanduser()
if "XDG_CACHE_HOME" in os.environ:
xdg_cache_home =3D pathlib.Path(os.environ["XDG_CACHE_HOME"]).=
joinpath(
- "/sbuild"
+ "sbuild"
)
chroots =3D xdg_cache_home.glob(f"{args.release}-{args.arch}.t*")
```
If joinpath() didn't change behaviour, which seems likely, I presume
this was broken since unshare got implemented, just that it isn't used
much and for many folks the automatic tarball creation probably works
fine; the time/data waste compared to just reusing the cached sbuild
chroot is neglectable for them.
Maybe there should be a (debug) message indicating where autopkgtest
tries to look for tarballs. I did not add one through to not blow up
the diff & as -d and -dd did not activate the existing debug messages
in that code area for me.
If you wonder why this variable is set: guix ships a /etc/profile.d
snippet setting it (and a few more). diffoscope recommends guix.
apt helpfully installed guix for me recently as a new recommends,
subsequently sending me down various rabbit holes investigating
why everything broke for me for 'no reason' in strange ways=E2=80=A6
including my own apt testing. APT is so heartless (sometimes).
Best regards
David Kalnischkies
--ndw7ypqvtt5ly5x6
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE5sn+Q4uCja/tn0GrMRvlz3HQeIMFAmrGqrQACgkQMRvlz3HQ
eIMA8w//bJzZJMf46RFWZessyFlmRaS526/2VHMgBmPcFYgFhnebdZe1lRT+UGh+
Nm6Bys/pPVeXLK17wmEhklX2SSh/vq7XSM6z31whb8+zRe5/g/+NKPFoTMXD/EBM
sMwkGra4Se//bmrN9rpCvkS+qZOM/jpKakk9khtxb3il3oT80oW6KkaWu2LOMY8x
EjlLCH4Jp/behrxifnw+F0MjF/wVYKoDJtXrnvZ3U8Ikbsh36iiG94M0PbxUFpUM
NRU3A47hcH78ObQ9cpDl78ybhUgLCnTVzmnOOvOvhVztZe+Ax+Wa5x1OvUCmDgZR
YQU2NodzDYhjTQap6GQx6/vPZitL9IHM3WKadQUKJdgldxKW99xQqXJbhBSKr+Yg
adb5obFH+axlbMFYAcPVZaOSrXEjLxXl05NI8fyz89AhQ+X3vZhoLMkfyDVq7NF7
y1Z9E3WODPNy3EmYp6ew6QDIghQSyzLuodin9bOKIPZa3/UrVnEyqFsDaFYM5QoG
6BR75P/GN9w1XiH5WHdAxWXnQu/6HQii//M8q5X0YvGUKS/vL4Az1sVthZ0mkWuX
Cbkk9K26RfoZTWaMKobXE8M+wE4grZKnIUX3ucJHOSB8sk9x6qE1cW+bTpENb3RF
UuEdTANqRBHM+IGsf8JXLVVjaDoSGfdeaNM9afQQKdINr7WZvMY=
=yLjt
-----END PGP SIGNATURE-----
--ndw7ypqvtt5ly5x6--
Technical Details
Message-ID:
<NLGqZ-48I8-23@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: David Kalnischkies <david@kalnischkies.de> Newsgroups: linux.debian.bugs.dist Subject: Bug#1150273: autopkgtest: unshare does not reuse sbuild tarballs if XDG_CACHE_HOME is set Date: Wed, 07 Oct 2026 22:30:01 +0200 Message-ID: <NLGqZ-48I8-23@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 7 20:27:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.751 Reply-To: David Kalnischkies <david@kalnischkies.de>, 1150273@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+ci@tracker.debian.org X-Debian-Pr-Message: report 1150273 X-Debian-Pr-Package: autopkgtest X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: autopkgtest Authentication-Results: hermippe.uberspace.de; auth=pass (plain); dkim=none (length tag is unsupported) header.i=unknown header.d=kalnischkies.de header.s=mail MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ndw7ypqvtt5ly5x6" Content-Disposition: inline X-Rspamd-Bar: -- X-Rspamd-Report: BAYES_HAM(-0.850473) MID_RHS_NOT_FQDN(0.5) SIGNED_PGP(-2) MIME_GOOD(-0.2) X-Rspamd-Score: -2.550473 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1995614 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 94 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 7 Oct 2026 22:25:36 +0200 X-Original-Message-ID: <asae_m6gGWmNP_rf@crossbow>