On 01/03/2011 04:40 PM, Samuli Suominen wrote: > Quoting PMS, Chapter 8: > > "All ebuild-defined variables discussed in this chapter must be defined > independently of any system, profile or tree dependent data, and must > not vary depending upon the ebuild phase." > > http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=blob_plain;f=ebuild-vars.tex;hb=HEAD > > > > This is very inconvinent rule for example, github tarballs where the > directory changes with every release. I've used this: > > src_unpack() { > unpack ${A} > cd *-${PN}-* > S=`pwd` > } >
This code could be simplified as:
S=*-${PN}-*
$ mkdir foo-1.2.3
$ PN=foo
$ S=foo-*
$ echo $S
foo-1.2.3
>
>
> Far as I know, S= isn't used to generate metadata cache, so it's PMS
> that need fixing for it's wording:
>
> "All ebuild-defined variables used to generate metadata cache, discussed
> in this chapter..."
>
It can be done retroactively if Portage has always worked with S being
defined inside phases and if that doesn't work then it can always be
part of EAPI 5. I opened a bug to track the request:
https://bugs.gentoo.org/show_bug.cgi?id=350478
Regards,
Petteri
signature.asc
Description: OpenPGP digital signature
