Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510242 - phase-functions.sh: __ebuild_main may sleep for 5 seconds with no logical reason whatsoever
Summary: phase-functions.sh: __ebuild_main may sleep for 5 seconds with no logical rea...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-05-13 14:52 UTC by Hristo Venev
Modified: 2017-10-27 19:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Venev 2014-05-13 14:52:54 UTC
After write()-ing the following data to file descriptor 0 (xxd -p hexdump):

0a212121205765206170706172656e746c7920686176656e277420756e70
61636b65642e2e2e20546869732069732070726f6261626c79206e6f7420
7768617420796f750a2121212077616e7420746f20626520646f696e672e
2e2e20596f7520617265207573696e672046454154555245533d6e6f6175
746f20736f2049276c6c20617373756d650a212121207468617420796f75
206b6e6f77207768617420796f752061726520646f696e672e2e2e20596f
7520686176652035207365636f6e647320746f2061626f72742e2e2e0a0a

Suggested fix:
--- a/phase-functions.sh
+++ b/phase-functions.sh
@@ -919,25 +919,6 @@
 			[ -z "$PKG_CONFIG_PATH" -a -n "$ABI" -a -n "${!x}" ] && \
 				export PKG_CONFIG_PATH=${EPREFIX}/usr/${!x}/pkgconfig
 
-			if has noauto $FEATURES && \
-				[[ ! -f $PORTAGE_BUILDDIR/.unpacked ]] ; then
-				echo
-				echo "!!! We apparently haven't unpacked..." \
-					"This is probably not what you"
-				echo "!!! want to be doing... You are using" \
-					"FEATURES=noauto so I'll assume"
-				echo "!!! that you know what you are doing..." \
-					"You have 5 seconds to abort..."
-				echo
-
-				local x
-				for x in 1 2 3 4 5 6 7 8; do
-					LC_ALL=C sleep 0.25
-				done
-
-				sleep 3
-			fi
-
 			cd "$PORTAGE_BUILDDIR"
 			if [ ! -d build-info ] ; then
 				mkdir build-info



Reproducible: Always
Comment 1 dwfreed 2014-05-31 01:36:45 UTC
That looks like a perfectly logical reason to me, unless I'm missing something.  That code is verifying that the unpack phase has properly run if you have 'noauto' set in FEATURES, otherwise things are likely to go sideways.  I don't see how the rest is related at all.
Comment 2 Zac Medico gentoo-dev 2017-10-27 19:16:58 UTC
The extra sleep calls have been removed:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=a95a27fdf101188e41a6e803f664610f9826925a