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

Replies