You are not logged in.

#1 2015-04-03 20:09:14

BlueYoshi
Member
Registered: 2015-03-14
Posts: 62

[SOLVED] Pacman Database & testdb Issues

I've been trying for the past day to diagnose the problems I've been experiencing with pacman, which I will explain below.

$ testdb <core, extra, community, or multilib>

Any of the above will return inconsistencies such as claims of dependencies not being installed when they are installed, or claims of dependencies not being installed for packages I don't even have.

Example:

$ testdb core
missing 'guile' dependency for 'make'
missing 'unixodbc' dependency for 'openldap'
missing 'libaio' dependency for 'thin-provisioning-tools'

1. 'guile' is installed
2. I do not use 'openldap' and therefore do not have 'unixodbc'
3. I already have both 'libaio' and 'thin-provisioning-tools' installed

When I run the command to reinstall all packages on system,  it returns an incomplete list of 80 packages, while I actually have approximately 680-700. 'guile' for example, is one of the packages missing from that list.

# pacman -Qenq | pacman -S -

I also tried Restore pacman's local database as explained on the pacman tips article, but that didn't seem to help: https://wiki.archlinux.org/index.php/Pa … l_database

I don't think that's the case anyway since '/var/lib/pacman/local' seems to be consistent, and '$ pacman -Q' returns the accurate list of packages.

Finally, I checked to see if keys were the issue, and ran the following commands which did not seem to return any errors:

# pacman-key --init
# pacman-key --populate archlinux
# pacman-key --refresh-keys

I have no idea what the problem could be. Could anyone shed some light on this?

Last edited by BlueYoshi (2015-04-03 21:14:20)

Offline

#2 2015-04-03 20:31:55

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] Pacman Database & testdb Issues

If you're trying to test your local database you need to call testdb without any arguments.

Offline

#3 2015-04-03 20:42:43

BlueYoshi
Member
Registered: 2015-03-14
Posts: 62

Re: [SOLVED] Pacman Database & testdb Issues

apg wrote:

If you're trying to test your local database you need to call testdb without any arguments.

I tried that as well, and it did not return anything. As I said in the OP, I'm not really sure what is causing the described issue, but it seems as if the local database is fine.

The issues I'm noticing are that testdb on core, extra, community, or multilib are all returning inconsistencies, the command to reinstall all packages is no longer consistent at all, and that some programs seem to think that dependencies are not installed, and are causing themselves to not work as intended (such as Wine).

Last edited by BlueYoshi (2015-04-03 20:43:33)

Offline

#4 2015-04-03 20:50:07

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] Pacman Database & testdb Issues

Nothing you have described so far is out of the ordinary.  Running testdb on individual sync databases is going to report errors because some of their packages have dependencies that are located in other repositories.  `pacman -Qenq | pacman -S -` only reinstalls native packages that you had explicitly installed, so of course it gives you a number less then the total number installed.

Offline

#5 2015-04-03 20:56:25

BlueYoshi
Member
Registered: 2015-03-14
Posts: 62

Re: [SOLVED] Pacman Database & testdb Issues

apg wrote:

Nothing you have described so far is out of the ordinary.  Running testdb on individual sync databases is going to report errors because some of their packages have dependencies that are located in other repositories.  `pacman -Qenq | pacman -S -` only reinstalls native packages that you had explicitly installed, so of course it gives you a number less then the total number installed.

Why is it returning errors for packages I do not use in any way?

Also, I remember using that command or one similar, and it would reinstall everything from what I remember, but now that my mind is a bit clearer, I just realized there's an 'e' in there, and I checked it against 'pacman -Qe' output. It lists everything including foreign packages, but I notice one foreign package is not listed in there, but is it listed in 'pacman -Qm' output. When attempting to remove it, it returns:

$ sudo pacman -R libretro-super-git
[sudo] password for username: 
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

That db.lck just appeared, and I then removed it. Now it's able to be removed. I don't know if my memory is playing tricks on me, but I don't remember pacman doing any of this on my system until just recently.

Last edited by BlueYoshi (2015-04-03 21:04:53)

Offline

#6 2015-04-03 21:00:42

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] Pacman Database & testdb Issues

BlueYoshi wrote:
apg wrote:

Nothing you have described so far is out of the ordinary.  Running testdb on individual sync databases is going to report errors because some of their packages have dependencies that are located in other repositories.  `pacman -Qenq | pacman -S -` only reinstalls native packages that you had explicitly installed, so of course it gives you a number less then the total number installed.

Why is it returning errors for packages I do not use in any way?

Because when you run `testdb core` you are testing the core repository itself, which has nothing to do with what you currently have installed.

Offline

#7 2015-04-03 21:12:00

BlueYoshi
Member
Registered: 2015-03-14
Posts: 62

Re: [SOLVED] Pacman Database & testdb Issues

apg wrote:
BlueYoshi wrote:
apg wrote:

Nothing you have described so far is out of the ordinary.  Running testdb on individual sync databases is going to report errors because some of their packages have dependencies that are located in other repositories.  `pacman -Qenq | pacman -S -` only reinstalls native packages that you had explicitly installed, so of course it gives you a number less then the total number installed.

Why is it returning errors for packages I do not use in any way?

Because when you run `testdb core` you are testing the core repository itself, which has nothing to do with what you currently have installed.

Ahh, I understand now. I thought it was just a filter for packages of that repository that are on my system.

I just tried 'testdb core extra', 'testdb core extra community multilib', etc. and when testing them all at once, it returned no errors like with just testdb.

Thank you.

Last edited by BlueYoshi (2015-04-03 21:18:30)

Offline

#8 2015-04-03 21:13:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Pacman Database & testdb Issues

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB