You are not logged in.

#1 2009-07-17 05:36:03

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Is there something that auto reinstalls old packages from cache?

You pacman -Syu and something broke - you dont have time to figure out what. All you know is that 20 minutes ago your configuration worked and that you have not pacman -Sc yet. You can figure out later what went wrong, right now you just want a worked system.

Is there something that already that scans the cache and at least lists the packages that are in the cache that are not installed? So that you can quickly just pacman -S $(them) ???

Offline

#2 2009-07-17 06:30:42

benob
Member
Registered: 2008-11-11
Posts: 187

Re: Is there something that auto reinstalls old packages from cache?

pacman -U /var/cache/pacman/pkg/name-older_version.tar.gz

Offline

#3 2009-07-17 07:20:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Is there something that auto reinstalls old packages from cache?

ptchinster wrote:

Is there something that already that scans the cache and at least lists the packages that are in the cache that are not installed?

Pacman doesn't do that, if that's what you mean. You would need to script something yourself.

More generally, if you're following the recommended guidelines, you will have read the news etc before pacman -Syu, so if something breaks you will be prepared for it.

Offline

#4 2009-07-17 08:12:33

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Re: Is there something that auto reinstalls old packages from cache?

benob wrote:

pacman -U /var/cache/pacman/pkg/name-older_version.tar.gz

Complete NOT of what i was asking.

@tomk Right, i knew pacman didnt have that functionality. I was seeing if anybody knew of something (like yaourt or something) that was already coded like that. I know you should read the news but - sometimes the news needs to happen before it comes news, and it sometimes sucks when you are the guy. I know there have been times when i sat and tinkered with a broken update and there was a time when i just needed the thing working. Thats where this script-that-i-guess-hasnt-been-written-yet would come into play.

Offline

#5 2009-07-17 09:05:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Is there something that auto reinstalls old packages from cache?

Actually,you shold look at the Arch Rollback Machine - details on the Downgrade Packages wiki page. I didn't think of it when I replied earlier.

ptchinster wrote:

there was a time when i just needed the thing working.

I dont want to labour the point here, but if you need it working at a specific time, that would NOT be the time to do a system upgrade - agreed?

Offline

#6 2009-07-17 20:50:36

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Re: Is there something that auto reinstalls old packages from cache?

Valid point - however i know i have this odd tendancy to, if im ever "idle" at my termincal because i have to think about what i need to type or something, ill do "c" which i have aliased to "clear" or "update" which i have aliased to pacman -Syu. Im one of these people who would be standing up and a meeting going, "Hi Im ptchinster." (crowd: Hi ptchinster) "Its been 20 sec since my last pacman -Sy".

Just asking something like this was around, maybe ill code it.

Offline

#7 2009-07-17 21:00:24

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Is there something that auto reinstalls old packages from cache?

one-liners ftw!

pacman -Q | while read name vers; do LC_ALL=C; find /var/cache/pacman/pkg -name $name* | grep -v $vers | sort -r | head -n1; done

lists highest version of all installed packages found in your cache not including the installed version.  good luck managing that output big_smile

/edit: the better approach would be to tail /var/log/pacman.log and reverse whatever the -Syu just did using the pacman -U command mentioned before.

/edit2: at eldragon below: useless use of cat is useless wink

Last edited by brisbin33 (2009-07-17 21:13:58)

Offline

#8 2009-07-17 21:11:34

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Is there something that auto reinstalls old packages from cache?

you could actually write the script yourself, since you are appranetly the only one needing this feature..

cat /var/log/pacman.log | grep ugraded would drop a list of upgrades.. and doing a bit of sed, awk, and what not, you could revert those giving a given timestamp..

Offline

#9 2009-07-31 15:31:02

ptchinster
Member
Registered: 2008-12-27
Posts: 45

Re: Is there something that auto reinstalls old packages from cache?

brisbin33 wrote:

one-liners ftw!

/edit: the better approach would be to tail /var/log/pacman.log and reverse whatever the -Syu just did using the pacman -U command mentioned before.

Log files can and do get rotated. Im sticking with whats in the cache and comparing it from that.

Offline

Board footer

Powered by FluxBB