global commands

Stefan Karrmann <[email protected]> Sun, 22 Dec 2002 22:53:40 +0100
Newsgroups gmane.comp.djb.package
Message-ID <20021222215340.GB293@johann>
How can I find all globally registered commands of package foo?

1. Take all files in /package/foo/command ?
   Is this really the current convention or does a package exist
   with private or local commands in it?

2. Create a policy to use the file /package/foo/package/registered as
   a reference with one command per line.

   a. What to do with strange commands which contains <EOL> characters?
      (We may restrict the commands names to (regex) [a-z0-9_\[-]* .)
   b. Is /package/foo/package/command for this purpose?

3. Create a policy to put globally registered commands in, e.g.
   /package/foo/cmd-reg .

4. Only the package knows which commands of /package/foo/command are
   globally registered. Its command /package/foo/package/upgrade
   sets the current-version link AND the symlinks from /command.
   Thus, it must run as root to update symlinks in /command and
   may run `rm -rf /' by accident.

If the globally registered commands are declared in a file like in (2)
a slash-package manager can easily use this information to update
/command.

Sincerly,
-- 
Stefan Karrmann