[solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

Allan had problems with his webhost: http://identi.ca/notice/87871795 After I have added
[allanbrokeit]
Server = http://allanmcrae.com/$repo/$arch
to my pacman.conf, I couldn't use update and install packages anymore:
[karol@black ~]$ pacman -Syu
warning: database file for 'allanbrokeit' does not exist
:: Synchronizing package databases...
testing is up to date
community-testing is up to date
core is up to date
extra is up to date
community is up to date
error: failed retrieving file 'allanbrokeit.db' from allanmcrae.com : The requested URL returned error: 404
error: failed to update allanbrokeit (download library error)
:: Starting full system upgrade...
error: failed to prepare transaction (could not find database)
[karol@black ~]$ pacman -S hdparm
warning: database file for 'allanbrokeit' does not exist
error: failed to prepare transaction (could not find database)
hdparm is in [core]. pacman 3.5.4-4 throws a bunch of errors
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
but works and allows me to update and install stuff.
Is it a feature of pacman 4?
Allan's repo seems to be already back online, so you have to test it with some nonexistent repo & db.
Last edited by karol (2012-01-07 22:48:29)

Dan responded to my e-mail:
Dan McGee wrote:
Yes, this was mostly an intended change.
Note that you can do an -R operation (or anything not requiring sync databases) just fine. However, once we hit any machinery that requires sync databases to be present, we require all configured ones are accounted for. This is for a few reasons:
1) dependency resolving if you have 1 out-of-date database and 4 up-to-date ones, things can get ugly or messed up.
2) integrity- if you insist on a database being signed, we'd rather not proceed with nothing.
3) replay attacks- what you don't fully see in the above situation is we also validate the signature on the database at load time; if that were to fail we'd also bail out. This is so pacman is capable of verifying the expiration time on a database signature; it makes sense to only allow database signatures to be valid for a week at a time so people know they have out-of-date repo metadata.
Closing.

Similar Messages

  • Kdemod removed from pacman.conf but not from /var/lib/pacman

    Hello all
    I have been using kdemod repository for some time.
    Since I use Gnome I have removed all my kde/qt applications and I have removed kdemod repository from pacman.conf
    Is it normal to still have kdemod into /var/lib/pacman ?
    Can I safely remove /var/lib/pacman/kdemod (not /var/lib/pacman of course) ?
    Why pacman does not remove it when syncing if no more present in pacman.conf ?
    Is it a bug ? a feature ?
    Thank you for your help !
    Cheers,
    Chicha.

    shining wrote:I think this has little interest, since the repo will be downloaded again on next -Sy anyway.
    It's probably neither a bug, nor a feature, rather the lack of a feature, because checking that
    some folders in /var/lib/pacman/ doesn't match a section in pacman.conf would require extra code.
    Ooops I thought I checked for this hehe.
    Are you sure pacman downloads the whole database everytime?
    I just did an update:
    yaourt -Sy
    :: Synchronizing package databases...
    testing is up to date
    current is up to date
    extra 270.5K 299.4K/s 00:00:01 [##################################################] 100%
    community 291.4K 302.8K/s 00:00:01 [################################################] 100%
    compiz-fusion is up to date
    local database is up to date
    If a repo is uptodate it doesn't download the database, so pacman must check that somehow.
    Also, it show that to sync extra, 270.5K was transferred, is that the entire extra repo?
    When I check the size of /var/lib/pacman/extra it's 5.7 Megs. Maybe the repo is compressed,
    transferred, and then decompressed on each sync.
    If that's the case, as you say my argument doesn't hold much water

  • [solved] bigpkg doesn't like /var/lib/pacman/local/ALPM_DB_VERSION

    I can't use bigpkg anymore, because it expects everything in /var/lib/pacman/local/ to be a directory:
    https://aur.archlinux.org/packages/bigpkg/ -> http://allanmcrae.com/scripts/bigpkg
    Here are the important lines:
    LOCAL_DB_PATH="/var/lib/pacman/local"
    file = LOCAL_DB_PATH + "/" + dir + "/desc"
    f = open(file, "r")
    After running 'pacman-db-upgrade', /var/lib/pacman/local/ALPM_DB_VERSION was placed there
    $ pacman -Qo /var/lib/pacman/local/ALPM_DB_VERSION
    error: No package owns /var/lib/pacman/local/ALPM_DB_VERSION
    $ cat /var/lib/pacman/local/ALPM_DB_VERSION
    9
    $ bigpkg
    Traceback (most recent call last):
    File "/usr/bin/bigpkg", line 83, in <module>
    parse_package_info(pkg, dir)
    File "/usr/bin/bigpkg", line 51, in parse_package_info
    f = open(file, "r")
    NotADirectoryError: [Errno 20] Not a directory: '/var/lib/pacman/local/ALPM_DB_VERSION/desc'
    I can remove that file and make bigpkg work again, but it breaks pacman:
    error: failed to initialize alpm library
    (database is incorrect version: /var/lib/pacman/)
    error: try running pacman-db-upgrade
    Is it a bug? If not, can someone please fix bigpkg? I don't speak python, so I can't do it myself :-(
    Last edited by karol (2015-01-16 18:50:59)

    progandy wrote:
    I believe you can use bigpkg if you patch it like this:
    for dir in os.listdir(LOCAL_DB_PATH):
    try:
    pkg = dir[0:dir.rindex("-",0,dir.rindex("-"))]
    pkg_list.append(pkg)
    parse_package_info(pkg, dir)
    except ValueError:
    pass
    Can you post a diff? I have no idea where to put it.
    bigpkg complains
    $ /usr/bin/bigpkg_patched
    Traceback (most recent call last):
    File "/usr/bin/bigpkg_patched", line 53, in <module>
    pkg_list.append(pkg)
    NameError: name 'pkg_list' is not defined
    if I try to use the part you posted before the line that says
    pkg_list = []
    but I still have problems with
    file = LOCAL_DB_PATH + "/" + dir + "/desc"
    f = open(file, "r")

  • Create Package from /var/lib/pacman/local[SOLVED]

    I am trying to get an old version of google earth bcz the 5.2 in aur doesn't start for me.  I have it installed on another system but there is not package in /var/cache/pacman/pkg.  Is it possible for me to create a package based on the info written by pacman in /var/lib/pacman/loca/google-earth-x.xx.?
    Last edited by empthollow (2010-07-19 04:02:19)

    You need a PKGBUILD.
    Edit:
    Who would have thought that AUR packages write to /var/lib/pacman/local ? ;P
    I stand corrected: you don't necessarily need a PKGBUILD, you can use bacman.
    you can download the previous Google Earth binary from this link
    http://dl.google.com/earth/client/advan … hLinux.bin
    Last edited by karol (2010-07-19 03:59:29)

  • [Solved] error could not open file /var/lib/pacman/sync/core.db

    I am trying to install Arch but when I type "pacstrap /mnt base base-devel"  I keep on getting this error "error could not open file /var/lib/pacman/sync/core.db unrecognized archive format".
    I have tried:
    # rm -R /var/lib/pacman/sync/
    # pacman -Syuf
    I have also tried pacman -Syy with no luck.
    What more is there to do besides installing ubuntu?
    Last edited by johane (2012-08-11 08:22:07)

    johane wrote:
    I am trying to install Arch but when I type "pacstrap /mnt base base-devel"  I keep on getting this error "error could not open file /var/lib/pacman/sync/core.db unrecognized archive format".
    I have tried:
    # rm -R /var/lib/pacman/sync/
    Pacstrap was telling you it couldn't open a file, so you just deleted the entire directory tree? Did it appear to be downloading the database files correctly before this? Did you try running pacstrap again after you deleted everything?
    And then you tried to run pacman with the -f (force) option? What happened? "no luck" doesn't tell us anything.
    What more is there to do besides installing ubuntu?
    There are many things you can do. You can give us more information about what you did and what happened. Did you follow all the steps in the Beginners Guide up to the pacstrap step? Did you get any errors or warnings before that step? Are you sure you had a working network connection? Did you interrupt the pacstrap process at any time? Did you try running it again after you deleted /var/lib/pacman/sync?
    Did you check the sha1sum of the iso you downloaded before you put it on a usb stick?
    https://wiki.archlinux.org/index.php/Be … oaded_file
    How did you put it on the usb stick?
    When you got the error, did you do
    ls /var/lib/pacman/sync
    to see what (if anything) was there?
    Last edited by 2ManyDogs (2012-08-06 23:38:27)

  • [SOLVED] error: could not open file /var/lib/pacman/local/qt-4.5.2-4/

    Hi all,
    So there I was, running pacman -Syu on all my Arch machines, and I get to my desktop PC at work, and half way through X decides to crash and kick me back to the CLI. Fair enough
    Now when I try and use pacman, I get a whole bunch of errors about a missing 'depends' directory:
    root ~ # pacman -S amarok
    resolving dependencies...
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    looking for inter-conflicts...
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    error: could not open file /var/lib/pacman/local/qt-4.5.2-4/depends: No such file or directory
    It still asks me to continue with installing the new package, but I'd rather get this fixed first in case it buggers it up worse
    Last edited by fukawi2 (2009-07-30 05:44:25)

    Once again my saviour Allan -- I had to -Sf it due to file already existing, but seems to be good now

  • [Solved] /var/lib/pacman wrap defined in /etc/fstab

    How come is it that the ext2 wrap of /var/lib/pacman won't work?
    See here:
    1.
    /var/lib/pacman.db /var/lib/pacman ext2 loop,defaults 0 0
    [det@myhost ~]$ sudo mount -a
    mount: wrong fs type, bad option, bad superblock on /dev/loop1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so
    [det@myhost ~]$
    2.
    #/var/lib/pacman.db /var/lib/pacman ext2 loop,defaults 0 0
    [det@myhost ~]$ sudo mount -a
    [det@myhost ~]$
    E: dmesg | tail:
    [det@myhost ~]$ dmesg | tail
    VFS: Can't find an ext2 filesystem on dev loop1.
    [det@myhost ~]$
    Last edited by algorythm (2009-09-30 12:35:04)

    Uh.. actually running the pacman cage shell script fixed this.. ^^
    D'oh my brains had probably gone to school.
    Last edited by algorythm (2009-09-18 21:57:48)

  • Files in /var/lib/pacman/local newer than in extra? [solved]

    Earlier today tried pacman -Syu and got the following message:
    bash-3.00# pacman -Syu
    :: Synchronizing package databases...
    :: testing is up to date
    :: current is up to date
    :: extra is up to date
    :: unstable is up to date
    :: community is up to date
    :: a52dec: local (0.7.4-3) appears to be newer than repo (extra/0.7.4-2)
    :: arts: local (1.4.2-4) appears to be newer than repo (extra/1.4.1-1)
    :: dbus: local (0.50-2) appears to be newer than repo (extra/0.34-1)
    :: eject: local (2.1.2-2) appears to be newer than repo (extra/2.0.13-1)
    :: faac: local (1.24-2) appears to be newer than repo (extra/1.24-1)
    :: ffmpeg: local (20050806-1) appears to be newer than repo (extra/0.4.9.pre1-1)
    :: gnokii: local (0.6.7-2) appears to be newer than repo (extra/0.6.7-1)
    :: gpgme: local (1.0.3-2) appears to be newer than repo (extra/1.0.3-1)
    :: gst-plugins: local (0.8.11-1) appears to be newer than repo (extra/0.8.10-1)
    :: gstreamer: local (0.8.11-1) appears to be newer than repo (extra/0.8.10-1)
    :: gwenview: local (1.3.0-2) appears to be newer than repo (extra/1.2.0-1)
    :: hal: local (0.5.4-1) appears to be newer than repo (extra/0.5.3-1)
    :: jack-audio-connection-kit: local (0.100.0-3) appears to be newer than repo (extra/0.100.0-1)
    :: jasper: local (1.701.0-3) appears to be newer than repo (extra/1.701.0-2)
    :: k3b: local (0.12.4a-1) appears to be newer than repo (extra/0.12.2-1)
    :: kde-common: local (3.4.2-6) appears to be newer than repo (extra/3.4.1-1)
    :: kdeaccessibility: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdeaddons: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: kdeadmin: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdeartwork: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdebase: local (3.4.2-5) appears to be newer than repo (extra/3.4.1-4)
    :: kdebindings: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdeedu: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: kdegames: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdegraphics: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: kdelibs: local (3.4.2-5) appears to be newer than repo (extra/3.4.1-2)
    :: kdemultimedia: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: kdenetwork: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-2)
    :: kdepim: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: kdesdk: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdetoys: local (3.4.2-3) appears to be newer than repo (extra/3.4.1-1)
    :: kdeutils: local (3.4.2-4) appears to be newer than repo (extra/3.4.1-1)
    :: libgphoto2: local (2.1.6-2) appears to be newer than repo (extra/2.1.6-1)
    :: libidn: local (0.5.17-2) appears to be newer than repo (extra/0.5.17-1)
    :: libieee1284: local (0.2.10-2) appears to be newer than repo (extra/0.2.10-1)
    :: libmal: local (0.40-2) appears to be newer than repo (extra/0.40-1)
    :: libmpcdec: local (1.2-2) appears to be newer than repo (extra/1.2-1)
    :: libraw1394: local (1.1.0-2) appears to be newer than repo (extra/1.1.0-1)
    :: libsamplerate: local (0.1.2-2) appears to be newer than repo (extra/0.1.2-1)
    :: musicbrainz: local (2.1.1-3) appears to be newer than repo (extra/2.1.1-2)
    :: net-snmp: local (5.2.1-3) appears to be newer than repo (extra/5.2.1-2)
    :: openexr: local (1.2.2-4) appears to be newer than repo (extra/1.2.2-1)
    :: openslp: local (1.2.0-2) appears to be newer than repo (extra/1.2.0-1)
    :: pilot-link: local (0.11.8-4) appears to be newer than repo (extra/0.11.8-3)
    :: pth: local (2.0.3-2) appears to be newer than repo (extra/2.0.3-1)
    :: qscintilla: local (1.6-1) appears to be newer than repo (extra/1.5.1-1)
    :: qt: local (3.3.5-1) appears to be newer than repo (extra/3.3.4-8)
    :: sane: local (1.0.16-2) appears to be newer than repo (extra/1.0.15-5)
    :: speex: local (1.1.10-3) appears to be newer than repo (extra/1.1.10-1)
    :: t1lib: local (5.1.0-1) appears to be newer than repo (extra/5.0.2-1)
    :: taglib: local (1.4-2) appears to be newer than repo (extra/1.3.1-2)
    :: tunepimp: local (0.3.0-5) appears to be newer than repo (extra/0.3.0-4)
    :: Above packages will be skipped.  To manually upgrade use 'pacman -S <pkg>'
    How did this happen and what can I do to fix it. I mean, obviously all the files shown in local were downloaded using pacman, so how can the local version be greater than the individual versions found in current, extra, testing, unstable or community?!!
    Thanks,
    Gary :x
    Figured this out. Apparently the first mirror listed in the /etc/pacman.d extra file is out of sync. Commented out the first two. Ftp.arch is working fine. Updated the extra db and found two apps needed updating. No more errors, since the /var/lib/pacman/extra directory was completely updated. Will try the original mirror in a few days. 

    Yep, loads of files were updated earlier today, so the mirrors were mostly out of sync for a while.  Look here for more info:
    http://bbs.archlinux.org/viewtopic.php?t=15505

  • [SOLVED] pacman error: could not open file /var/lib ...

    the actual error is
    error: could not open file /var/lib/pacman/sync/community/fonteditfs-1.2-2/desc: No such file or directory
    removing that folder fixed it. i dont know if it was a coding mistake or just my box did something stupid today :S
    any thoughts?
    Last edited by eldragon (2010-04-20 17:25:18)

    geniuz wrote:
    I don't know if this error occured during an update of right after you've invoked pacman, but in any way synchronizing pacman I think should fix the issue. This is something you might have tried before deleting the file, but then again I don't know when the error occured. If it occured immediately deleting the file would probably be the easiest solution. I would've done the same.
    If you've synchronized pacman after you've removed the file all should be well now, maybe something indeed went wrong during an update (maybe your mirror went down or something, you never know).
    yes, the error apperared right after syncing the databases. the update went as expected...

  • I lost my /var/lib/pacman/local

    Yes I did. Just when the "stable" version of pacman got the new pacman-optimize script.
    Because optimizing failed with some md5sum error and because I'm a "smart" & "do it my way" tipe of guy, I figured that removing everything under /var/lib/pacman should solve the error :oops:. Guess what, it did, but it also removed my installed packages list.
    After a few searches on the forum, I think it did it for good. Now I am doomed to "reinstall" every little package in order to rebuild that dir. Well not quite every, since dependecy helps a little here.
    I think I have to start with something like "gnome-extras xmms-status-plugin iproute". A few others will follow just as soon as I remeber them.
    If any of you can disagree with the solution, I would be most happy to try anything (almost), since my connection is not particularly fast.
    PS: pacman -Scc was involved so cache is not an option.

    There's a patch for the wrong sums issue. It replaces tar c with tar --same-order -c. It can be found in the bug tracker..
    I would suggest backing up /etc/ and /home/ and reinstall. I think your asking for trouble trying to remember all the packages you installed when you consider dependancies and conflicts.
    Considering how important that directory is, you may want to consider running a simple line as a cronjob every night such as:
    pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' > filelist
    that will echo all the packages you have installed on your machine and put them into a file in a format where all you have to do is add pacman -Sy --noconfirm and it will reinstall all the packages you had.

  • Defragmentation of /var/lib/pacman/ (reiserfs)

    on my laptop i run arch from 0.4 and since then i have over 1200 packages installed. i used reiserfs and realized now, that it accumulated a certain amount of fragmentation over time and is now accessing /var/lib/pacman/ very slowly (that's why pacman sometimes takes very long do to anything) ... coupled to this, the hdd on this laptop is not the fastest ...
    now i just for fun tried something i didn't believe really that it would help but it helped a lot (pacman is now much faster) - what i did:
    [root@Asteraceae lib]# pwd
    /var/lib
    [root@Asteraceae lib]# cp -r pacman/ pacman_cpy/
    [root@Asteraceae lib]# rm -r pacman
    [root@Asteraceae lib]# mv pacman_cpy/ pacman/
    this defragmented the big collection of small files stored across my hdd to one place and now pacman is much faster

    apeiro wrote:
    Wow, that's a good (and simple!) idea, Damir.
    It might be a good thing to include as a pacman option itself.
    pacman --dbmaint or some such.
    thank you. this really helped me with speed of pacman but i feel it more a workaround (a very effective one!) than the solution. however, as it really solves the problem, i can live with this workaround ;-)
    yet another idea towards the solution i can think of now is to use a tarball to store everything and using a ramdrive while working with these files (extract everything from tarball to ramdrive and mount it @ /var/lib/pacman (at boot) and copy everything back to tarball when something is updated (e.g. pacman is run)). this would keep it simple but minimize the accumulation of a defragmentation to a minimum (on the hdd, the whole db will be a single file that is only used as a mirror to the ramdrive)
    including such a workaround in pacman i don't mind but other people will say that this is not a good solution (one of my colleagues at the uni already laughted at me using such "primitive" methods against defragmentation, but i told him that it worked great and is very effective and i don't mind if it is "primitive" or not as long as it does the job). also there will be others to claim that this is unneccessary as everybody can do a cp -r and then rm and then mv by hand.

  • Lost /var/lib/pacman

    Hey guys!
    I've lost my /var/lib/pacman directory. (No! I did not delete it!)
    Is there any chance of getting it back? [..]/current and [..]/extra is not hard, but is there any chance to get [..]/local back?
    Regards,
    Moritz

    Some time ago it happened to me also, I do not know why.
    Probably in /var/cache/pacman/pkg you should have the last pacman you installed, unless you cleaned the cache.
    In reality pacman package are tar.gz of the installation tree
    So copy the file in a directory and decompress it then copy the files in the relative directory.
    If you feel enought confident you can uncompress it directly from root, but I DO NOT suggest it.
    If you do not have the package in the cache you can download it from
    http://darkstar.ist.utl.pt/archlinux/cu … pkg.tar.gz
    Post again if you need more assistance

  • Accidentally RM'd contents of /var/lib/pacman/local/

    I have been working on setting up a new workstation for myself, and getting it to be consistent with the old workstation that I had (with the exception of encrypting all of / this time rather than just encrypting /home).  Have been working on this for some time now and due to many frustrations (hardware related), lack of sleep and too many terminal sessions I ended up running an RM command inside /var/lib/pacman/local, removing all contents.
    I need to find a way to rebuild this if at all possible.  I'm thinking parsing out the package names from the pacman.log and then running reinstall for all things, however that is not really an ideal/clean solution.  Is there a better one that someone can point me to?  I found this: https://bbs.archlinux.org/viewtopic.php?pid=670876 however that seems to provide a list, without explaining further steps and I believe that I can get a list out of pacman.log which should be 100% accurate ... something like: yaourt -S `cat /var/log/pacman.log | grep "\[PACMAN\] installed" | awk '{print $5}' | sort | tr '\n' ' '`
    Open to suggestions on this.  I really do not want to have to start over ... again
    Thanks
    B

    ...or you can post the solution that worked for you so other users who may happen across it and can learn from it.
    https://wiki.archlinux.org/index.php/Fo … way_Street
    Last edited by graysky (2013-10-15 20:26:26)

  • Tar'ing up /var/lib/pacman...

    I'm using a script somewhat modified I saw here on the forum to help clean up the system;
    #!/bin/bash
    # Run this daily after an update (pacman -Syyu),
    #tar -cjf /store/bak/pacman-database.tar.bz2 /var/lib/pacman/local
    #pacman -Rscn $(pacman -Qtdq)
    pacman -Sc
    pacman -Scc #(only run to clean out all of /var/cache/pacman/pkg)
    pacman-optimize && sync
    updatedb
    exit 0
    I commented out the first tar line since I don't have a database tared up and also the second line because it will show this message when run; error: no targets specified (use -h for help)
    I really don't think I need these lines...
    So for the rest when it's done running I get this messages in it; (The second line is what I'm wondering about, what is it taring up and where? I don't see anything that was tared..)
    Database directory cleaned up
    ==> MD5sum'ing the old database...
    ==> Tar'ing up /var/lib/pacman...
    ==> Making and MD5sum'ing the new database...
    ==> Syncing database to disk...
    ==> Checking integrity...
    ==> Rotating database into place...
    THANKS

    ngoonee wrote:
    You're not even trying to help yourself, karol has given you more than enough help. The lines come from pacman-optimize, so look at that.
    Moving to Newbie Corner since it'd just clutter on Pacman & Package Upgrade Issues.
    Well I'm sorry I am trying and I'm not getting it...
    There is no pacman-optimize in man pacman and there is no man pacman-optimize and I don't see any info surfing Google...
    Where can I read info on what pacman-optimize is doing as far as the Tarball is concerned?
    1. How is this command suppose to work?
    tar -cjf /store/bak/pacman-database.tar.bz2 /var/lib/pacman/local
    2. Tar'ing up /var/lib/pacman...  Where is this tar at?
    3. What is this script is this something else I should be adding to the one I already have?
    # remove the lock file and our working directory with sums and tarfile
    rm -f "$lockfile"
    rm -rf "$workdir"
    So what really remains is that script above I'm using do I need to keep the first two lines are they important and if so, for the first one, was this something customized someone made specific to their needs and not just a general Arch command that should simply work on everyone's box?
    THANKS
    Last edited by DasFox (2011-11-21 23:49:23)

  • /var/lib/pacman/local problems

    So don't ask how(cause I really don't know), but I restarted my computer last night after having an uptime of ~5 days.  When it started back up I get a bunch of X-server errors.  I track down the errors and find that some /var/ files are missing.  I 'cd' over to var and see that there isn't a thing in the folder.  So I really don't know how this happened(but obviously my fault), but I was wondering if there was anyway of regenerating the /var/lib/pacman/local files so pacman will recognize which packages are installed already?  or am I in trouble?
    Thanks in advance.

    sykotik wrote:
    So don't ask how(cause I really don't know), but I restarted my computer last night after having an uptime of ~5 days.  When it started back up I get a bunch of X-server errors.  I track down the errors and find that some /var/ files are missing.  I 'cd' over to var and see that there isn't a thing in the folder.  So I really don't know how this happened(but obviously my fault), but I was wondering if there was anyway of regenerating the /var/lib/pacman/local files so pacman will recognize which packages are installed already?  or am I in trouble?
    Thanks in advance.
    I'd just grab an endpoint package - like mplayer... it should make sure to grab X and things like that - just force the installs - if a package fails to install due to existing files, you're on the right track lol

Maybe you are looking for