From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/
Date: Tue, 3 Sep 2013 08:35:31 +0000 (UTC) [thread overview]
Message-ID: <1378197269.99445900f7184524d53d47239c4d5025a80c7b38.dywi@gentoo> (raw)
commit: 99445900f7184524d53d47239c4d5025a80c7b38
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Sep 3 08:34:29 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Sep 3 08:34:29 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=99445900
dynamic selfdep pool: use sorted rules
sort rule dict by repo
---
roverlay/depres/simpledeprule/dynpool.py | 30 ++++++++++--------------------
1 file changed, 10 insertions(+), 20 deletions(-)
diff --git a/roverlay/depres/simpledeprule/dynpool.py b/roverlay/depres/simpledeprule/dynpool.py
index 7688bf1..c5e9394 100644
--- a/roverlay/depres/simpledeprule/dynpool.py
+++ b/roverlay/depres/simpledeprule/dynpool.py
@@ -9,17 +9,14 @@
This module provides a class, DynamicSelfdepRulePool, that creates dynamic
(i.e. exist only in memory, not as file) dependency rules that resolve
dependencies on other R packages ("sci-R/<pkg>" if OVERLAY_CATEGORY is sci-R).
-The rules are created by using a "rule keyword function" (a function/generator
-that yields keywords for rule creation), typically provided by the overlay
-package's "root" module.
+The rules are created by using a rule generator, typically provided by the
+overlay.
The DynamicSelfdepRulePool is strict about matches; it only matches strings
whose dependency type contains deptype.internal.
"""
__all__ = [ 'DynamicSelfdepRulePool', 'get' ]
-import collections
-
from roverlay.depres import deptype
from roverlay.depres.deprule import DynamicDependencyRulePool
from roverlay.depres.simpledeprule.rules import SimpleFuzzyDependencyRule
@@ -40,12 +37,8 @@ class DynamicSelfdepRulePool ( DynamicDependencyRulePool ):
# --- end of __init__ (...) ---
def sort_rules ( self ):
- # TODO: sort self.rules itself ("sort repos")
- priokey = lambda k: k.priority
-
- if self.rules:
- for rules in self.rules.values():
- rules.sort ( key=priokey )
+ # already sorted
+ pass
# --- end of sort_rules (...) ---
def iter_rules ( self ):
@@ -76,17 +69,14 @@ class DynamicSelfdepRulePool ( DynamicDependencyRulePool ):
return False
# --- end of accepts_other (...) ---
- def reload ( self ):
- self.rules = self._rule_generator.make_rule_dict()
- # --- end of reload (...) ---
-
+ def reload_rules ( self ):
+ self.rules = self._rule_generator.make_ordered_rule_dict()
+ # --- end of reload_rules (...) ---
# --- end of DynamicSelfdepRulePool ---
-def get ( rule_kw_function ):
- """Returns a default DynamicSelfdepRulePool for rule_kw_function."""
- return DynamicSelfdepRulePool (
- rule_kw_function, SimpleFuzzyDependencyRule
- )
+def get ( rule_generator ):
+ """Returns a default DynamicSelfdepRulePool for rule_generator."""
+ return DynamicSelfdepRulePool ( rule_generator, SimpleFuzzyDependencyRule )
# --- end of get (...) ---
next reply other threads:[~2013-09-03 8:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 8:35 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-23 19:03 [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/ André Erdmann
2014-07-29 18:29 André Erdmann
2014-08-23 19:03 ` André Erdmann
2014-06-25 16:41 André Erdmann
2014-06-05 22:09 André Erdmann
2013-08-27 15:39 André Erdmann
2013-08-21 13:51 André Erdmann
2013-08-21 10:10 André Erdmann
2013-07-23 7:51 André Erdmann
2013-07-10 15:10 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-03 10:05 André Erdmann
2013-07-03 10:04 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-03 10:05 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-05 18:08 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-13 16:34 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-04 21:06 André Erdmann
2012-08-13 16:34 André Erdmann
2012-08-02 15:14 André Erdmann
2012-08-01 21:10 André Erdmann
2012-07-11 18:43 André Erdmann
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=1378197269.99445900f7184524d53d47239c4d5025a80c7b38.dywi@gentoo \
--to=dywi@mailerd.de \
--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