You are not logged in.

#1 2008-11-20 20:05:20

Mr. Swillis
Member
Registered: 2008-06-24
Posts: 54

[SOLVED] Question about Saving Cached Packages

Hey Guys,

I've got a couple of systems running Arch right now, and have a 3rd that I was thinking about setting up this weekend. The second of the 2 I already have is very recent and I haven't cleared out the package cache yet. If I were planning on installing the same applications on the next system, could I just save the package files in /var/cache/pacman to a CD or something and just copy them back to the new system once I have the CORE installed? I figure this would save an hour or so of downloading, which would be nice. If it is possible, is there anything else I need to have aside from the packages themselves (ie. is there like a header file somewhere)?

Thanks!

Swill

Last edited by Mr. Swillis (2008-11-21 06:01:15)


And you ate the whole... wheel of cheese? How'd you do that? Heck, I'm not even mad; that's amazing.

Offline

#2 2008-11-20 20:18:12

cybermage
Member
From: Czech Republic
Registered: 2008-11-19
Posts: 12

Re: [SOLVED] Question about Saving Cached Packages

Well - it could work - or it might not. Better solution is to make another repository using your recent packages.
Try to write this to your /etc/pacman.conf:

[name_of_your_own_repo]
Include = /path_to_your_own_repo

I haven't tried it personally, but it should work. If it will prefer packages from other repos (community, extra), then write it somewhere above other repos in /etc/pacman.conf or use pacman -S name_of_your_own_repo/package

You should read about Pacman at Arch-wiki to know more about making your own repository before you will decide to try it.

Either way, write your experience here, please, I'd want to know if it works or not smile

Last edited by cybermage (2008-11-20 20:19:41)

Offline

#3 2008-11-20 20:22:33

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED] Question about Saving Cached Packages

Edit: I'm not sure why I quoted the entire OP...

This should work as expected.  If the pkg.tar.gz is in the pacman cache directory then a -S will find that package and install the local version.  This is all assuming that package is not out of date according to the mirror the new box is pointing to.

Last edited by rson451 (2008-11-20 20:29:53)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#4 2008-11-20 20:27:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,403
Website

Re: [SOLVED] Question about Saving Cached Packages

dumping /var/cachae/pacman/pkg from one computer to the next works fine (as long as the both use the same architecture).  Pacman does a md5sum check before installing so it detects anything that did not transfer well and you can remove it.

Offline

#5 2008-11-20 21:08:37

Mr. Swillis
Member
Registered: 2008-06-24
Posts: 54

Re: [SOLVED] Question about Saving Cached Packages

Awesome, I figured it would work that way, since uninstalling/re-installing individual apps on the same system seems to skip the download and use the cache files. I just wasn't sure if there was a header/config file or something that also needed to exist.

I figured I would do a full sync before backing up the packages, dump them to a CD or DVD or heck... even just somewhere on the network now that I think of it, then run the install. This way, I wouldn't have to worry about newer versions existing on the net, as long as I keep that time gap small.

I'll be trying this sometime between tonight and Saturday and will post back the results.

Thanks for all the feedback!

Swill


And you ate the whole... wheel of cheese? How'd you do that? Heck, I'm not even mad; that's amazing.

Offline

#6 2008-11-20 21:56:27

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

Re: [SOLVED] Question about Saving Cached Packages

Whether installing or not, sharing /var/cache/pacman/pkg is a good thing to do if you have more than one box with the same architecture. I do it via NFS, and there are other options also. The wiki has some info AFAIR.

Offline

#7 2008-11-20 22:06:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Question about Saving Cached Packages

I've done this a couple of times:
1) Installing a new desktop - just mounted ny existing cache on my server over NFS to /var/cache/pacman/pkg/ the new desktop in the LiveUSB environment
2) Installing my new laptop - rsynced everything from the existing cache to the cache on the LiveUSB environment. (Might need to mount and temporary partition (eg, another usb key) to /var/cache/pacman/pkg if your cache is large so you're not filling the RAM disk)

Offline

#8 2008-11-21 06:00:54

Mr. Swillis
Member
Registered: 2008-06-24
Posts: 54

Re: [SOLVED] Question about Saving Cached Packages

Yeah, I decided to do it tonight vs waiting for the weekend. Worked like a charm!

Swill


And you ate the whole... wheel of cheese? How'd you do that? Heck, I'm not even mad; that's amazing.

Offline

Board footer

Powered by FluxBB