Gentoo Archives: gentoo-portage-dev

From: Ned Ludd <solar@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] qfile assumes category names contain a hyphen
Date: Mon, 16 Mar 2009 22:49:07
Message-Id: 1237243744.9959.30.camel@hangover
In Reply to: Re: [gentoo-portage-dev] qfile assumes category names contain a hyphen by Mike Frysinger
1 On Mon, 2009-03-16 at 17:05 -0400, Mike Frysinger wrote:
2 > On Monday 16 March 2009 14:35:15 Ned Ludd wrote:
3 > > On Mon, 2009-03-16 at 18:34 +0200, Amit Dor-Shifer wrote:
4 > > > Hi all.
5 > > >
6 > > > While working on my overlay, I stumbled on an issue where qfile refused
7 > > > to acknowledge an installed file as being part of my package.
8 > > >
9 > > > Looking into q's implementation (portage-utils-0.1.29), I see:
10 > > >
11 > > > amit0 portage-utils-0.1.29 # grep -A 2 next_entry
12 > > > ./libq/vdb_get_next_dir.c next_entry:
13 > > > ret = readdir(dir);
14 > > > if (ret == NULL) {
15 > > > --
16 > > > goto next_entry;
17 > > > if (strchr(ret->d_name, '-') == NULL)
18 > > > if ((strcmp(ret->d_name, "virtual")) != 0)
19 > > > goto next_entry;
20 > > >
21 > > > I encountered this since I used a new category, which only contained a
22 > > > single word. Adding a hyphen and a 2nd token solved my issue, and now
23 > > > qfile knows the file's association.
24 > > >
25 > > > Is this assumption, that category should be "stringA-stringB" documented
26 > > > somewhere?
27 > >
28 > > We made that assumption for portage-utils as they can be used on a
29 > > device which has no $PORTDIR at all. So when there is no categories file
30 > > that exists we fell back to the rules that have been working well for
31 > > the past %d years.
32 > >
33 > > We changed that behavior however a while ago. I thought this was in the
34 > > tree. But I guess not if you are hitting it.
35 > >
36 > > http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/libq/vdb
37 > >_get_next_dir.c?r1=1.2&r2=1.3
38 >
39 > we should do a new release already
40 > -mike
41
42
43 Why yes.. Yes you should :)
44
45
46 --
47 Ned Ludd <solar@g.o>
48 Gentoo Linux

Replies