How to clean up dependencies with version in Debian packages
[ Author note: As you can see in the comments of this post, there are some good reasons against the systematic cleanup idea expressed in this post. So take this with a grain of salt. Instead of altering significantly this post, I’ll follow this up later in another post ]
Now that Squeeze is out, a lot of cleanup is going in Debian packages.
One of them is getting rid of unnecessary dependencies with minimal versions in packages. I.e. getting rid if unnecessary versions like perl (>= 5.8.1).
Because Lenny was shipped with Perl 5.10, requiring Perl with version greater than 5.8 is not necessary and needlessly loads dependencies resolvers.
In other words, you’re not only doing this cleanup to make your source package lighter, you’re doing it also for your users so that package upgrade go faster.
Anyway, checking these versioned in a real PITA. So I’ve enhanced Dpkg control model in Config::Model to take care of this check.
To check your package, install libconfig-model-perl (from Sid), go in your package directory and run this command:
config-edit -application dpkg -ui none
This command will check your control file, your copyright file and may issue warnings or errors.
Some warnings like the versioned dependencies can be fixed automatically with this command:
config-edit -application dpkg -ui none -apply-fixes -save
Be sure to archive your files before running this command to check what’s been done by -apply-fixes options.
For more information on using config-edit, please read Using config-model wiki page.
All the best