[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FTP Installation & Package Naming Conventions



"brian (b.c.) white" <bcwhite@bnr.ca)  wrote on 31.10.95 in <"16518 Tue Oct 31 11:18:39 1995"@bnr.ca>>:

> I propose we standardize the filenames used in the Debian distribution and
> suggest what I mentioned above:
>
> 	package-name-version-revision.deb
>
> with the following restrictions:
>
> 1) The package name must not contain any "-<digit>" substrings.  This is
>    important in order to be able to tell where the name ends and the
>    version number starts.
>
> 2) The version number must start with a digit (see #1, above) but may
> contain    letters and dashes thereafter.
>
> 3) The revision number must be of the form "-<digits>".
>
> 4) All pieces must exactly match the information given in the control file.
>
>
> For you regular expression guru's, this should amount to
>
> 	^(.*)-([0-9].*)-([0-9]*).deb$	\1=name, \2=version, \3=revision
>
> (Note: I don't know how to say in regex, "no -<digit>" for the package
> name.)

While I prefer numeric versions, that's not that crucial for parsing.  
However, I would strongly suggest using names (and of course revisions)  
without dashes. You can't mandate anything for versions, as those aren't  
choosen by Debian.

That gives

        ^([^-]*)-(.*)-([^-]*)\.deb$      \1=name, \2=version, \3=revision

which is quite easy to parse even "by hand": everything in front of the  
first dash is the name, everything between the first and the last dash is  
the version, everything between the last dash and ".deb" is the revision.

However, your list raises another problem - what maximal lenght for the  
three components should be supported? The named clearly had its version  
string truncated.

As long as there are no very important reasons to do otherwise, I'd  
suggest allowing every component as well as the resulting complete name at  
least NAME_MAX chars. NOTE that this is for parsing and handling, not for  
package maintainers - they should choose names a lot shorter than that!

MfG Kai


Reply to: