Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14604 - Tidy up warning in eutils.class
Summary: Tidy up warning in eutils.class
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: High trivial (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-26 22:09 UTC by Shevek
Modified: 2011-10-30 22:18 UTC (History)
1 user (show)

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 Shevek 2003-01-26 22:09:33 UTC
if [ -n "${ADMINPARAM}" -a "${jobs}" -gt "${ADMINPARAM}" ]
        then
                einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure succes
sful merge..."
                export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
        else
                einfo "Setting make jobs to \"-j${jobs}\" to ensure successful m
erge..."
                export MAKEOPTS="${MAKEOPTS} -j${jobs}"
        fi


The first line expands (by default, in mozilla ebuild) to
'[' -n '' -a 2 -gt '' ']'
which issues a warning
-bash: [: : integer expression expected

If this was changed to
if [ -n "${ADMINPARAM}" ]
then
	if [ "${jobs}" -gt "${ADMINPARAM}" ]
	then
		jobs="${ADMINPARAM}"
	fi
fi
[now set make jobs unconditionally]

this warning will no longer happen

S.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-28 15:15:00 UTC
I cannot get it to do that.
Comment 2 Jon Nelson (RETIRED) 2003-01-29 12:35:26 UTC
The same exact problem happens for me, too.
USE="-gtk2" emerge --debug --buildpkg --deep galeon

although mozilla works too (duh).

emerge --version:
Portage 2.0.46-r9 (unavailable, gcc-2.95.3, glibc-2.2.5-r7)

honker root # grep ADMINPARAM /etc/*
honker root # 

Regardless, it's a clear cause-and-effect, and a clear fix, too.



--- eutils.eclass       2003-01-29 12:30:44.000000000 -0600
+++ /usr/portage/eclass/eutils.eclass   2003-01-19 14:52:06.000000000 -0600
@@ -381,16 +381,10 @@
                jobs=1
        fi
 
-       if [ -n "${ADMINPARAM}" ]
+       if [ -n "${ADMINPARAM}" -a "${jobs}" -gt "${ADMINPARAM}" ]
        then
-               if [ "${jobs}" -gt "${ADMINPARAM}" ]
-               then
-                       einfo "Setting make jobs to \"-j${ADMINPARAM}\" to
ensure successful merge..."
-                       export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
-               else
-                       einfo "Setting make jobs to \"-j${jobs}\" to ensure
successful merge..."
-                       export MAKEOPTS="${MAKEOPTS} -j${jobs}"
-               fi
+               einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure
successful merge..."
+               export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
        else
                einfo "Setting make jobs to \"-j${jobs}\" to ensure successful
merge..."
                export MAKEOPTS="${MAKEOPTS} -j${jobs}"
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-01 00:41:13 UTC
Ill take that as a reversed patch.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-02 14:42:41 UTC
Anyhow, sharp eye, thanks Jon ... fixed in CVS.