From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/depend/, pym/repoman/
Date: Mon, 7 Mar 2016 21:53:19 +0000 (UTC) [thread overview]
Message-ID: <1457385654.f71e5099608242138eff2f4f9d24cbfd82fb98dc.dolsen@gentoo> (raw)
commit: f71e5099608242138eff2f4f9d24cbfd82fb98dc
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 21:19:59 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Mar 7 21:20:54 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f71e5099
repoman: Migrate some additional Dependency code to the plugin
pym/repoman/modules/scan/depend/depend.py | 13 ++++++++++++-
pym/repoman/scanner.py | 22 +++-------------------
2 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/pym/repoman/modules/scan/depend/depend.py b/pym/repoman/modules/scan/depend/depend.py
index 4cb8709..2f90eee 100644
--- a/pym/repoman/modules/scan/depend/depend.py
+++ b/pym/repoman/modules/scan/depend/depend.py
@@ -1,3 +1,5 @@
+# -*- coding:utf-8 -*-
+
from _emerge.Package import Package
@@ -121,7 +123,16 @@ class DependChecks(object):
qacat = m + ".syntax"
self.qatracker.add_error(
qacat, "%s: %s: %s" % (ebuild.relative_path, m, b))
- return {'continue': False, 'unknown_pkgs': unknown_pkgs, 'type_list': type_list}
+
+ # data required for some other tests
+ badlicsyntax = len([z for z in type_list if z == "LICENSE"])
+ badprovsyntax = len([z for z in type_list if z == "PROVIDE"])
+ baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax
+ badlicsyntax = badlicsyntax > 0
+ #badprovsyntax = badprovsyntax > 0
+
+ return {'continue': False, 'unknown_pkgs': unknown_pkgs, 'type_list': type_list,
+ 'badlicsyntax': badlicsyntax, 'baddepsyntax': baddepsyntax}
@property
def runInEbuilds(self):
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 1a2de05..467e6e1 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -327,26 +327,10 @@ class Scanner(object):
if y_ebuild_continue:
continue
- if dynamic_data['live_ebuild'] and self.repo_settings.repo_config.name == "gentoo":
- self.liveeclasscheck.check(
- dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild, dynamic_data['ebuild'].keywords, self.repo_metadata['pmaskdict'])
-
- unknown_pkgs = set()
- baddepsyntax = False
- badlicsyntax = False
- badprovsyntax = False
- # catpkg = catdir + "/" + y_ebuild
-
- badlicsyntax = len([z for z in dynamic_data['type_list'] if z == "LICENSE"])
- badprovsyntax = len([z for z in dynamic_data['type_list'] if z == "PROVIDE"])
- baddepsyntax = len(dynamic_data['type_list']) != badlicsyntax + badprovsyntax
- badlicsyntax = badlicsyntax > 0
- badprovsyntax = badprovsyntax > 0
-
used_useflags = used_useflags.union(dynamic_data['ebuild_UsedUseFlags'])
# license checks
- if not badlicsyntax:
+ if not dynamic_data['badlicsyntax']:
self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
@@ -452,7 +436,7 @@ class Scanner(object):
dep_settings.usemask = dep_settings._use_manager.getUseMask(
dynamic_data['pkg'], stable=dep_settings._parent_stable)
- if not baddepsyntax:
+ if not dynamic_data['baddepsyntax']:
ismasked = not dynamic_data['ebuild'].archs or \
dynamic_data['pkg'].cpv not in self.portdb.xmatch("match-visible",
Atom("%s::%s" % (dynamic_data['pkg'].cp, self.repo_settings.repo_config.name)))
@@ -542,7 +526,7 @@ class Scanner(object):
% (dynamic_data['ebuild'].relative_path, mytype, keyword,
prof, pformat(atoms, indent=6)))
- if not baddepsyntax and dynamic_data['unknown_pkgs']:
+ if not dynamic_data['baddepsyntax'] and dynamic_data['unknown_pkgs']:
type_map = {}
for mytype, atom in dynamic_data['unknown_pkgs']:
type_map.setdefault(mytype, set()).add(atom)
next reply other threads:[~2016-03-07 21:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 21:53 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-12 18:10 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/depend/, pym/repoman/ Brian Dolbec
2016-03-11 0:41 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-30 8:00 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-29 5:01 Brian Dolbec
2016-01-29 5:01 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-23 1:42 Brian Dolbec
2016-01-23 1:42 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-11 8:01 Brian Dolbec
2016-01-11 6:31 Brian Dolbec
2016-01-11 6:31 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
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=1457385654.f71e5099608242138eff2f4f9d24cbfd82fb98dc.dolsen@gentoo \
--to=dolsen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-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