FS#72485 - [pacman] "invalid or corrupted package" does not list specific package (file)

Attached to Project: Pacman
Opened by xyz (sjon) - Wednesday, 20 October 2021, 10:02 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 02 November 2021, 18:32 GMT
Task Type Bug Report
Category Packages: Core
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

using pacman-6.0.1-2 I have an issue where pacman no longer reports which package file it has issues with. To be clear, the actual reason there is an invalid package is irrelevant (I cancelled a download somewhere):

<code>
# pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (17) ...

Total Installed Size: XXX.XX MiB
Net Upgrade Size: X.XX MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
(17/17) checking keys in keyring [##########################################################################################################################################] 100%
(17/17) checking package integrity [##########################################################################################################################################] 100%
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
</code>

--debug also doesn't clarify anything:

<code>
debug: found cached pkg: /var/cache/pacman/pkg/python2-2.7.18-5-x86_64.pkg.tar.zst
debug: sig data: iQIzBAABCAAdFiEEtZcfLFwQqaCMYAMPeGxj8zDXy5IFAmFjbpIACgkQeGxj8zDXy5I4qBAAtIVre+rRc8A+C5NKiK1lbzsGLurkq7Lu/YYEO1A5ZRCfqKt9fxWgTV7Q9yVGUBQipvBeeD5R5suBel7L4iicyzqEtFpjyaLciOtzqirDk1hMG8tdRA9Pw9yXoIV8RyP9lxeDOf3iLFPU25oA4evChdZRVxuoeRhXDzokMQfup0mN73KCE32TVv6CbUzhDk7fSvbW4XX0BV/dbEcLb2MzcD4jrNme83PJ3qc12nm+D2K8LWV0W2z3zNzWoNg045Ki2nBf00C2M1w/SzvRENfAlsFwPAYmTAz3K2rWQEbhrnwpjoeWzQaA2fo6/urn5zyAziPyunIaknb0WnbXi/x744ZsFNr1Zw11yebGaf8eEzPVfWgRxmk3hWcukyogCpR/UnrbCuZV1Tq1XMJXjgXnp0YKp1JA5G4ilQBLQkrt+c1PcxyxL2WoHvtdyi7oI9uuNcoXi0/g//+5Sn7PTtTYPF7tGWRhY0UJb3TyBUMNp07Q+3rAgwh/hjn2Wg5f62rMPd6sGihooAAdNjrbGeM/uJ5mjueDToBpK7lgnQUAwFEKn66rINsRpf2hD1ZIrPsYrdtY5RnyJBjnXdHDFQKPjA44CuAxyySIe+srpqt9DH6QoKySSpOXYa4a1En+dabL8IC3MnHIP5khQ7iJU1HWZmreLHoPaMWecein9N2Bc1w=
debug: checking signature for /var/cache/pacman/pkg/python2-2.7.18-5-x86_64.pkg.tar.zst
debug: 1 signatures returned
debug: fingerprint: B5971F2C5C10A9A08C60030F786C63F330D7CB92
debug: summary: valid
debug: summary: green
debug: status: Success
debug: timestamp: 1633906322
debug: exp_timestamp: 0
debug: validity: full; reason: Success
debug: key: B5971F2C5C10A9A08C60030F786C63F330D7CB92, Felix Yan <felixonmars@archlinux.org>, owner_trust unknown, disabled 0
debug: signature is valid
debug: signature is fully trusted
debug: returning error 35 from check_validity (../lib/libalpm/sync.c: 1050) : invalid or corrupted package
error: failed to commit transaction (invalid or corrupted package)
</code>

Please make pacman report the actual package (file) it has issues with.
This task depends upon

Comment by xyz (sjon) - Friday, 25 March 2022, 14:25 GMT
this is extremely annoying and still happens with the latest pacman (0.6.1 currently). It is apparently caused by a 0 sized `pkg.tar.zst.sig.part` file combined with a non zero sized `pkg.tar.zst.part` file. Removing both will enable downloading them again.

pacman should at least know what package file caused this error

Loading...