Re: .deb filename parsing *again*
[ Sorry if this is a duplicate... I sent it when the list went down and
never saw it make it out. ]
> The best solution proposed so far (the one which has attracted the
> least criticism) is the one where you encode the package name with
> y/-/_/ when you put it in the filename.
Could you provide a complete regex for this, just so we know exactly
what you mean? As I understand it, you are suggesting:
([^-]*)-(.*)-([^-]*)\.deb
where: $1 = package_name
$2 = version
$3 = debian revision
or is it
([^-]*)-(.*)-([^-\.]*)\.([^-\.]*)\.deb
where: $1 = package_name
$2 = version
$3 = debian revision
$4 = architecture
Might I also suggest the following to consider: (no arch, but easily added)
"C" (.*)-([^-]*)-([^-]*)\.deb
$1 = package-name (with "-")
$2 = version (without "-")
$3 = debian revision (no "-")
or
"D" (.*)-([0-9].*)-([^-]*)\.deb
$1 = package-name (with "-", can't have any "-digit")
$2 = version (with "-" but must start with a digit)
$3 = debian revision (no "-")
If I recall correctly, my first alternative (C) will affect the fewest
number of existing packages.
> A few days ago it occurred to me that in most of the contexts that are
> relevant here the character # is not a metacharacter. This leads me
> to suggest, tentatively, the use of
Can't say as I care for that one. '#' is a pretty non-standard character
for a filename.
Brian
( bcwhite@verisim.com )
-------------------------------------------------------------------------------
In theory, theory and practice are the same. In practice, they're not.
Reply to: