Dnia 2015-01-22, o godz. 13:21:16 Zac Medico napisał(a): > On 01/20/2015 03:18 AM, Michał Górny wrote: > > Support prefixing groups of USE_EXPAND flags with 'USE_EXPAND:' in user > > configuration package.use and similar files. This provides a convenient > > way of declaring specifying multiple USE_EXPAND flags and matches the > > syntax supported by Paludis. Example: > > > > dev-util/netbeans NETBEANS_MODULES: php webcommon extide > > media-libs/mesa osmesa VIDEO_CARDS: intel nouveau > > --- > > pym/portage/package/ebuild/_config/UseManager.py | 20 +++++++++++++++++++- > > 1 file changed, 19 insertions(+), 1 deletion(-) > > > > diff --git a/pym/portage/package/ebuild/_config/UseManager.py b/pym/portage/package/ebuild/_config/UseManager.py > > index 3a4ec22..59f474e 100644 > > --- a/pym/portage/package/ebuild/_config/UseManager.py > > +++ b/pym/portage/package/ebuild/_config/UseManager.py > > @@ -202,10 +202,17 @@ class UseManager(object): > > useflag_re = _get_useflag_re(eapi) > > for k, v in file_dict.items(): > > useflags = [] > > + use_expand_prefix = '' > > for prefixed_useflag in v: > > + if extended_syntax and prefixed_useflag[-1] == ":": > > + use_expand_prefix = prefixed_useflag[:-1].lower() + "_" > > + continue > > + > > if prefixed_useflag[:1] == "-": > > useflag = prefixed_useflag[1:] > > + prefixed_useflag = "-" + use_expand_prefix + useflag > > else: > > + prefixed_useflag = use_expand_prefix + prefixed_useflag > > useflag = prefixed_useflag > > if useflag_re.match(useflag) is None: > > writemsg(_("--- Invalid USE flag for '%s' in '%s': '%s'\n") % > > We could match useflag_re against (use_expand_prefix + useflag) here, so > that the use_expand_prefix is also validated. Otherwise, the patch looks > good. Yeah, updated the message, failed to update the match :). -- Best regards, Michał Górny