(SOLVED) Slapt-get --reinstall question

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
linus72
Posts: 79
Joined: 1. Dec 2009, 00:12

(SOLVED) Slapt-get --reinstall question

Post by linus72 »

I need to reinstall all packages as I accidently deleted parts of /usr (doah!)
but can't figure out how to get slapt-get to reinstall all packages from a to xap, etc
thanks for any help!
Last edited by linus72 on 16. Dec 2011, 21:11, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: Slapt-get --reinstall question

Post by gapan »

Code: Select all

for i in `ls /var/log/packages/|sed "s/\(.*\)-\(.*\)-\(.*\)-\(.*\)/\1/"`; do slapt-get -i --reinstall $i; done
edit: fixed -u to -i
Image
Image
linus72
Posts: 79
Joined: 1. Dec 2009, 00:12

Re: Slapt-get --reinstall question

Post by linus72 »

Ok that looks good but it didnt work
it just keeps updating

I removed the -u but it still doesn't work...
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: Slapt-get --reinstall question

Post by gapan »

It keeps updating what? Packages? Isn't that what you wanted?
Image
Image
linus72
Posts: 79
Joined: 1. Dec 2009, 00:12

Re: Slapt-get --reinstall question

Post by linus72 »

no, it keeps updating the package lists infinitum, but no packages are downloaded or upgraded..
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Slapt-get --reinstall question

Post by Shador »

Image
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: Slapt-get --reinstall question

Post by gapan »

Ouch. Sorry, my bad, I mistyped there. Change "-u" to "-i".
Image
Image
linus72
Posts: 79
Joined: 1. Dec 2009, 00:12

Re: Slapt-get --reinstall question

Post by linus72 »

Ok
thanks Gapan and Shador!
it all worked out and I have two very helpful scripts!
thanks!
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Slapt-get --reinstall question

Post by laprjns »

linus72 wrote:...it all worked out and I have two very helpful scripts!
I learned the hard way that after executing the reinstall-everything script you should do a lilo -v before reboot. I got a "Kernel setup stack overlaps lilo second stage" error and couldn't boot into Salix.
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Slapt-get --reinstall question

Post by Shador »

laprjns wrote:
linus72 wrote:...it all worked out and I have two very helpful scripts!
I learned the hard way that after executing the reinstall-everything script you should do a lilo -v before reboot. I got a "Kernel setup stack overlaps lilo second stage" error and couldn't boot into Salix.
Never hit such a problem myself as I'm using grub2 on my systems. But yes this can happen as the kernel package is reinstalled also, i.e. the kernel image /boot/vmlinuz-* is recreated and the fs can put the new file on different blocks (actually it's free to do so even when files are not modified at all, but most common fs as of now don't unless you e.g. use defragmentation of course). The usage of blocklists is one major downside lilo has.
Anyway, I added a note mentioning this problem to the wiki.
Image
Post Reply