You are not logged in.

#1 2018-04-03 03:35:54

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 270

[SOLVED] Correct way to reinstall corrupted packages?

Hello all.

I have some corrupted packages I can find via

find /usr/lib -size 0

which returns the following:

/usr/lib/python2.7/email/mime/__init__.py
/usr/lib/python2.7/email/test/__init__.py
/usr/lib/python2.7/bsddb/test/__init__.py
/usr/lib/python2.7/lib2to3/tests/data/fixers/myfixes/__init__.py
/usr/lib/python2.7/test/nullcert.pem
/usr/lib/python2.7/pydoc_data/__init__.py
/usr/lib/python2.7/lib-tk/test/test_tkinter/__init__.py
/usr/lib/python2.7/lib-tk/test/test_ttk/__init__.py
/usr/lib/python2.7/sqlite3/test/__init__.py
/usr/lib/python3.6/tkinter/test/test_tkinter/__init__.py
/usr/lib/python3.6/tkinter/test/test_ttk/__init__.py
/usr/lib/python3.6/tkinter/test/__init__.py
/usr/lib/python3.6/email/mime/__init__.py
/usr/lib/python3.6/urllib/__init__.py
/usr/lib/python3.6/lib2to3/tests/data/fixers/myfixes/__init__.py
/usr/lib/python3.6/test/test_import/data/package/submodule.py
/usr/lib/python3.6/test/test_import/data/package2/submodule2.py
/usr/lib/python3.6/test/nullcert.pem
/usr/lib/python3.6/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty
/usr/lib/python3.6/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py
/usr/lib/python3.6/pydoc_data/__init__.py
/usr/lib/python3.6/sqlite3/test/__init__.py
/usr/lib/python3.6/site-packages/botocore/vendored/requests/packages/urllib3/contrib/__init__.py
/usr/lib/python3.6/site-packages/botocore/vendored/__init__.py

I wasn't sure what these all belonged to, so I removed (pacman -Rns <name>) every python package on the system and installed them again normally. The weird part is that

find /usr/lib -size 0

comes back clean if the packages have been removed, but after installing them again the command returns the previous input.

Last edited by felixculpa (2018-04-03 23:50:29)

Offline

#2 2018-04-03 05:25:43

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Correct way to reinstall corrupted packages?

felixculpa wrote:

Hello all.

I have some corrupted packages I can find via

find /usr/lib -size 0

Who told you that empty files means a corrupted package? This is wrong -- empty files *can* indicate corrupted packages, but __init__.py is one example of files which are meant to be empty. If they were *.so files then it is far more likely to indicate a problem. wink

Corrupted packages are indicated by packages which do not match their metadata. Why do you think you might have corrupted packages?

You can detect them using pacman -Qkk, or using paccheck (from pacutils).


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-04-03 10:48:46

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] Correct way to reinstall corrupted packages?

If you suspect corruption then I suggest running the paccheck script, you can feed it's  output to pacman to reinstall the packages.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2018-04-03 11:26:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED] Correct way to reinstall corrupted packages?

felixculpa wrote:

I wasn't sure what these all belonged to, so I [did something drastic and silly]

pacman -Qo /path/to/file

But if you reinstall with `pacman -S` you'll just reinstall what you already have in your cache.  If the problem that you downloaded a corrupted package, then this would not help.  Delete the package from /var/cache/pacman/pkg/<pkgname>-<pkgver>.pkg.tar.xz and then reinstall it (it will then be downloaded again).  But as above, this is not likely needed in this case.

Last edited by Trilby (2018-04-03 11:28:35)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-04-03 23:56:05

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 270

Re: [SOLVED] Correct way to reinstall corrupted packages?

I just suspected corrupted packages because there WAS some corrupt packages that needed to be reinstalled, according to the wiki section about what to do after pacman crashes as "find /usr/lib -size 0" was one of the steps involved. I think I was being paranoid in this case after already fixing the actual corrupt packages.

Offline

Board footer

Powered by FluxBB