svn commit: r200132 - user/dougb/portmaster
Doug Barton
dougb at FreeBSD.org
Sat Dec 5 18:40:26 UTC 2009
Author: dougb
Date: Sat Dec 5 18:40:26 2009
New Revision: 200132
URL: http://svn.freebsd.org/changeset/base/200132
Log:
If we are using --packages and/or --packages-newer and we have to
build anyway we must run the 'make config' code in addition to the
build dep check since a) the user might actually want to change
something, and b) if using -H and there are OPTIONS the build will hang.
To facilitate this turn the actual code to do 'make config' into a function
Testing if an existing package is actually readable is slightly more
useful than just testing if it exists.
If the package does exist, and we're not using --always-fetch then
return 0, both to skip the rest of the function and to make good use
of the return value in the 'second chance fetch' code.
Modified:
user/dougb/portmaster/portmaster
Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster Sat Dec 5 18:17:15 2009 (r200131)
+++ user/dougb/portmaster/portmaster Sat Dec 5 18:40:26 2009 (r200132)
@@ -1914,6 +1914,14 @@ multiport () {
safe_exit
}
+make_config () {
+ config_type=config-conditional
+ [ -n "$FORCE_CONFIG" ] && config_type=config
+ [ -n "$PM_SU_VERBOSE" ] &&
+ echo "===>>> Running 'make $config_type'"
+ pm_make_s $config_type
+}
+
#=============== End functions for main ===============
# INIT Parent
@@ -2299,13 +2307,7 @@ if [ -n "$CONFIG_ONLY" ]; then
fi
fi
- if [ -z "$PM_PACKAGES" ]; then
- config_type=config-conditional
- [ -n "$FORCE_CONFIG" ] && config_type=config
- [ -n "$PM_SU_VERBOSE" ] &&
- echo "===>>> Running 'make $config_type'"
- pm_make_s $config_type
- fi
+ [ -z "$PM_PACKAGES" ] && make_config
CONFIG_SEEN_LIST="${CONFIG_SEEN_LIST}${portdir}:"
@@ -2426,9 +2428,10 @@ fetch_package () {
export fetch_args; }
if [ -z "$PM_ALWAYS_FETCH" ]; then
- if [ -e "${ppd}/${1}.tbz" ]; then
+ if [ -r "${ppd}/${1}.tbz" ]; then
[ -n "$PM_VERBOSE" ] &&
echo "===>>> Package exists, skipping fetch"
+ return 0
else
do_fetch=1
fi
@@ -2579,6 +2582,8 @@ fi
if [ -z "$use_package" ]; then
if [ -n "$PM_PACKAGES" ]; then
+ make_config
+
if [ -z "$RECURSE_THOROUGH" ]; then
echo "===>>> Starting check for build dependencies"
dependency_check build-depends-list
More information about the svn-src-user
mailing list