Gentoo Archives: gentoo-server

From: Kalin KOZHUHAROV <kalin@××××××××.net>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Quick restores
Date: Mon, 26 Dec 2005 05:54:07
Message-Id: 43AF84F3.6020505@thinrope.net
In Reply to: Re: [gentoo-server] Quick restores by Jason Stubbs
1 Jason Stubbs wrote:
2 > A. Khattri wrote:
3 >
4 >> On Thu, 1 Dec 2005, Robert Larson wrote:
5 >>
6 >>> If I understand you correctly, then this may help:
7 >>> # obtain a list of installed packages
8 >>> emerge -vep world | grep ^'\[ebuild ' | while read a; do
9 >>> # extract the package name
10 >>> pkg=$(echo $a | cut -d']' -f2 | awk '{print $1}')
11 >>> # build a binary of the package
12 >>> quickpkg "/var/db/pkg/${pkg}"
13 >>> done
14 >>
15 >>
16 >> I came up with this (yes, granted it is tied to the file-system layout
17 >> but
18 >> its damn fast!):
19 >>
20 >> find /var/db/pkg -mindepth 2 -maxdepth 2 -print -exec quickpkg {} \;
21 >
22 >
23 > I was thinking about extending quickpkg to support syntax like:
24 > quickpkg [--deep [--build-deps] ] [--overwrite] <atom>|<target>
25 >
26 > <atom> is one or more regular atoms. <target> is any supported target
27 > (currently "world" or "system"). --deep would recursively make packages
28 > of runtime dependencies. --build-deps would include build time
29 > dependencies (which of course aren't actually needed). --overwrite
30 > would cause packages to be created even if they already exist in PKGDIR.
31 >
32 > Can I take this thread as an expression of interest in the above?
33 > Anything missing or would be better done differently?
34
35 Yes!
36
37 And, but not sure how, adding something like --update and --update-only will save some cpu cycles.
38 Actually, may be you are right. --overwrite might be better, but I was thinking about emerge syntax.
39
40 Kalin.
41
42 --
43 |[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
44 +-> http://ThinRope.net/ <-+
45 |[ ______________________ ]|
46
47 --
48 gentoo-server@g.o mailing list