public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Paul Varner" <fuzzyray@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/
Date: Wed, 25 May 2011 01:02:57 +0000 (UTC)	[thread overview]
Message-ID: <d04544e03702d7358a8ccdee4a7696cdcba91b9c.fuzzyray@gentoo> (raw)

commit:     d04544e03702d7358a8ccdee4a7696cdcba91b9c
Author:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 00:55:03 2011 +0000
Commit:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed May 25 00:55:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=d04544e0

Change revdep-rebuild to no longer determine the build order.  Instead
we call emerge with --complete-graph=y to build the packages in the
correct order.

---
 bin/revdep-rebuild |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild
index 6b584cf..f00b791 100755
--- a/bin/revdep-rebuild
+++ b/bin/revdep-rebuild
@@ -979,15 +979,19 @@ get_build_order() {
 				fi
 			fi
 			RAW_REBUILD_LIST="${RAW_REBUILD_LIST[@]}"
-			REBUILD_GREP=$(emerge --nodeps $RAW_REBUILD_LIST | sed 's/\[[^]]*\]//g')
-			if (( ${PIPESTATUS[0]} == 0 )); then
-				emerge --deep $RAW_REBUILD_LIST |
-					sed 's/\[[^]]*\]//g' |
-					grep -F "$REBUILD_GREP" > "$ORDER_FILE"
-			fi
 
-			# Here we use the PIPESTATUS from the second emerge, the --deep one.
-			if (( ${PIPESTATUS[0]} != 0 )); then
+			# We no longer determine the package order ourselves.  Instead we call emerge
+			# with --complete-graph=y in the rebuild function.
+			if false ; then
+				REBUILD_GREP=$(emerge --nodeps $RAW_REBUILD_LIST | sed 's/\[[^]]*\]//g')
+				if (( ${PIPESTATUS[0]} == 0 )); then
+					emerge --deep $RAW_REBUILD_LIST |
+						sed 's/\[[^]]*\]//g' |
+						grep -F "$REBUILD_GREP" > "$ORDER_FILE"
+				fi
+
+				# Here we use the PIPESTATUS from the second emerge, the --deep one.
+				if (( ${PIPESTATUS[0]} != 0 )); then
 					eerror
 					eerror 'Warning: Failed to resolve package order.'
 					eerror 'Will merge in arbitrary order'
@@ -1000,6 +1004,9 @@ get_build_order() {
 					EOF
 					countdown 5
 					rm -f "$ORDER_FILE"
+				fi
+			else
+				echo "$RAW_REBUILD_LIST" > "$ORDER_FILE"
 			fi
 			export EMERGE_DEFAULT_OPTS="$OLD_EMERGE_DEFAULT_OPTS"
 		else
@@ -1112,8 +1119,11 @@ setup_search_paths_and_masks() {
 # Rebuild packages owning broken binaries
 rebuild() {
 	if [[ -r $ORDER_FILE && -s $ORDER_FILE ]]; then
-		REBUILD_LIST=( $(<"$ORDER_FILE") )
-		REBUILD_LIST="${REBUILD_LIST[@]/#/=}"
+		# The rebuild list contains category/package:slot atoms.
+		# Do not prepend with an '=' sign.
+		# REBUILD_LIST=( $(<"$ORDER_FILE") )
+		# REBUILD_LIST="${REBUILD_LIST[@]/#/=}"
+		REBUILD_LIST=$(<"$ORDER_FILE")
 	else
 		REBUILD_LIST=$(sort -u "$EBUILDS_FILE")
 	fi
@@ -1121,7 +1131,7 @@ rebuild() {
 	trap - SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM
 
 	[[ $QUIET -ne 1 ]] && einfo 'All prepared. Starting rebuild'
-	echo "emerge --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST"
+	echo "emerge --complete-graph=y --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST"
 
 	is_real_merge && countdown 10
 
@@ -1130,7 +1140,7 @@ rebuild() {
 
 	# Run in background to correctly handle Ctrl-C
 	{
-		emerge --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST <&6
+		emerge --complete-graph=y --oneshot ${EMERGE_DEFAULT_OPTS} ${EMERGE_OPTIONS[@]} $REBUILD_LIST <&6
 		echo $? > "$STATUS_FILE"
 	} &
 	wait



             reply	other threads:[~2011-05-25  1:03 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  1:02 Paul Varner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-02 19:32 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/ Paul Varner
2015-04-23 21:20 Paul Varner
2015-01-23 21:22 Paul Varner
2014-10-24 18:02 Paul Varner
2014-03-06 16:39 Paul Varner
2014-02-12 10:22 Brian Dolbec
2013-11-20 20:38 Vikraman Choudhury
2013-11-20  2:34 Paul Varner
2013-11-05 17:24 Paul Varner
2013-09-10 23:03 Paul Varner
2013-09-10 18:53 Paul Varner
2013-09-10 16:01 Paul Varner
2013-09-04 21:44 Paul Varner
2013-08-29 17:37 Paul Varner
2013-07-08 19:20 Paul Varner
2012-09-26  6:13 Paul Varner
2012-06-20 17:17 Paul Varner
2012-06-20 17:17 Paul Varner
2012-05-16 22:31 Paul Varner
2012-04-11 18:50 Paul Varner
2012-04-11 17:42 Paul Varner
2012-03-20  4:04 Paul Varner
2012-03-06  5:36 Paul Varner
2012-02-28 21:44 Paul Varner
2012-02-20 23:25 Paul Varner
2012-02-20 23:25 Paul Varner
2012-02-16 17:37 Paul Varner
2011-11-28 15:46 Paul Varner
2011-10-12 16:39 Paul Varner
2011-09-07 12:40 Christian Ruppert
2011-08-24 17:30 Paul Varner
2011-07-27 19:02 Paul Varner
2011-07-13 16:01 Paul Varner
2011-07-13 15:41 Paul Varner
2011-07-12 21:45 Paul Varner
2011-05-29 10:59 Christian Ruppert
2011-05-23 21:28 Paul Varner
2011-05-12  2:55 Paul Varner
2011-05-11  2:06 Paul Varner
2011-05-11  0:43 Paul Varner
2011-04-24  0:59 Brian Dolbec
2011-03-29  2:18 Paul Varner
2011-02-25 16:50 Paul Varner
2011-02-25 16:50 Paul Varner
2011-02-25 16:50 Paul Varner

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=d04544e03702d7358a8ccdee4a7696cdcba91b9c.fuzzyray@gentoo \
    --to=fuzzyray@gentoo.org \
    --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