You are not logged in.

#1 2009-09-08 11:47:25

OMGitsUGOD
Member
Registered: 2009-08-27
Posts: 21

[SOLVED]exists in filesystem

I get the error "* existst in filesystem" a lot, say every third time I do pacman -S [package]. This makes me feel like something is broken.  Normally I just check that no package owns the files, with pacman -Qo file and then go ahead with pacman -Sf [package],  and everything works but it just feels very wrong.

My theory atm is that it is the packages I installed when I first installed arch are not in pacman's database somehow. I tested this by doing pacman -Q gcc, which gave the error "package gcc doesn't exist". But gcc is installed and I know I installed it from the installation cd. Well I did a pacman -Sf gcc, and now pacman knows about gcc. How can I fix this, or will it go away once I have updated all the packages I initially installed. Are there any better way of fixing this?

[edit]
I tested my theory with one more example, doing pacman -Q pacman gives "package "pacman" does not exist". Well and pacman is obviously installed and it was installed from the installation cd. What should I do because I guess if pacman doesn't know about these packages I will not get any updates right? Should I go ahead and do pacman -Sf pacman?

Last edited by OMGitsUGOD (2009-09-18 10:33:12)

Offline

#2 2009-09-08 13:53:04

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]exists in filesystem

Sounds like database is broken... First of all i'd read the news on the frontpage for any gotchas before forcing an upgrade.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2009-09-08 14:01:10

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED]exists in filesystem

you can try to rebuild your package list from pacman.log as explained in the wiki :
http://wiki.archlinux.org/index.php/How … l_Database

It might be possible (more bullet-proof / accurate?) to use pkgfile from http://www.archlinux.org/packages/commu … /pkgtools/ to achieve the same result.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2009-09-09 07:10:14

OMGitsUGOD
Member
Registered: 2009-08-27
Posts: 21

Re: [SOLVED]exists in filesystem

Thanks!
I modified the method in the wiki somewhat since most of my packages was recognized by pacman I thought it was unnecessary to reinstall them all. The script given in the link above gives you a file "pkglist" which contains all packages you have ever installed, I only want to reinstall those that pacman has forgot about so I write the following in a file, e.g. broken_pkg.sh, and make it executable

#!/bin/bash
PKG=$(cat pkglist)
for pkg in $PKG
do
    pkg_broken=$(pacman -Q $pkg 2>&1 | grep "not found") 
    if [ -n "$pkg_broken" ]
    then
        echo $pkg
    fi
done

and then I run

./broken_pkg.sh  > broken_pkg

and then do exactly what's done on the wiki but with "broken_pkg" instead of "pkglist". If you like you could just combine the teo scripts into one that does both tasks.

Anyway thanks for the help nothing seems to be broke so far! I will mark this [SOLVED] when I have done some updates without any problems.

Offline

#5 2009-09-09 08:06:28

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED]exists in filesystem

A simpler way would have been : pacman -S --needed $(cat pkglist)
smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#6 2009-09-09 09:20:35

OMGitsUGOD
Member
Registered: 2009-08-27
Posts: 21

Re: [SOLVED]exists in filesystem

Oh, perhaps I should learn how pacman actually works before I mess up things even more wink

Offline

Board footer

Powered by FluxBB