Gentoo Archives: gentoo-portage-dev

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies