From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C26991381F3 for ; Fri, 5 Jul 2013 17:56:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72C0EE0950; Fri, 5 Jul 2013 17:56:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E9186E0950 for ; Fri, 5 Jul 2013 17:56:21 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6708133E8E1 for ; Fri, 5 Jul 2013 17:56:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0321DE468F for ; Fri, 5 Jul 2013 17:56:19 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1373046942.d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/overlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/overlay/root.py X-VCS-Directories: roverlay/overlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9 X-VCS-Branch: gsoc13/next Date: Fri, 5 Jul 2013 17:56:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7088d802-57ae-4a23-b8cb-96f993621b5a X-Archives-Hash: 2895f287d43cccf268513846a8d3d1d7 commit: d7d43b9c1ba13d14233ea1daf8eabcc2b61134d9 Author: André Erdmann mailerd de> AuthorDate: Fri Jul 5 17:55:42 2013 +0000 Commit: André Erdmann mailerd 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." )