[PLUG] Package Name Lengths in different distros

Ben Koenig techkoenig at protonmail.com
Fri Jun 10 01:16:29 UTC 2022


Hi all,

I have a really random question/rant about package metadata across different distros.
Quick backstory.. For reasons best explained by https://xkcd.com/2610/, I'm writing a series of scripts that ingest package data into a set of SQL tables in mariadb. Part of this involves defining a string for the "package name" and defining a maximum length for the string - which is where things go horribly wrong.

After some fiddling with packages in my distro I settled on a character length of 50 for the package name. This was reasonable until I started working on Fedora's data and found a package that would give RMS a heart attack. Behold:

Package name: compat-golang-github-akihirosuda-containerd-fuse-overlayfs-devel

As found in the repo data for FC36. This is probably the most meaningless arrangement of 64 alphanumeric characters I have ever seen, but my focus of the moment is assigning it a number so I can do math on it. The obvious solution is to raise the character limit for the SQL field to accomodate at least 65 characters, but that raises the following question:

How high should I set the limit? Is there any reason to believe that a package name would exceed, e.g. 100 characters?

I may up it to 100/150 but if anyone is aware of a package name for any linux distro that exceeds 100 characters that would be helpful to know. I only use a few different distros myself and wasn't expecting to hit this issue.
-Ben


More information about the PLUG mailing list