From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/overlay/
Date: Fri, 5 Jul 2013 17:56:19 +0000 (UTC) [thread overview]
Message-ID: <1373046942.d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9.dywi@gentoo> (raw)
commit: d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Jul 5 17:55:42 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Jul 5 17:55:42 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d7d43b9c
"selfdep reduction": add debug print() statements
---
roverlay/overlay/root.py | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/roverlay/overlay/root.py b/roverlay/overlay/root.py
index c754cd3..698170d 100644
--- a/roverlay/overlay/root.py
+++ b/roverlay/overlay/root.py
@@ -678,6 +678,10 @@ class Overlay ( object ):
# --- end of iter_package_info (...) ---
def remove_bad_packages ( self ):
+ #FIXME: debug print
+ print ( "REMOVE_BAD_PACKAGES: starting selfdep reduction ... " )
+ print ( "REMOVE_BAD_PACKAGES: 'prepare' ... " )
+
#
# "prepare"
#
@@ -696,6 +700,8 @@ class Overlay ( object ):
# -- end for cat;
del add_selfdeps
+ print ( "REMOVE_BAD_PACKAGES: 'link' ... " )
+
##
## link:
## foreach selfdep in S loop
@@ -712,6 +718,8 @@ class Overlay ( object ):
)
# -- end for selfdep;
+ print ( "REMOVE_BAD_PACKAGES: 'reduce' ... " )
+
#
# "reduce"
#
@@ -737,6 +745,8 @@ class Overlay ( object ):
num_removed_total += num_removed
# -- end while num_removed;
+ print ( "REMOVE_BAD_PACKAGES: 'balance' ... " )
+
#
# "balance"
#
@@ -744,15 +754,33 @@ class Overlay ( object ):
## drop p
##
+ #FIXME: PKG_REMOVED*: debug code
+ PKG_REMOVED = list()
+ PKG_REMOVED_ADD = PKG_REMOVED.append
+
+
num_pkg_removed = 0
for cat in self._categories.values():
for pkgdir in cat._subdirs.values():
for pvr, p_info in pkgdir._packages.items():
if not p_info.has_valid_selfdeps():
+ # FIXME: debug print
+ PKG_REMOVED_ADD ( "{}-{}".format ( pkgdir.name, pvr ) )
pkgdir.purge_package ( pvr )
num_pkg_removed += 1
# -- end for cat;
+ print ( "REMOVE_BAD_PACKAGES: 'finalize' ... " )
+
+ #FIXME: PKG_REMOVED*
+ if PKG_REMOVED:
+ with open ( "/tmp/roverlay_selfdep_redux.dbg", 'wt' ) as DEBUG_FH:
+ for line in PKG_REMOVED:
+ DEBUG_FH.write ( line )
+ DEBUG_FH.write ( '\n' )
+
+
+ # FIXME: debug prints (use logging, ...)
if num_pkg_removed > 0:
# remove_empty_categories() could be done in the loop above
@@ -760,15 +788,13 @@ class Overlay ( object ):
print (
'REMOVE_BAD_PACKAGES: found {:d} unsatisfied selfdeps, '
- 'which caused {:d} \'broken\' ebuild to be removed.'.format (
- num_removed_total
+ 'which caused {:d} \'broken\' ebuilds to be removed.'.format (
+ num_removed_total, num_pkg_removed
)
)
elif num_removed_total > 0:
raise Exception (
- "num_removed_total > 0, but no packages removed?!".format (
- num_removed_total
- )
+ "num_removed_total > 0, but no packages removed?!"
)
else:
print ( "REMOVE_BAD_PACKAGES: nothing done." )
next reply other threads:[~2013-07-05 17:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 17:56 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-10 15:10 [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/overlay/ André Erdmann
2013-06-22 15:24 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-22 15:14 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-18 14:12 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-15 8:59 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-13 16:34 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-05 18:08 ` [gentoo-commits] proj/R_overlay:gsoc13/next " 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=1373046942.d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9.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