Thursday, April 3, 2008

mk-build-deps: create a dummy package depending on a package's build-deps

When I work on a package, I often find that I want to have build-deps installed in a way that I remember why I did install them in the first place. apt-get build-dep is not a proper solution for me for two reasons:

  • It marks the packages as automatically installed (at least, last time I checked, it did), which does not play nice with aptitude, who wants to remove them immediately. Marking them manually installed would not be a solution either (since I would not remember why I did install them).
  • It does not work for package whose build-deps changed since the last upload (or that were never uploaded).

As I'm starting to work on vegastrike, who's in great need of tender care, I though time had to find a more decent solution. The answer is mk-build-deps, a small Perl script that takes a control file or a package name and uses equivs to create a dummy package depending on its build-deps. Pretty useful (for me at least). Maybe it would be worth including in the devscipts package ?

5 comments:

Jon Dowland said...

I do something similar, using a script called "build-depper". There's no point using equivs thuogh, which is horrendously over engineered imho, you just need a ./foo/DEBIAN/control file and dpkg-deb -b ./foo.

Whenever I've asked anyone if it's of interest, I've been told no, just use pbuilder.

nomeata said...

Have you checked pbuilder and the buildd’s software (sbuilder or something)? I think they too generate a dummy package. So either they can benefit from your code, or the other way around, but I think this code duplication can be avoided.

Vincent Fourmond said...

nomeata: pbuilder definitely has some code doing that. However, I think it would have taken me longer to find it than it took me to write this script ;-)..

jon: sure, the DEBIAN/control is the way to go, I should try adapting

Thanks !

Javi said...

aptitude can now install build-dep (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=243317) could do remove it in the future ?

Vincent Fourmond said...

Comment forwarded from Adeodato Simó:

You can check this too:
http://blog.djpig.de/en/devel/debian/introducing-sourcedeps.html