Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: split up media-sound/ category
Date: Sun, 26 Jun 2011 22:32:16
Message-Id: 4E07B32B.9050906@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: split up media-sound/ category by "Jesús J. Guerrero Botella"
1 On 06/24/2011 12:52 AM, Jesús J. Guerrero Botella wrote:
2 > 2011/6/24 Zac Medico <zmedico@g.o>:
3 >> On 06/22/2011 11:15 PM, Jesús J. Guerrero Botella wrote:
4 >>> Symlinks are clean, and portage has
5 >>> always been file-oriented so I see no problem with using them for
6 >>> this. All we need is to deference the symlink to find the real name of
7 >>> the package and put it in world instead of the symlinked name, so the
8 >>> rest of packages won't even need to be retouched to fix the
9 >>> dependencies. I don't really know if it's that simple as it sounds,
10 >>> but it's an idea.
11 >>
12 >> For some reason, using symlinks to represent tags seems like an odd
13 >> approach to me. I think it would be much more sensible to put them in
14 >> metadata.xml or an ebuild variable. If for some reason you want symlinks
15 >> representing the tags (I don't know why you would), you can always use a
16 >> script to generate symlinks from metadata.xml files.
17 >
18 > You might not like it, but Gentoo categories have always been
19 > directories, not words into metadata.xml. Most portage tools rely on
20 > that. Not a strong argument, I know that. But someone used this
21 > argument when someone else wanted to put portage into a database
22 > instead of an fs-based tree. That was long ago, admittedly, don't know
23 > if that conversation ever came up again.
24
25 I see, so you want to optimize the tree layout for use with simple shell
26 commands. For a shell-friendly alternative to metadata.xml, I suppose
27 that we could instead use a plain text file called "tags" in the same
28 directory as metadata.xml. If it listed one tag per line, you could use
29 a simple shell command like this to search for packages with a specific tag:
30
31 find /usr/portage -name tags | xargs grep <tag name>
32
33 > I've personally never bothered to learn how to use external tools
34 > anyway, so I just navigate the tree using command line tools when I
35 > need to know something about a given package. I am sure I am not alone
36 > in that regard. I guess I could also "nano metadata.xml", ugh!
37
38 Well, I just assumed that most people tend to use programs like eix,
39 esearch, or some kind of web interface to perform searches. It hadn't
40 occurred to me that people would resort to ad-hoc shell commands for
41 this. Sometimes I'll use shell wildcard tricks like `echo
42 /usr/portage/*/gcc` if I'm not sure about the category of a package, or
43 grep tricks like `grep -r gcc /usr/portage/metadata/cache`, but other
44 than that I tend to use domain-specific search tools like esearch.
45
46 > Some portage GUIs also use this categorization scheme, like portato or
47 > porthole (not that they are important at all, but they illustrate the
48 > trend).
49 >
50 > Maybe it's just my mind model is archaic, but I can't really agree
51 > with tagging for massive trees. I wouldn't drop all my 40 thousand
52 > songs into a single folder and rely on tagging to keep them at hand.
53 > Portage has way more files so I don't see how tagging would be better
54 > for it than it would be for my music collection. I might be too much
55 > influenced by *nix (and DOS) OSes at this stage to be able to see the
56 > advantages of tagging (besides the decorative function), I admit.
57
58 Well, I imagine that the vast majority of people would be inclined to
59 use domain-specific search toola rather than shell commands for searches
60 involving tags.
61 --
62 Thanks,
63 Zac

Replies

Subject Author
Re: [gentoo-dev] RFC: split up media-sound/ category "Jesús J. Guerrero Botella" <jesus.guerrero.botella@×××××.com>