1 |
On Mon, 12 Sep 2011 19:49:28 +0300 |
2 |
Nikos Chantziaras <realnc@×××××.de> wrote: |
3 |
|
4 |
> On 09/12/2011 07:31 PM, Pandu Poluan wrote: |
5 |
> > |
6 |
> > On Sep 12, 2011 11:11 PM, "Nikos Chantziaras" <realnc@×××××.de |
7 |
> > <mailto:realnc@×××××.de>> wrote: |
8 |
> > > |
9 |
> > > In my /etc/portage/profile/package.provided, I have this: |
10 |
> > > |
11 |
> > > media-libs/freetype-1.4_pre20080316-r2 |
12 |
> > > |
13 |
> > > When I try to emerge freetype however, instead of emerging the |
14 |
> > > newer |
15 |
> > version, I get: |
16 |
> > > |
17 |
> > > $ emerge freetype |
18 |
> > > |
19 |
> > > WARNING: A requested package will not be merged because it is |
20 |
> > > listed in package.provided: |
21 |
> > > |
22 |
> > > freetype pulled in by 'args' |
23 |
> > > |
24 |
> > > Nothing to merge; would you like to auto-clean packages? |
25 |
> > > [Yes/No] |
26 |
> > > |
27 |
> > > Trying "emerge freetype:2" also won't work. The only only to |
28 |
> > > emerge |
29 |
> > it seems is by using the whole version ("emerge =freetype-2.4.6"). |
30 |
> > Is this a bug? |
31 |
> > |
32 |
> > Why did you have that line in package.provided, in the first place? |
33 |
> > Did you install freetype on your own, without using portage? |
34 |
> |
35 |
> Portage installs both freetype-1 as well as freetype-2. texlive has |
36 |
> freetype-1 as a dep, and I don't want it installed because I'm not |
37 |
> using ttf2tfm. |
38 |
> |
39 |
> |
40 |
> > The way I see it, Portage worked perfectly: it saw that you have |
41 |
> > installed a certain version of freetype on your own, and it didn't |
42 |
> > want to mess up your installed package. |
43 |
> > |
44 |
> > Just delete the line and emerge freetype. |
45 |
> |
46 |
> From my point of view, it doesn't work perfectly, because it behaves |
47 |
> differently when freetype-1 is really installed, and when it's not |
48 |
> but listed in package.provided. If I install freetype-1 and type: |
49 |
> |
50 |
> emerge freetype |
51 |
> |
52 |
> it will emerge freetype:2. So the behavior is vastly different |
53 |
> between having freetype really installed, and when not but listed in |
54 |
> package.provided. |
55 |
|
56 |
|
57 |
That's because a package being installed and being provided are not the |
58 |
same thing and are treated very differently. |
59 |
|
60 |
If you install xyz-1.2.3 then portage knows what it did to achieve |
61 |
that and can deal with it as normal. |
62 |
|
63 |
If you provide xyz-1.2.3 then portage does not know what *you* did to |
64 |
achieve that and makes no attempt to deal with it at all. You are |
65 |
expected to completely 100% deal with all of xyz, including all slots. |
66 |
"man 5 portage" mentions that the version number is there in |
67 |
package.provided so that portage can alert you if some other package |
68 |
has a dep on a version of xyz you did not provide. |
69 |
|
70 |
Seen in that light, the behaviour is indeed sensible, just not |
71 |
consistent if you haven't read the docs yet. I don't think it's wise to |
72 |
try and change portage's behaviour with this, as Michael said in |
73 |
another sub-thread portage has no idea what you did so it can't even |
74 |
try to take control of different slots for fear it might clobber all |
75 |
your manual hard work |
76 |
|
77 |
|
78 |
|
79 |
-- |
80 |
Alan McKinnnon |
81 |
alan.mckinnon@×××××.com |