On 06/24/2011 12:52 AM, Jesús J. Guerrero Botella wrote: > 2011/6/24 Zac Medico <zmed...@gentoo.org>: >> On 06/22/2011 11:15 PM, Jesús J. Guerrero Botella wrote: >>> Symlinks are clean, and portage has >>> always been file-oriented so I see no problem with using them for >>> this. All we need is to deference the symlink to find the real name of >>> the package and put it in world instead of the symlinked name, so the >>> rest of packages won't even need to be retouched to fix the >>> dependencies. I don't really know if it's that simple as it sounds, >>> but it's an idea. >> >> For some reason, using symlinks to represent tags seems like an odd >> approach to me. I think it would be much more sensible to put them in >> metadata.xml or an ebuild variable. If for some reason you want symlinks >> representing the tags (I don't know why you would), you can always use a >> script to generate symlinks from metadata.xml files. > > You might not like it, but Gentoo categories have always been > directories, not words into metadata.xml. Most portage tools rely on > that. Not a strong argument, I know that. But someone used this > argument when someone else wanted to put portage into a database > instead of an fs-based tree. That was long ago, admittedly, don't know > if that conversation ever came up again.
I see, so you want to optimize the tree layout for use with simple shell commands. For a shell-friendly alternative to metadata.xml, I suppose that we could instead use a plain text file called "tags" in the same directory as metadata.xml. If it listed one tag per line, you could use a simple shell command like this to search for packages with a specific tag: find /usr/portage -name tags | xargs grep <tag name> > I've personally never bothered to learn how to use external tools > anyway, so I just navigate the tree using command line tools when I > need to know something about a given package. I am sure I am not alone > in that regard. I guess I could also "nano metadata.xml", ugh! Well, I just assumed that most people tend to use programs like eix, esearch, or some kind of web interface to perform searches. It hadn't occurred to me that people would resort to ad-hoc shell commands for this. Sometimes I'll use shell wildcard tricks like `echo /usr/portage/*/gcc` if I'm not sure about the category of a package, or grep tricks like `grep -r gcc /usr/portage/metadata/cache`, but other than that I tend to use domain-specific search tools like esearch. > Some portage GUIs also use this categorization scheme, like portato or > porthole (not that they are important at all, but they illustrate the > trend). > > Maybe it's just my mind model is archaic, but I can't really agree > with tagging for massive trees. I wouldn't drop all my 40 thousand > songs into a single folder and rely on tagging to keep them at hand. > Portage has way more files so I don't see how tagging would be better > for it than it would be for my music collection. I might be too much > influenced by *nix (and DOS) OSes at this stage to be able to see the > advantages of tagging (besides the decorative function), I admit. Well, I imagine that the vast majority of people would be inclined to use domain-specific search toola rather than shell commands for searches involving tags. -- Thanks, Zac