[Slackbuilds-users] Metacharacters in package names
yalhcru at gmail.com
Thu Aug 23 10:34:49 UTC 2018
On 8/23/18, Didier Spaier <didier at slint.fr> wrote:
> Anyway, the '+" character is used in names of packages shipped in Slackware:
Bingo. Pat never wrote any formal package-naming spec for Slackware,
so all we have to go by is looking at the names he uses and deducing a
set of rules from them.
It means + is allowed... and I wish it weren't, 'cause package names
with + in them have caused problems for my pet project too (sbosrcarch).
It also means it's OK to randomly use names like MPlayer (capital
letters), which drives me insane (because they're effectively random. If
the caps had a meaning, like ClassName and methodName in OO languages,
I'd be less insane...)
How about UTF-8 accented/umlauted characters in package names? Slackware
doesn't ship any packages like that... so we can say "no, not allowed".
If Pat did start shipping a package with an umlaut in the name[*],
would that open the door for all of Unicode? You think + is annoying
to deal with, wait'll you have to handle emoticons, Linear-B, Klingon,
Sanskrit, cuneiform, braille (visually represented) and something like
30,000 Chinese characters...
[*] That's at least theoretically possible: "love" on SBo is actually
called "LÖVE" by its developers (that's an umlauted O, in case gmail
Er, and what point am I making? Not sure. How about this:
<urchlay at monolith:/var/log/packages>$ ls | grep -v SBo | rev | cut -d-
-f4- | rev | sed 's,.,&\n,g' | sort -u | grep -v '[A-Za-z0-9]' | xargs
+ - _
(That's on a full install with nothing but Slackware and SBo packages...)
So, plus, hyphen, and underscore are the only non-alphanumeric characters
Pat uses. And they're 7-bit ASCII only. Those should be our rules,
too. I'd even go so far as to say we should stick to that even if Pat
changes his rules (because Pat doesn't have to care about his package
names breaking sbopkg, sbotools, etc, and we do, or at least should).
More information about the SlackBuilds-users