Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3200

General Questions • custom TAR_OPTIONS breaking apt

$
0
0
this post is just to highlight this behavior of apt upgrade, or install
if TAR_OPTIONS is set to a custom compression utility ( with a few exceptions ) apt fails to install/upgrade/reinstall - it fails processing the tar part of a deb package:

Code:

deb10 ~ # apt upgradeReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneCalculating upgrade... DoneThe following packages were automatically installed and are no longer required:  linux-headers-6.1.0-16-amd64 linux-headers-6.1.0-16-common linux-image-6.1.0-16-amd64Use 'apt autoremove' to remove them.The following packages will be upgraded:  firefox-esr thunderbird2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Need to get 121 MB of archives.After this operation, 256 kB disk space will be freed.Do you want to continue? [Y/n] Get:1 http://security.debian.org/debian-security bookworm-security/main amd64 firefox-esr amd64 115.9.0esr-1~deb12u1 [63.1 MB]Get:2 http://security.debian.org/debian-security bookworm-security/main amd64 thunderbird amd64 1:115.9.0-1~deb12u1 [58.3 MB]Fetched 121 MB in 5s (26.1 MB/s)       dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/firefox-esr_115.9.0esr-1~deb12u1_amd64.deb' (size=63138364) member 'data.tar': lzma write error: Broken pipedpkg-deb: error: <decompress> subprocess returned error exit status 2dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/firefox-esr_115.9.0esr-1~deb12u1_amd64.deb' to decompressor pipe: failed to write (Broken pipe)dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/thunderbird_1%3a115.9.0-1~deb12u1_amd64.deb' (size=58268604) member 'data.tar': lzma write error: Broken pipedpkg-deb: error: <decompress> subprocess returned error exit status 2dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/thunderbird_1%3a115.9.0-1~deb12u1_amd64.deb' to decompressor pipe: failed to write (Broken pipe)Reading changelogs... Done(Reading database ... 583237 files and directories currently installed.)Preparing to unpack .../firefox-esr_115.9.0esr-1~deb12u1_amd64.deb ...Leaving 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr'Unpacking firefox-esr (115.9.0esr-1~deb12u1) over (115.8.0esr-1~deb12u1) ...Preparing to unpack .../thunderbird_1%3a115.9.0-1~deb12u1_amd64.deb ...Unpacking thunderbird (1:115.9.0-1~deb12u1) over (1:115.8.0-1~deb12u1) ...Setting up thunderbird (1:115.9.0-1~deb12u1) ...Setting up firefox-esr (115.9.0esr-1~deb12u1) ...Processing triggers for hicolor-icon-theme (0.17-2) ...Processing triggers for man-db (2.11.2-2) ...Processing triggers for mailcap (3.70+nmu1) ...Processing triggers for desktop-file-utils (0.26-1) ...deb10 ~ # 
in my case i have it set up as zstdmt - it fails to process lzma
un-setting TAR_OPTIONS allows the package to be installed ( or reinstalled, upgraded ) correctly

also, i am setting TAR_OPTIONS in /etc/profile.d/custom.sh and in .bashrc ( which is questionable but should not result in a failure processing lzma )

Code:

export TAR_OPTIONS="--use-compress-program=zstdmt" 
this does not only apply to the two packages in the above apt session...

it was a challenge to locate the reason for the failures - it is "solved", but imo it is not.
I think that the decompressor should be checked, or set regardless of, or set/unset if the env var exists during or before processing of a deb pkg to prevent it from using an alternate, custom, incompatible decompressor.

Statistics: Posted by ksu — 2024-03-22 03:02 — Replies 0 — Views 37



Viewing all articles
Browse latest Browse all 3200

Trending Articles