You are not logged in.

#1 2015-01-29 20:01:04

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

Use local pacman cache as repository?

When I install a new Arch system from a running Arch system (e.g. boot off a boot stick, then format hard drive and install) it would be nice to use packages already downloaded instead of downloading them all from scratch from a mirror.

Would save me some downloads, and the mirrors some bandwidth.

But it seems the file structure in the pacman cache, and the file structure of a repository are different. E.g. if

/var/lib/pacman/sync/community.db

actually resided at

/var/lib/pacman/sync/community/community.db

and the package files went from

/var/cache/pacman/pkg/

into that same directory, I could use a pacman.conf that pointed to

file://var/lib/pacman/sync

as my Server, and files already in the cache could be used from there. If I understand that correctly, pacman would automatically fall back to a remote mirror if a file could not be found locally.

Just a thought.

Offline

#2 2015-01-29 20:07:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Use local pacman cache as repository?

Have you seen this?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-01-29 20:11:10

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

Re: Use local pacman cache as repository?

I know it can be made to work :-) this being one way, another being a bunch of symlinks. Just thought it would be nice if it worked out of the box, and outlined how, in case bandwidth is a concern for anybody.

Offline

#4 2015-01-29 20:18:56

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Use local pacman cache as repository?

Why go to the extent of faking a repo? If the cache dir of the existing install is available locally, just bind mount it to cache dir of the new install (or the cache dir of the running install and use 'pacstrap -c' ). Or have I completely missed the point here?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB