Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Gentoo Developer Mailing List <gentoo-dev@l.g.o>
Subject: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)
Date: Thu, 07 Jun 2012 21:49:35
Message-Id: 20120607234952.504e9ce8@pomiocik.lan

As it was pointed out, vcs-snapshot is unable to handle multiple
tarballs nicely. As fixing this would involve changing eclass API
(and they are packages which are known to break thanks to it), I'm
posting a new eclass for review. Of course, if the community insists,
I could just update the old eclass and fix the ebuilds broken that way.

The idea with the new eclass is to extract all supported archives
(which means .tar* at the point) into ${WORKDIR} subdirectories
matching their names. In other words, if you've got:

SRC_URI="http://foo/getbar -> ${P}.tar.bz2
	http://foo/getbaz -> ${P}-data.tar.bz2"

You'd get the contents in ${WORKDIR}/${P} and ${WORKDIR}/${P}-data

A few things to note:

1) the implemention just dumbly uses 'tar --strip-components'. If it
hits a tarball without a single top-level directory, scary things will

2) only tarballs are handled, other archives are just passed through
to unpack;

3) at some point the eclass could be extended to handle more formats.
So if you've got other archives in your SRC_URI, please make sure they
are named consistently with the parent dir, so that they would not
relocate when support for that particular format is added.

By the way, the credit for the overall idea goes to hasufell.

Best regards,
Michał Górny


File name MIME type
vcs-snapshot-r1.eclass text/plain
signature.asc application/pgp-signature