1 |
On Tue, 2004-09-07 at 15:34, Jacob Walcik wrote: |
2 |
> i've looked in the portage handbook, and i'm digging in the forums |
3 |
> now, but i can't seem to find a way to do this. |
4 |
> |
5 |
> i've got a production postgres database server running gentoo. this |
6 |
> morning, when updating my desktop (also running gentoo) i noticed that |
7 |
> a new version of postgres is available. |
8 |
> |
9 |
> is there some way to tell the postgres server (and the machines that |
10 |
> use postgres client libraries to connect to it) to ignore that update? |
11 |
> i seem to recall there being a mechanism through which you can |
12 |
> protect certain packages to prevent updates from being applied. |
13 |
|
14 |
> glsa-check looks interesting, but doesn't satisfy my requirement of |
15 |
> packages on production machines only being installed from tested |
16 |
> binaries built on a dev machine (unless i'm missing something). |
17 |
|
18 |
If I recall correctly, it is possible to "pin" a given version of a |
19 |
package in the world file. But the sensible (by which I mean "more |
20 |
complete") option is probably to use /etc/portage/package.mask. For |
21 |
instance: |
22 |
|
23 |
# [ ! -e /etc/portage ] && mkdir /etc/portage |
24 |
# echo ">dev-db/postgresql-7.4.3" >> /etc/portage/package.mask |
25 |
|
26 |
would effectively hard-mask any version of postgresql above 7.4.3 (thus, |
27 |
preventing it from being installed). Be warned though, without |
28 |
maintenance this strategy may cause errors in time. Consider the |
29 |
following two theoretical scenarios: |
30 |
|
31 |
1) The 7.4.3 ebuild is eventually pulled from portage, meaning that any |
32 |
attempted update would fail due to its being masked. |
33 |
|
34 |
2) Another ebuild has an explicit dependency on a newer version of |
35 |
postgresql. It will be blocked by the fact that the version it wants is |
36 |
masked. |
37 |
|
38 |
Here's an example of how to pin everything on the system: |
39 |
|
40 |
# qpkg -I -v -nc | sed -e "s/\(.*\)/>\1/" >> /etc/portage/package.mask |
41 |
|
42 |
You could then edit the list according to your tastes. |
43 |
|
44 |
Regards, |
45 |
|
46 |
--Kerin Francis Millar |