Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH vcs-snapshot] Use ${WORKDIR}/${P} rather than ${S} to support ${S} overrides.
Date: Mon, 04 Jun 2012 19:30:22
Message-Id: 4FCD0BC8.6050608@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH vcs-snapshot] Use ${WORKDIR}/${P} rather than ${S} to support ${S} overrides. by "Michał Górny"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/04/2012 05:50 PM, Michał Górny wrote:
> On Mon, 04 Jun 2012 16:20:02 +0200 hasufell <hasufell@g.o> > wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> On 06/04/2012 11:59 AM, Michał Górny wrote: >>> One could set S to work on a subtree of the tarball rather than >>> the whole tarball. Considering that, it's probably better to >>> use ${WORKDIR}/${P} rather than ${S}. >>> >>> Fixes: https://bugs.gentoo.org/show_bug.cgi?id=419479 --- >>> gx86/eclass/vcs-snapshot.eclass | 5 +++-- 1 file changed, 3 >>> insertions(+), 2 deletions(-) >>> >>> diff --git a/gx86/eclass/vcs-snapshot.eclass >>> b/gx86/eclass/vcs-snapshot.eclass index 6748360..23cd696 100644 >>> --- a/gx86/eclass/vcs-snapshot.eclass +++ >>> b/gx86/eclass/vcs-snapshot.eclass @@ -9,7 +9,8 @@ # >>> @DESCRIPTION: # This eclass provides a convenience src_unpack() >>> which does support # working with snapshots generated by >>> various VCS-es. It unpacks those -# to ${S} rather than the >>> original directory containing commit id. +# to ${WORKDIR}/${P} >>> rather than the original directory containing +# commit id. # # >>> Note that this eclass handles only unpacking. You need to >>> specify # SRC_URI yourself, and call any autoreconfiguration as >>> necessary. @@ -41,5 +42,5 @@ vcs-snapshot_src_unpack() { >>> >>> # github, bitbucket: username-projectname-hash # gitweb: >>> projectname-tagname-hash - mv *-*-[0-9a-f]*[0-9a-f]/ "${S}" || >>> die + mv *-*-[0-9a-f]*[0-9a-f]/ "${WORKDIR}"/${P} || die } >> >> Currently that eclass does not support multiple snapshot >> sources/tarballs. > > Use case? >
ANY case where I need more than one tarball/source. There are just not many because this eclass is widely unknown. But minetest in sunrise for example which has two different repos, one for the engine, one for the data. It's currently split in two, but I guess I will merge those soon. Lately there was an ebuild proposal in sunrise too which had that issue, see here https://gist.github.com/2829184 It would also enable me to use gtk-youtube-viewer and youtube-viewer in one ebuild with vcs-snapshot eclass while adding a gtk useflag (currently split too). Otherwise I will have to fix it on my own again. I am pretty sure it will get more in the future when people start to use this eclass or it will just prevent them from using it. I find the logic very clear: SRC="https://my/github/shit -> ${P}.tar.gz" results in ${WORKDIR}/${P} and SRC="https://my/github/shit -> ${P}-src.tar.gz" results in ${WORKDIR}/${P}-src -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPzQvIAAoJEFpvPKfnPDWzOikH/0R35jeWyWj1j7RNxQ9Rbpt6 JPSBmNx2ZOdFDF8jIqbOERwFwSe87mLitOrZafCxNL4eNZmhP4lXTcVny574CxuS DE6k5n7k265eYzZm4A/1CjdKp4ptTzpGVil4/iVObFaz3B7tS5PCvqzySWc/ZO/7 040x2d4g94nqkcMM130ua970pbgO7MWZsVsBH3mnLE4AGCZY4vtRlH9dMOHbcAgG 46Vuu9/m4BfGadfGqNVTZz7KbxDBt5h3vOHZZe6JEf3smMr9GiK/gcIc4l97faN7 B601V8kIBWQhPENgeh+SZsMpx24E8DIMvLA7ltMLF8/WLULQBxzW3xR4/CxoNOk= =aaKu -----END PGP SIGNATURE-----

Replies