How to list default packages?
Stefan Karrmann <[email protected]>
| Newsgroups | gmane.comp.djb.package |
|---|---|
| Message-ID | <20020629141156.GA852@johann> |
How can I list all default packages of /package?
find /package -perm -1111 -prune lists all categories.
find /package -perm -1110 -prune |
while read c; do find "$c" ! -perm +1000 -prune; done lists all packages.
Descriminating the symlink on its own is not enough, since a
package version can be symlinked, too.
find /package -perm -1111 -prune |
while read c; do find "$c" ! -perm +1000 -prune; done |
while read p
do
test -l "$p" || continue
l=`readlink "$p"`
test -e `dirname "$p"`/"$l" || continue
echo "$l" |
grep -q ^`basename "$p"`-"[0-9]" &&
echo "$p"
done
is my best approximation, but it assumes that there are never packages
like:
editor -> vim-1.0
gnat -> gnat-i386-1.0 (We can rename it gnat-1.0-i386)
This may be okay because Dan requires version NUMBERS to start
with a digit and other problems can be avoided.
IMHO the usage of the sticky bit and the version number scheme is
a weak point of slashpackage.
Thanks,
--
Stefan Karrmann, Remscheider Straße 13, 70376 Stuttgart, Germany
Tel.: +49 711 5056659, Email: [email protected]
W3: www.karrmann.de