Package name separators

Jim Knoble jmknoble at pint-stowp.cx
Tue Jul 25 01:08:02 PDT 2000


Circa 2000-Jul-25 16:54:08 +0900 dixit Miles Bader:

: Wichert Akkerman wrote:
: > FWIW, Debian has used [an underscore] to seperate the packagename,
: > version and architecture for ages.
: 
: Right, I know.  My question is why doesn't the LSB use underscores,
: since hyphens (as the LSB docs currently seem to specify) seem more
: annoying.
: 
: What does RPM use?

RPM has used hyphens since its inception.  Except for a small number of
releases, RPM has disallowed hyphens in version and release
specifications.  At least since version 2.0.x, RPM has allowed hyphens
in package names.

Programs that deal with package specifications (name-version-release)
directly pretty much do what the following awk scriptlet describes:

  awk -F '-' '{
    if (NF < 3) {
      printf("Bad package specification: \"%s\"\n", $0)
    } else {
      printf("name=\"%s", $1)
      for (i = 2; i < (NF - 1); i++) {
        printf("-%s", $i)
      }
      printf("\"")
      printf(" version=\"%s\"", $(NF - 1))
      printf(" release=\"%s\"\n", $NF)
    }
  }'

: p.s. Is the best place to post a question like this?  The response has
:      not been, um, overwhelming...

Yes, it is.  I suspect folks have simply been busy with other things.

-- 
jim knoble | jmknoble at jmknoble.cx | http://www.jmknoble.cx/




More information about the lsb-discuss mailing list