[csw-devel] SF.net SVN: gar:[11839] csw/mgar/gar/v2/lib/python/package_checks.py
Maciej (Matchek) Blizinski
maciej at opencsw.org
Wed Dec 8 09:01:39 CET 2010
No dia 8 de Dezembro de 2010 03:44, <bdwalton at users.sourceforge.net> escreveu:
> Revision: 11839
> http://gar.svn.sourceforge.net/gar/?rev=11839&view=rev
> Author: bdwalton
> Date: 2010-12-08 03:44:54 +0000 (Wed, 08 Dec 2010)
>
> Log Message:
> -----------
> checkpkg: alter the handling of surplus dependency suppression to allow for passing regexes; this is in response to the cswclassutils -> cas_foo change
>
> Modified Paths:
> --------------
> csw/mgar/gar/v2/lib/python/package_checks.py
>
> Modified: csw/mgar/gar/v2/lib/python/package_checks.py
> ===================================================================
> --- csw/mgar/gar/v2/lib/python/package_checks.py 2010-12-08 01:20:00 UTC (rev 11838)
> +++ csw/mgar/gar/v2/lib/python/package_checks.py 2010-12-08 03:44:54 UTC (rev 11839)
> @@ -70,7 +70,7 @@
> DO_NOT_LINK_AGAINST_THESE_SONAMES = set([])
>
> # Regarding surplus libraries reports
> -DO_NOT_REPORT_SURPLUS = set([u"CSWcommon", u"CSWcswclassutils", u"CSWisaexec"])
> +DO_NOT_REPORT_SURPLUS = [r"^CSWcommon$", r"^CSWcswclassutils$", r"^CSWcas-", r"^CSWisaexec$"]
I'd wrap it to 80 chars.
They still can be a set, or even a frozenset.
> DO_NOT_REPORT_SURPLUS_FOR = [r"CSW[a-z\-]+dev(el)?"]
> DO_NOT_REPORT_MISSING = set([])
> DO_NOT_REPORT_MISSING_RE = [r"\*?SUNW.*"]
> @@ -375,7 +375,12 @@
> (x for x, y in reduce(operator.add, req_pkgs_reasons, [])))
> missing_dep_groups = new_missing_dep_groups
> surplus_deps = declared_deps_set.difference(potential_req_pkgs)
> - surplus_deps = surplus_deps.difference(DO_NOT_REPORT_SURPLUS)
> + no_report_surplus = set()
> + for sp_regex in DO_NOT_REPORT_SURPLUS:
> + for maybe_surplus in surplus_deps:
> + if re.match(sp_regex, maybe_surplus):
> + no_report_surplus.add(maybe_surplus)
> + surplus_deps = surplus_deps.difference(no_report_surplus)
> for regex_str in DO_NOT_REPORT_SURPLUS_FOR:
> if surplus_deps and re.match(regex_str, pkgname):
> surplus_deps = set()
Looks good.
Have tried running gar/v2/tests/run_tests.py?
More information about the devel
mailing list