aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2019-08-18 00:40:14 +0800
committerBenda Xu <heroxbd@gentoo.org>2019-08-18 00:40:14 +0800
commitae70ffefbe473b4f4d0a2a69b2cec814ded13681 (patch)
treed7cf8866254cd8c10fdbfd4946ec60930160a5ae
parentR-package.eclass: do not expose src_prepare. (diff)
downloadR_overlay-ae70ffefbe473b4f4d0a2a69b2cec814ded13681.tar.gz
R_overlay-ae70ffefbe473b4f4d0a2a69b2cec814ded13681.tar.bz2
R_overlay-ae70ffefbe473b4f4d0a2a69b2cec814ded13681.zip
[USE] in the DEPEND should be extracted.
Example: tk? ( dev-lang/R[tk] ), not r[tk]?.
-rw-r--r--roverlay/ebuild/evars.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/roverlay/ebuild/evars.py b/roverlay/ebuild/evars.py
index 6ec6a2e..c2e355d 100644
--- a/roverlay/ebuild/evars.py
+++ b/roverlay/ebuild/evars.py
@@ -96,9 +96,7 @@ class UseExpandListValue (
RE_USENAME = re.compile (
(
'(?P<prefix>.*[/])?'
- '(?P<pf>'
- '((?P<pn>.*)(?P<pvr>[-][0-9].*([-]r[0-9]+)?))'
- '|.*)'
+ '(?P<pn>[^\[]*)(\[(?P<use>[^\]]*)\])?(?P<pvr>[-][0-9].*([-]r[0-9]+)?)?'
)
)
@@ -128,7 +126,7 @@ class UseExpandListValue (
match = self.__class__.RE_USENAME.match ( dep.dep )
if match:
return self._get_use_key (
- ( match.group ( "pn" ) or match.group ( "pf" ) )
+ ( match.group ( "use" ) or match.group ( "pn" ) )
)
else:
raise ValueError (