Subject: Re: package source directory hierarchy
To: Masao Uebayashi <uebayasi@soum.co.jp>
From: Greywolf <greywolf@starwolf.com>
List: tech-pkg
Date: 05/21/2001 22:55:00
On Tue, 22 May 2001, Masao Uebayashi wrote:

# I'm wondering that it would be nicer if package sources are separated
# not by category but alphabet, initial of each ${PKGNAME}, like
#
#   /usr/pkgsrc/0/0verkill
#   /usr/pkgsrc/0/6to4
#   :
#   /usr/pkgsrc/A/AiCa
#   :
#   /usr/pkgsrc/a/a2ps
#   /usr/pkgsrc/a/abacus
#   :

Pardon my extreme reply, but "ick".  I much prefer it as it is now.
If you want to do that, have an "alldir" target in the Makefile in
/usr/pkgsrc as follows:

alldir:
	for dir in [a-z]*; do { \
	    for name in $$dir/*; do { \
		case $$name in \
		$$dir/\*) \
		    break \
		    ;; \
		$$dir/Makefile|$$dir/CVS) \
		    : \
		    ;; \
		*) \
		    init=`expr $$name : '.*/\(.\).*'`; \
		    link=`basename $$name`; \
		    mkdir -p ALL/$$init; \
		    ln -s ../../$$dir/$$link ALL/$init; \
		    ;; \
		esac; \
	    } done; \
	} done

I much prefer going into /usr/src/pkgsrc/x11 and browsing around (and I
don't want to have to start a browser to be able to do that).

# This way is good in some points:
#
#   - easier to find a package source directory

...if you know what it is named.  If you know how it's categorized,
the current way is easier.

#   - more flexible to classify a package into multiple categories

Not really.  We multiply class it now.

#   - more flexible to create/delete categories

Not really.  I don't see how this makes it easier, considering the pkgsrc-core
people are the ones who create/delete categories.  Besides, if i decide,
for some reason, that I don't want, say, the www pkgsrc stuff around
anymore at all, I can just go

	rm -fr /usr/pkgsrc/www

and it's done, instead of having to hunt for everything in a category.

#   - can save time for pkg-managers to decide the category a package
#     belongs to

Maybe.

# Category is used for browsing packages, that is, one already has a
# certain purpose and she/he looks for packages which are for her/his
# purpose. To fullfill such a case, it's sufficient to put a text (or
# html) file in which packages are sorted by category, like

That's an extra step which someone who is actually knowledgable isn't going
to want to go through.

#   I18N:
#     emacs
#     mozilla
#     :
#   XML:
#     PyXML
#     XML-Xerces
#     XmHTML
#     :
#   Language:
#     STk
#     egcs
#     :
#
# It's easy and seems better to add 'COMMENT' to this file.
#
# I've not thought the feasibility, but I guess this is not impossible.

It's not impossible, but the usefulness of implementing such a scheme
and rearranging pkgsrc eludes me.  This is a pretty radical departure from
the current organization.

I'm trying to figure out ways to put this without being self-centered
about it, but I'd be sorely put out if my pkgsrc tree were suddenly
re-architected on me in such an extreme way.  As a workaround, if you
find you like it, use the "alldir:" code snippet in your pkgsrc main
Makefile.

# Regards,
# Masao

				--*greywolf;
--
*BSD: the power to swerve (penguins, worse than cane toads).