1 |
Raffaele BELARDI posted on Tue, 09 Feb 2010 14:25:26 +0100 as excerpted: |
2 |
|
3 |
> I have a problem importing some pgp keys with gpg 2.x. gpg 1.x might be |
4 |
> able to import these keys. Is it possible to install both gpg 2.x and |
5 |
> gpg 1.x on one system? |
6 |
|
7 |
gnupg does not appear to be slotted, so it's not normally possible to have |
8 |
both 1.x and 2.x on the same (Gentoo) system, no. However... |
9 |
|
10 |
Do you have FEATURES=buildpkg turned on? If so (and if it was on when you |
11 |
built gnupg), you'll have a binpkg available, so you can simply |
12 |
emerge =gnupg-1.4.10 , and downgrade to the old version (if you're lucky |
13 |
and still have its binpkg around as well, you can add the -K and emerge |
14 |
the binpkg, but probably that's been too long and you've ecleaned it by |
15 |
now). When you're done with the old version, simply emerge -K gnupg and |
16 |
it should upgrade itself back to the new version again, using the binpkg, |
17 |
thus bypassing having to rebuild it. |
18 |
|
19 |
Once you have both binpkgs, you can emerge -K whichever one, switching |
20 |
between them, without having to rebuild, as often as you like. |
21 |
|
22 |
If you don't have FEATURES=buildpkg enabled, do consider doing so as it's |
23 |
well worth the extra space (I run a 4 gig dedicated package partition, 2 |
24 |
gig would work if you eclean it often enough) for the various |
25 |
troubleshooting, nasty trap situations (broken gcc, how do you fix it? |
26 |
just emerge -K an earlier version known to work), and package rebuilding, |
27 |
avoidance. That said... |
28 |
|
29 |
Without FEATURES=buildpkg you can do similar on demand, only using qpkg/ |
30 |
quickpkg (quickpkg is part of portage, qpkg part of portage-utils if you |
31 |
have it merged). Either of these will let you create a binpkg of the |
32 |
currently merged version. You can then do your other version, and use |
33 |
emerge -K to remerge the binpkg you q(uick)pkged up, when you're done. In |
34 |
this case, you'd probably q(uick)pkg the current version and emerge -b |
35 |
(--buildpkg) the old version, thus having both then available to switch |
36 |
between using emerge -K as desired, without further rebuilding. |
37 |
|
38 |
There are however two caveats with q(uick)pkg. First, since it's |
39 |
on-demand, you don't have the binpkg created automatically, so you're less |
40 |
likely to be able to simply emerge -K an old version when a new version |
41 |
isn't working quite as expected. Once you know there's a problem, it's |
42 |
easy enough to q(uickpkg) the current version to get back to it if |
43 |
desired, but you're not as protected against routine upgrade breakage as |
44 |
you're unlikely to have the old versions binpkged since you'd have had to |
45 |
do it manually. |
46 |
|
47 |
Second, binpkging up the current version has security and configuration |
48 |
implications, since it doesn't have the unmodified config to work with, |
49 |
but rather, your running config. Naturally that can cause issues if you |
50 |
share the binpkgs with others, so by default q(uick)pkg will exclude these |
51 |
changed config files from the binpkg it creates, thereby avoiding the |
52 |
problem but leaving the package incomplete in the process, as these |
53 |
altered config files aren't included. There are options to include the |
54 |
altered configs anyway, thus creating a complete package, but of course |
55 |
then you have the security and config issues if you share the package, |
56 |
again. emerge --buildpkg, or emerge with FEATURES=buildpkg, will always |
57 |
be the complete unmodified package. |
58 |
|
59 |
Of course for version switching usage as we're doing here, if the (system) |
60 |
config between the versions differs significantly, q(uick)pkg with the |
61 |
using the option to include the current config would work best anyway, as |
62 |
that way, you'd have automatic handling of the differing configs as well. |
63 |
But I don't think gnupg has enough system config to worry about, it's all |
64 |
per-user config, so that shouldn't be a big issue, regardless (tho you may |
65 |
have to worry about it as your user, just not for the system as a whole). |
66 |
|
67 |
That should help! =:^) |
68 |
|
69 |
-- |
70 |
Duncan - List replies preferred. No HTML msgs. |
71 |
"Every nonfree program has a lord, a master -- |
72 |
and if you use the program, he is your master." Richard Stallman |