Re: Single broken package blocks whole package management
Richard Hector <richard@walnut.gen.nz> writes:
> Firstly, the standard response is that Raspbian is not Debian :-)
> There are differences which might be related to your problem.
Yes, of course. I know. But my question was not about the Raspbian
specific packages but on apt, dpkg, aptitude & co. I assume, these
work mostly (or exactly) like in Debian.
> > I first wanted to upgrade everything which doesn't causes any
> > conflicts, which fails because of problems in wolfram-engine:
>
> wolfram-engine appears not to be a debian package, for starters.
>
> [...]
>
> Ah. So perhaps a bug in that package. Or it's corrupted.
>
> If you look at /var/lib/dpkg/info/wolfram-engine.list does it have an
> empty line in it? What happens if you edit that out?
OK, thanks for that hint. This file indeed not only contained a blank
line, but it seems to be completely corrupted. Roughly 5-10% of all
bytes in random positions are replaced with random (some ASCII, some
non-ASCII) values, making *lots* corrupted path names, which I can
still recognize/guess, but corrupted. And one line had its last
character replaced by a new-line, thus making a blank line. A quick
check
# cd /var/lib/dpkg/info; file *.list | grep -v ASCII
ca-certificates.list: UTF-8 Unicode text
libmodule-build-perl.list: empty
python-apt-common.list: data
wolfram-engine.list: data
showed another corrupted file. python-apt-common.list has the same
random errors. Just curious, I wanted to know, whether all other
files contain valid and existing path names:
# for f in *list; do echo $f; cat $f | tr '\n' '\0' |
xargs -0 ls -d >/dev/null ; done 2>&1 | less
Many package list files contain path names which seem valid but are
non-existent in the file system. Is that normal? On another
Debian stretch/amd64 system with 1868 packages installed I got only 3
packages each containing only 1 non-existent path name.
> I'd try deleting any blank lines from that file, and trying again.
Yes, I will try that. Just to learn if it will fix things. I expect
many errors because of the many broken path names which cannot be
removed.
However, since this system looks somewhat suspicious already and I
wanted to go to buster (or maybe bullseye) anyway, I will save /home
and relevant stuff from /var and then reinstall from scratch. After
testing the SD card. Seems to be easier.
> Or maybe apt-get install --reinstall wolfram-engine
It all leads to the same error message as above.
I don't need Wolfram anyway, it's been installed by default.
> Or ask on a Raspbian list :-)
Hm, probably I wasn't clear enough. My question was not about
Raspbian or the wolfram package, but about dpkg and friends. Isn't
there a better way to remove packages if the .list file corrupted?
And isn't there a way to temporarily ignore such errors and install or
upgrade other packages despite such an error? Even dpkg --force-all
didn't help so I couldn't do aynthing. I found it surpring that a
single broken package leaves you in a state where you're stuck and
cannot go out, easily.
> https://unix.stackexchange.com/questions/425355/x11-common-contains-empty-filename
Looks very similar to my problem.
urs
Reply to: