You are not logged in.

#1 2005-07-07 22:28:00

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

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.

Offline

#2 2005-07-07 22:44:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: I lost my /var/lib/pacman/local

There's no other way to do it... the rm command doesn't have a recycle bin... it's gone and you'll have to reinstall it all.

sad

Offline

#3 2005-07-07 23:01:28

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

Re: I lost my /var/lib/pacman/local

Thanks for the fast reply.
And btw, if there was some sort of "recyle bin" in rm, I'm pretty sure it did not helped me. I alwas used to SHIFT+delete in windows (and FAR), but strange enough, never bothered to disable it. I guess this is what one could call "bad habbits".
(the must be some grammar error in there)

But how about some way to protect packages database?
At least rename /var/lib/pacman/local to /var/lib/pacman/local-DO-NOT-DELETE

Offline

#4 2005-07-07 23:08:22

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: I lost my /var/lib/pacman/local

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.

Offline

#5 2005-07-07 23:23:15

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: I lost my /var/lib/pacman/local

If you're using reiserfs and want to try to get that lost directory back have a look at this thread:
http://bbs.archlinux.org/viewtopic.php? … recovering

Offline

#6 2005-07-07 23:25:55

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

Re: I lost my /var/lib/pacman/local

I made a note for the patch and will check it out later.
As for the (re)pacman -S *all* vs. reinstall arch it may not be my case.
I only run a complete gnome + some firewall needed packages + few media packages.
For the dev part I do, I only use outside arch stuff. Those do not require reinstall or anything.
The filelist ideea is indeed a good one. I just added it in cron.daily
Got to read man thou since all jobs starting at 00:02 dose not suit me.
One last issue, with pacman -Sy --noconfirm. How to solve firefox and nss-nspr issue without human intervention (ie. pacman -S nss-nspr then pacman -S firefox)?

Offline

#7 2005-07-07 23:33:22

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: I lost my /var/lib/pacman/local

I maintain anacron in AUR. It does jobs on boot up. It might interest you.

Offline

#8 2005-07-08 03:09:45

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: I lost my /var/lib/pacman/local

epo wrote:

But how about some way to protect packages database?
At least rename /var/lib/pacman/local to /var/lib/pacman/local-DO-NOT-DELETE

if you deleted the whole thing, you were root... and no matter what you can still delete it.  what you're asking for is protection from mistakes...

Offline

#9 2005-07-08 03:15:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: I lost my /var/lib/pacman/local

usually it's a general rule of thumb to not remove anything outside your home directory when you dont know what it is. so the 'do not remove' name is unneccesary.

Offline

#10 2005-07-08 06:17:48

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

Re: I lost my /var/lib/pacman/local

Thank you all for your input. As I write this, wget is still working hard to fix my mistake. Of course I use my own mirror for that.
I'll try to pollish the backup script a bit, by adding the pacman.lck thing and use tar --listed-incremental instead of pacman -Q <parse>. It will be a cron (maybe anacron) job.

Offline

#11 2005-07-08 08:22:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: I lost my /var/lib/pacman/local

You shouldnt need to create a backup script, just dont remove your database in the first place.

Offline

#12 2005-07-08 10:31:51

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: I lost my /var/lib/pacman/local

i could mail you my database but i'm not using gnome so maybe it's better if you get it from someone who does,

it's just to tar it up and you should be ready to go again without having to reinstall anything at all,


arch + gentoo + initng + python = enlisy

Offline

#13 2005-07-08 10:43:41

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

Re: I lost my /var/lib/pacman/local

Thank you, but it is not necessary. I already did the pacman -Sf *all* thing and solved most of the /etc/*.pacnew & /etc/*.pacorig(??)  which were just a few anyways.
It will take about 15 more mins to see if "all systems go" when I get back from work. The worst part is with fonts setup. I do remember I did some font packages installation, including Microsoft for some documents I need to send to MS Word users. But then again I may not need to update those any time soon.

Offline

#14 2005-07-08 10:54:49

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: I lost my /var/lib/pacman/local

ok,
hope you fix it,


arch + gentoo + initng + python = enlisy

Offline

#15 2005-08-16 22:32:04

Cron0
Member
Registered: 2005-01-25
Posts: 14

Re: I lost my /var/lib/pacman/local

I moved to arch a couple days ago and leaved 2 years of gentooing behind.
So far I'm really impressed with Arch and plan on keeping it for a long time!

But here, I guess I was too used to deleting stuff there on gentoo and I deleted the /var/lib/pacman/* files.
I'd like to know what are the default packages in a "base"-only install?

Can I find that on the ArchLinux CD?

TIA
cron0

Offline

#16 2005-08-16 23:03:54

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: I lost my /var/lib/pacman/local

yup, base packages are on the disc. It may be easier though to just do

pacman -Sy `ls /var/abs/base`

If you deleted that entire directory and you know you installed more than just the base, your best off reinstalling. Its not good to have a bunch of unaccounted for packages laying on your hard drive that pacman doesn't know about wink

Offline

#17 2005-08-17 09:36:25

epo
Member
From: Romania , Iasi
Registered: 2005-06-06
Posts: 20

Re: I lost my /var/lib/pacman/local

Sure you can.
Just go to arch site click on Packages and slect Base in Category dropdown.
It will load this link http://www.archlinux.org/packages.php?s … ate=&pp=50

Offline

#18 2005-08-17 10:51:06

Cron0
Member
Registered: 2005-01-25
Posts: 14

Re: I lost my /var/lib/pacman/local

Penguin wrote:

yup, base packages are on the disc. It may be easier though to just do

pacman -Sy `ls /var/abs/base`

If you deleted that entire directory and you know you installed more than just the base, your best off reinstalling. Its not good to have a bunch of unaccounted for packages laying on your hard drive that pacman doesn't know about wink

Thanks that should do it!
I haven't installed much since my initial install! :-)

cron0

Offline

#19 2005-08-17 11:04:03

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: I lost my /var/lib/pacman/local

remember, that will install both bootloaders (lilo and grub) and won't reinstall your kernel. (I'm sure you can think of some others but you get my point)

Offline

#20 2005-09-27 19:26:59

spanommers
Member
Registered: 2005-09-09
Posts: 10

Re: I lost my /var/lib/pacman/local

I remember reading something about an "immutable" flag you can set on certain filesystems. I think it's something like a "chattr +i <file/directory>". The idea is that no one, not even root, can delete a file with the immutable flag set. I never use it, always seemed like too much trouble, but interesting $.02 tip.

Offline

Board footer

Powered by FluxBB