From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] bin/portageq: add a matcher to match the orphaned (maintainer-needed) packages
Date: Sun, 6 Mar 2016 07:12:40 -0800 [thread overview]
Message-ID: <20160306071240.4dbf8351.dolsen@gentoo.org> (raw)
In-Reply-To: <1457163371-18380-1-git-send-email-gokturk@binghamton.edu>
On Sat, 5 Mar 2016 02:36:11 -0500
Göktürk Yüksek <gokturk@binghamton.edu> wrote:
> Per GLEP 67, orphaned packages do not have a <maintainer> in
> metadata.xml. They can't be matched using
> '--maintainer-email=maintainer-needed@gentoo.org' anymore. Add a new
> command line argument '--orphaned' to match the orphaned packages.
>
> Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu>
> ---
> bin/portageq | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/bin/portageq b/bin/portageq
> index 925640b..8ec81ea 100755
> --- a/bin/portageq
> +++ b/bin/portageq
> @@ -1028,6 +1028,12 @@ class HerdMatcher(object):
> herds = self._herds
> return any(x in herds for x in metadata_xml.herds())
>
> +class OrphanedMatcher(object):
> + def __call__(self, metadata_xml):
> + if not metadata_xml.maintainers():
> + return True
> + else:
> + return False
>
> def pquery(parser, opts, args):
> portdb = portage.db[portage.root]['porttree'].dbapi
> @@ -1090,6 +1096,8 @@ def pquery(parser, opts, args):
> for x in opts.herd:
> herds.extend(x.split(","))
> xml_matchers.append(HerdMatcher(herds))
> + if opts.orphaned:
> + xml_matchers.append(OrphanedMatcher())
>
> if opts.repo is not None:
> repos = [portdb.repositories[opts.repo]]
> @@ -1248,6 +1256,11 @@ def add_pquery_arguments(parser):
> "longopt":
> "--maintainer-email", "action": "append",
> "help": "comma-separated
> list of maintainer email regexes to search for"
> + },
> + {
> + "longopt": "--orphaned",
> + "action": "store_true",
> + "help": "match only orphaned
> (maintainer-needed) packages" }
> )
> ),
reviewed and dealt with this on IRC.
final v2 patch merged...
--
Brian Dolbec <dolsen>
next prev parent reply other threads:[~2016-03-06 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 7:36 [gentoo-portage-dev] [PATCH] bin/portageq: add a matcher to match the orphaned (maintainer-needed) packages Göktürk Yüksek
2016-03-06 15:12 ` Brian Dolbec [this message]
2016-03-07 12:24 ` Alexander Berntsen
-- strict thread matches above, loose matches on Subject: below --
2016-03-05 7:08 Göktürk Yüksek
2016-03-07 12:19 ` Alexander Berntsen
2016-03-07 17:15 ` Zac Medico
2016-03-08 13:27 ` Alexander Berntsen
2016-03-08 14:46 ` Brian Dolbec
2016-03-08 14:49 ` Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160306071240.4dbf8351.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox