From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/, roverlay/overlay/
Date: Thu, 11 Jul 2013 08:49:27 +0000 (UTC) [thread overview]
Message-ID: <1373531830.ab7750a06b411f219e5de1c444e928755903a880.dywi@gentoo> (raw)
Message-ID: <20130711084927.4JH_v8YmuPn2P-Lk6gXnNlqxXMRts0pQ9Znw3eAJgYA@z> (raw)
commit: ab7750a06b411f219e5de1c444e928755903a880
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Jul 11 08:37:10 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Jul 11 08:37:10 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ab7750a0
fix dot remapping for dynamic selfdeps
This commit fixes a bug in the dynamic selfdep pool concerning dot chars '.' in
dependency strings (which are replaced by '_' in ebuild names). Basically, the
dynamic selfdep pool did not call <newly created rule>.done_reading() after
reloading its rules which resulted in not having dot-remapped aliases available
for dep resolution.
In addition to fixing this (mis-)behavior, real package names (provided by
packageinfo instances) are now used when available (instead of replacing all '_'
chars with '.').
---
roverlay/depres/simpledeprule/abstractrules.py | 24 +++++++++++++++++++-----
roverlay/overlay/category.py | 15 +++++++++++----
2 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/roverlay/depres/simpledeprule/abstractrules.py b/roverlay/depres/simpledeprule/abstractrules.py
index b80eb00..a94d2f3 100644
--- a/roverlay/depres/simpledeprule/abstractrules.py
+++ b/roverlay/depres/simpledeprule/abstractrules.py
@@ -20,7 +20,8 @@ class SimpleRule ( deprule.DependencyRule ):
def __init__ ( self,
dep_str=None, priority=50, resolving_package=None,
- is_selfdep=0, logger_name='simple_rule'
+ is_selfdep=0, logger_name='simple_rule',
+ selfdep_package_names=None, finalize=False,
):
"""Initializes a SimpleIgnoreDependencyRule.
@@ -40,11 +41,24 @@ class SimpleRule ( deprule.DependencyRule ):
self.dep_alias.append ( dep_str )
if self.is_selfdep:
- # add the actual package name (replace '_' by '.')
- # to self.dep_alias
- actual_name = dep_str.replace ( '_', '.' )
- if actual_name != dep_str:
+ # add the actual package name to self.dep_alias
+ # (replace '_' by '.' or use selfdep_package_names)
+ #
+ #
+ # no need to check for duplicates, they get removed
+ # in done_reading anyway
+
+ if selfdep_package_names:
+ for alias in selfdep_package_names:
+ self.dep_alias.append ( alias )
+ ##elif selfdep_package_names is False: ignore
+ else:
+ actual_name = dep_str.replace ( '_', '.' )
self.dep_alias.append ( dep_str )
+ # -- end if dep_str
+
+ if finalize:
+ self.done_reading()
# --- end of __init__ (...) ---
def done_reading ( self ):
diff --git a/roverlay/overlay/category.py b/roverlay/overlay/category.py
index 8038141..330058c 100644
--- a/roverlay/overlay/category.py
+++ b/roverlay/overlay/category.py
@@ -164,11 +164,18 @@ class Category ( object ):
for name, subdir in self._subdirs.items():
if not subdir.empty():
yield dict (
- dep_str = name,
- resolving_package = ( self.name + "/" + name ),
- is_selfdep = 2 if is_default_category else 1,
+ dep_str = name,
+ resolving_package = ( self.name + "/" + name ),
+ is_selfdep = 2 if is_default_category else 1,
# prefer packages from the default category (really?)
- priority = 80 if is_default_category else 90,
+ priority = 80 if is_default_category else 90,
+ finalize = True,
+ selfdep_package_names = filter (
+ None, (
+ p.get ( 'package_name', do_fallback=True )
+ for p in subdir.iter_package_info()
+ )
+ ),
)
else:
for name, subdir in self._subdirs.items():
next reply other threads:[~2013-07-11 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 8:45 André Erdmann [this message]
2013-07-11 8:49 ` [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/, roverlay/overlay/ 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=1373531830.ab7750a06b411f219e5de1c444e928755903a880.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