[61427] branches/images-and-archives/base
blb at macports.org
blb at macports.org
Thu Dec 10 22:50:45 PST 2009
Revision: 61427
http://trac.macports.org/changeset/61427
Author: blb at macports.org
Date: 2009-12-10 22:50:45 -0800 (Thu, 10 Dec 2009)
Log Message:
-----------
Merge from trunk
Modified Paths:
--------------
branches/images-and-archives/base/configure
branches/images-and-archives/base/configure.ac
branches/images-and-archives/base/doc/macports.conf.in
branches/images-and-archives/base/src/macports1.0/macports.tcl
branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in
branches/images-and-archives/base/src/pextlib1.0/curl.c
branches/images-and-archives/base/src/pextlib1.0/system.c
branches/images-and-archives/base/src/pextlib1.0/tty.c
branches/images-and-archives/base/src/port/port-help.tcl
branches/images-and-archives/base/src/port/port.tcl
branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
branches/images-and-archives/base/src/port1.0/portconfigure.tcl
branches/images-and-archives/base/src/port1.0/portdestroot.tcl
branches/images-and-archives/base/src/port1.0/portload.tcl
branches/images-and-archives/base/src/port1.0/portmain.tcl
branches/images-and-archives/base/src/port1.0/portunload.tcl
branches/images-and-archives/base/src/port1.0/portutil.tcl
branches/images-and-archives/base/src/upgrade_sources_conf_default.tcl
Property Changed:
----------------
branches/images-and-archives/base/
Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-60581
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-61426
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/images-and-archives/base/configure
===================================================================
--- branches/images-and-archives/base/configure 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/configure 2009-12-11 06:50:45 UTC (rev 61427)
@@ -1,13 +1,15 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for MacPorts 1.8.99.
+# Generated by GNU Autoconf 2.65 for MacPorts 1.8.99.
#
# Report bugs to <macports-dev at lists.macosforge.org>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
@@ -527,7 +529,8 @@
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -1483,7 +1486,7 @@
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
OBJC Objective C compiler command
OBJCFLAGS Objective C compiler flags
@@ -1570,7 +1573,7 @@
if $ac_init_version; then
cat <<\_ACEOF
MacPorts configure 1.8.99
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -1617,7 +1620,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1655,7 +1658,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_objc_try_compile
@@ -1701,7 +1704,7 @@
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1738,7 +1741,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_objc_try_cpp
@@ -1873,7 +1876,7 @@
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_objc_try_run
@@ -1950,7 +1953,7 @@
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_objc_try_link
@@ -1987,7 +1990,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -2029,7 +2032,7 @@
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2236,7 +2239,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by MacPorts $as_me 1.8.99, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2489,7 +2492,7 @@
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -2498,9 +2501,9 @@
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -2889,7 +2892,7 @@
as_fn_error "This version of Mac OS X is not supported
Please upgrade at http://store.apple.com/" "$LINENO" 5
;;
- 10.4.[0-9]|10.4.10|10.5.[0-7])
+ 10.4.[0-9]|10.4.10|10.5.[0-7]|10.6.[0-1])
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This version of Mac OS X is out of date" >&5
$as_echo "$as_me: WARNING: This version of Mac OS X is out of date" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please run Software Update to update it" >&5
@@ -3268,32 +3271,30 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -3355,10 +3356,10 @@
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -3366,51 +3367,18 @@
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -3443,13 +3411,72 @@
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -3837,8 +3864,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -9815,7 +9842,7 @@
# values after options handling.
ac_log="
This file was extended by MacPorts $as_me 1.8.99, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -9854,6 +9881,7 @@
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -9873,10 +9901,11 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
MacPorts config.status 1.8.99
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -9912,6 +9941,8 @@
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -10107,7 +10138,7 @@
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -10121,7 +10152,7 @@
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
Modified: branches/images-and-archives/base/configure.ac
===================================================================
--- branches/images-and-archives/base/configure.ac 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/configure.ac 2009-12-11 06:50:45 UTC (rev 61427)
@@ -2,7 +2,7 @@
dnl $Id$
AC_PREREQ(2.63)
AC_DEFUN([MACPORTS_VERSION_MACRO], [esyscmd(cat config/macports_version | tr -d '\n')])
-AC_INIT([MacPorts],[MACPORTS_VERSION_MACRO],[macports-dev at lists.macosforge.org],[macports])
+AC_INIT([MacPorts],MACPORTS_VERSION_MACRO,[macports-dev at lists.macosforge.org],[macports])
AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
AC_CONFIG_HEADERS([src/config.h])
@@ -32,7 +32,7 @@
AC_MSG_ERROR([This version of Mac OS X is not supported
Please upgrade at http://store.apple.com/])
;;
- 10.4.[[0-9]]|10.4.10|10.5.[[0-7]])
+ 10.4.[[0-9]]|10.4.10|10.5.[[0-7]]|10.6.[[0-1]])
AC_MSG_WARN([This version of Mac OS X is out of date])
AC_MSG_WARN([Please run Software Update to update it])
;;
Modified: branches/images-and-archives/base/doc/macports.conf.in
===================================================================
--- branches/images-and-archives/base/doc/macports.conf.in 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/doc/macports.conf.in 2009-12-11 06:50:45 UTC (rev 61427)
@@ -5,7 +5,7 @@
prefix @prefix_expanded@
# Set the user to run MacPorts compiles, etc as when privileges are dropped during an install
-macportsuser @RUNUSR@
+#macportsuser @RUNUSR@
# Where to store MacPorts working data
portdbpath @localstatedir_expanded@/macports
Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -52,7 +52,7 @@
portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen portsharepath \
registry.path registry.format portimagefilepath portautoclean \
porttrace keeplogs portverbose destroot_umask rsync_server \
- rsync_options rsync_dir startupitem_type place_worksymlink \
+ rsync_options rsync_dir startupitem_type place_worksymlink macportsuser \
mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
applications_dir current_stage frameworks_dir developer_dir universal_archs build_arch $user_options \
os_arch os_endian os_major os_platform os_version"
@@ -112,6 +112,9 @@
proc macports::init_logging {portname} {
global ::debuglog ::debuglogname macports::channels macports::portdbpath
+ if {[getuid] == 0 && [geteuid] != 0} {
+ seteuid 0
+ }
set logspath [file join $macports::portdbpath logs]
if {([file exists $logspath] && ![file writable $logspath]) || (![file exists $logspath] && ![file writable $macports::portdbpath])} {
ui_debug "logging disabled, can't write to $logspath"
@@ -684,7 +687,12 @@
if {![info exists macports::buildmakejobs]} {
set macports::buildmakejobs 0
}
-
+
+ # default user to run as when privileges can be dropped
+ if {![info exists macports::macportsuser]} {
+ set macports::macportsuser $macports::autoconf::macportsuser
+ }
+
# Default Xcode Tools path
if {![info exists macports::developer_dir]} {
set macports::developer_dir "/Developer"
@@ -828,7 +836,7 @@
_mports_load_quickindex
set default_source_url [lindex ${sources_default} 0]
- if {[macports::getprotocol $default_source_url] == "file"} {
+ if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
set default_portindex [macports::getindex $default_source_url]
if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
ui_warn "port definitions are more than two weeks old, consider using selfupdate"
@@ -1245,7 +1253,7 @@
# search_path -> directories to search
# executable -> whether we want to check that the file is executable by current
# user or not.
-proc _mportsearchpath {depregex search_path {executable 0}} {
+proc _mportsearchpath {depregex search_path {executable 0} {return_match 0}} {
set found 0
foreach path $search_path {
if {![file isdirectory $path]} {
@@ -1254,7 +1262,6 @@
if {[catch {set filelist [readdir $path]} result]} {
return -code error "$result ($path)"
- set filelist ""
}
foreach filename $filelist {
@@ -1266,7 +1273,15 @@
}
}
}
- return $found
+ if {$return_match} {
+ if {$found} {
+ return [file join $path $filename]
+ } else {
+ return ""
+ }
+ } else {
+ return $found
+ }
}
### _libtest is private; subject to change without notice
@@ -1279,7 +1294,7 @@
# Environment variables DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH,
# DYLD_FALLBACK_FRAMEWORK_PATH, and DYLD_FALLBACK_LIBRARY_PATH take precedence
-proc _libtest {mport depspec} {
+proc _libtest {mport depspec {return_match 0}} {
global env macports::os_platform
set depline [lindex [split $depspec :] 1]
set prefix [_mportkey $mport prefix]
@@ -1312,12 +1327,12 @@
set depregex \^${depname}\\.so${depversion}\$
}
- return [_mportsearchpath $depregex $search_path]
+ return [_mportsearchpath $depregex $search_path 0 $return_match]
}
### _bintest is private; subject to change without notice
-proc _bintest {mport depspec} {
+proc _bintest {mport depspec {return_match 0}} {
global env
set depregex [lindex [split $depspec :] 1]
set prefix [_mportkey $mport prefix]
@@ -1326,12 +1341,12 @@
set depregex \^$depregex\$
- return [_mportsearchpath $depregex $search_path 1]
+ return [_mportsearchpath $depregex $search_path 1 $return_match]
}
### _pathtest is private; subject to change without notice
-proc _pathtest {mport depspec} {
+proc _pathtest {mport depspec {return_match 0}} {
global env
set depregex [lindex [split $depspec :] 1]
set prefix [_mportkey $mport prefix]
@@ -1348,7 +1363,7 @@
set depregex \^$depregex\$
- return [_mportsearchpath $depregex $search_path]
+ return [_mportsearchpath $depregex $search_path 0 $return_match]
}
### _porttest is private; subject to change without notice
@@ -1553,6 +1568,11 @@
catch {cd $portpath}
$workername eval eval_targets clean
}
+
+ global ::debuglogname
+ if {$result != 0 && ![macports::ui_isset ports_quiet] && [info exists ::debuglogname]} {
+ ui_msg "Log for $portname is at: $::debuglogname"
+ }
return $result
}
@@ -1573,8 +1593,8 @@
}
foreach depspec $depends {
- set dep_portname [lindex [split $depspec :] end]
- if {![info exists depscache(port:$dep_portname)] && [registry::entry_exists_for_name $dep_portname]} {
+ set dep_portname [_get_dep_port $mport $depspec]
+ if {$dep_portname != "" && ![info exists depscache(port:$dep_portname)] && [registry::entry_exists_for_name $dep_portname]} {
set status [macports::upgrade $dep_portname "port:$dep_portname" {} $options depscache]
# status 2 means the port was not found in the index
if {$status != 0 && $status != 2 && ![macports::ui_isset ports_processall]} {
@@ -1584,6 +1604,43 @@
}
}
+# returns the name of the port that will actually be satisfying $depspec
+proc macports::_get_dep_port {mport depspec} {
+ set speclist [split $depspec :]
+ set portname [lindex $speclist end]
+ if {[string equal ${macports::registry.installtype} "image"]} {
+ set res [_portnameactive $portname]
+ } else {
+ set res [registry::entry_exists_for_name $portname]
+ }
+ if {$res != 0} {
+ return $portname
+ }
+
+ set depfile ""
+ switch [lindex $speclist 0] {
+ bin {
+ set depfile [_bintest $mport $depspec 1]
+ }
+ lib {
+ set depfile [_libtest $mport $depspec 1]
+ }
+ path {
+ set depfile [_pathtest $mport $depspec 1]
+ }
+ }
+ if {$depfile == ""} {
+ return $portname
+ } else {
+ set theport [registry::file_registered $depfile]
+ if {$theport != 0} {
+ return $theport
+ } else {
+ return ""
+ }
+ }
+}
+
proc macports::getsourcepath {url} {
global macports::portdbpath
@@ -2344,7 +2401,7 @@
set owner [file attributes ${prefix} -owner]
set group [file attributes ${prefix} -group]
set perms [string range [file attributes ${prefix} -permissions] end-3 end]
- if {![string equal $tcl_platform(user) $owner]} {
+ if {$tcl_platform(user) != "root" && ![string equal $tcl_platform(user) $owner]} {
return -code error "User $tcl_platform(user) does not own ${prefix} - try using sudo"
}
ui_debug "Permissions OK"
@@ -2857,6 +2914,7 @@
upvar $portinfoname portinfo $depscachename depscache \
$variationslistname variationslist \
$optionsname options
+ upvar workername parentworker
# If we're following dependents, we only want to follow this port's
# dependents, not those of all its dependencies. Otherwise, we would
@@ -2875,9 +2933,15 @@
foreach dtype {depends_fetch depends_extract depends_build depends_lib depends_run} {
if {[info exists portinfo($dtype)]} {
foreach i $portinfo($dtype) {
- set d [lindex [split $i :] end]
+ set d [_get_dep_port $parentworker $i]
if {![llength [array get depscache port:${d}]] && ![llength [array get depscache $i]]} {
- set status [macports::_upgrade $d $i $variationslist [array get options] depscache]
+ if {$d != ""} {
+ set dspec port:$d
+ } else {
+ set dspec $i
+ set d [lindex [split $i :] end]
+ }
+ set status [macports::_upgrade $d $dspec $variationslist [array get options] depscache]
if {$status != 0 && ![ui_isset ports_processall]} break
}
}
Modified: branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/macports1.0/macports_autoconf.tcl.in 2009-12-11 06:50:45 UTC (rev 61427)
@@ -37,6 +37,7 @@
variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
variable macports_version "@MACPORTS_VERSION@"
variable macports_user_dir "~/.macports"
+ variable macportsuser "@RUNUSR@"
variable open_path "@OPEN@"
variable rsync_path "@RSYNC@"
variable tar_command "@TAR_CMD@"
Modified: branches/images-and-archives/base/src/pextlib1.0/curl.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/curl.c 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/pextlib1.0/curl.c 2009-12-11 06:50:45 UTC (rev 61427)
@@ -37,6 +37,7 @@
#include <ctype.h>
#include <errno.h>
#include <pthread.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -115,9 +116,10 @@
int theResult = TCL_OK;
CURL* theHandle = NULL;
FILE* theFile = NULL;
+ bool performFailed = false;
+ char theErrorString[CURL_ERROR_SIZE];
do {
- long theResponseCode = 0;
int noprogress = 1;
int useepsv = 1;
int ignoresslcert = 0;
@@ -331,13 +333,19 @@
break;
}
+ theCurlCode = curl_easy_setopt(theHandle, CURLOPT_ERRORBUFFER, theErrorString);
+ if (theCurlCode != CURLE_OK) {
+ theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+ break;
+ }
+
/* actually fetch the resource */
theCurlCode = curl_easy_perform(theHandle);
if (theCurlCode != CURLE_OK) {
- theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+ performFailed = true;
break;
}
-
+
/* close the file */
(void) fclose( theFile );
theFile = NULL;
@@ -402,37 +410,23 @@
0);
}
- /* check everything went fine */
- theCurlCode = curl_easy_getinfo(theHandle, CURLINFO_HTTP_CODE, &theResponseCode);
- if (theCurlCode != CURLE_OK) {
- theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
- break;
- }
-
- /* we need something between 200 (incl.) and 300 (excl.).*/
- /* (actually, we sometimes get 0 from GNU FTP servers) */
- if (((theResponseCode != 0) && (theResponseCode < 200))
- || (theResponseCode >= 300)) {
- char theErrorString[512];
- (void) snprintf(theErrorString, sizeof(theErrorString),
- "Download failed (code = %li)", theResponseCode);
- Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
- theResult = TCL_ERROR;
- break;
- }
-
/* clean up */
curl_easy_cleanup( theHandle );
theHandle = NULL;
- } while (0);
-
- if (theHandle != NULL) {
- curl_easy_cleanup( theHandle );
- }
- if (theFile != NULL) {
- fclose( theFile );
- }
-
+ } while (0);
+
+ if (performFailed) {
+ Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
+ theResult = TCL_ERROR;
+ }
+
+ if (theHandle != NULL) {
+ curl_easy_cleanup( theHandle );
+ }
+ if (theFile != NULL) {
+ fclose( theFile );
+ }
+
return theResult;
}
Modified: branches/images-and-archives/base/src/pextlib1.0/system.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/system.c 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/pextlib1.0/system.c 2009-12-11 06:50:45 UTC (rev 61427)
@@ -40,6 +40,7 @@
#include <paths.h>
#endif
+#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -79,7 +80,7 @@
int fline, pos, ret;
int osetsid = 0;
pid_t pid;
- Tcl_Obj *errbuf;
+ uid_t euid;
Tcl_Obj *tcl_result;
int read_failed, status;
@@ -129,6 +130,12 @@
if (setsid() == -1)
_exit(1);
}
+ /* drop privileges entirely for child */
+ if (getuid() == 0 && (euid = geteuid()) != 0) {
+ if (seteuid(0) || setuid(euid)) {
+ _exit(1);
+ }
+ }
/* XXX ugly string constants */
args[0] = "sh";
args[1] = "-c";
@@ -197,36 +204,25 @@
if (WEXITSTATUS(ret) == 0) {
status = TCL_OK;
} else {
- /* Copy the contents of the circular buffer to errbuf */
- Tcl_Obj* errorCode;
- errbuf = Tcl_NewStringObj(NULL, 0);
- for (fline = pos; pos < fline + CBUFSIZ; pos++) {
- if (circbuf[pos % CBUFSIZ].len == 0)
- continue; /* skip empty lines */
-
- /* Append line, minus trailing NULL */
- Tcl_AppendToObj(errbuf, circbuf[pos % CBUFSIZ].line,
- circbuf[pos % CBUFSIZ].len - 1);
-
- /* Re-add previously stripped newline */
- Tcl_AppendToObj(errbuf, "\n", 1);
- }
-
- /* set errorCode [list CHILDSTATUS <pid> <code>] */
- errorCode = Tcl_NewListObj(0, NULL);
+ char *errorstr;
+ size_t errorstrlen;
+ /* set errorCode [list CHILDSTATUS <pid> <code>] */
+ Tcl_Obj* errorCode = Tcl_NewListObj(0, NULL);
Tcl_ListObjAppendElement(interp, errorCode, Tcl_NewStringObj("CHILDSTATUS", -1));
Tcl_ListObjAppendElement(interp, errorCode, Tcl_NewIntObj(pid));
Tcl_ListObjAppendElement(interp, errorCode, Tcl_NewIntObj(WEXITSTATUS(ret)));
Tcl_SetObjErrorCode(interp, errorCode);
- /* set result */
- tcl_result = Tcl_NewStringObj("shell command \"", -1);
- Tcl_AppendToObj(tcl_result, cmdstring, -1);
- Tcl_AppendToObj(tcl_result, "\" returned error ", -1);
- Tcl_AppendObjToObj(tcl_result, Tcl_NewIntObj(WEXITSTATUS(ret)));
- Tcl_AppendToObj(tcl_result, "\nCommand output: ", -1);
- Tcl_AppendObjToObj(tcl_result, errbuf);
- Tcl_SetObjResult(interp, tcl_result);
+ /* print error */
+ errorstrlen = strlen("shell command \"")+strlen(cmdstring)+strlen("\" returned error ")+12;
+ errorstr = malloc(errorstrlen);
+ if (errorstr) {
+ *errorstr = '\0';
+ snprintf(errorstr, errorstrlen, "%s%s%s%d", "shell command \"", cmdstring, "\" returned error ", WEXITSTATUS(ret));
+ ui_info(interp, errorstr);
+ free(errorstr);
+ }
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("shell command failed", -1));
}
}
Modified: branches/images-and-archives/base/src/pextlib1.0/tty.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/tty.c 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/pextlib1.0/tty.c 2009-12-11 06:50:45 UTC (rev 61427)
@@ -53,7 +53,7 @@
Tcl_Obj *tcl_result;
Tcl_Channel chan;
int dir;
- int fd;
+ ClientData fd;
int rval;
if (objc != 2) {
@@ -69,11 +69,11 @@
if (Tcl_GetChannelHandle(chan,
dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
- (ClientData*) &fd) == TCL_ERROR) {
+ &fd) == TCL_ERROR) {
return TCL_ERROR;
}
- rval = isatty(fd);
+ rval = isatty((int)(intptr_t)fd);
tcl_result = Tcl_NewIntObj(rval);
Tcl_SetObjResult(interp, tcl_result);
@@ -87,7 +87,7 @@
Tcl_Obj *tcl_result;
Tcl_Channel chan;
int dir;
- int fd;
+ ClientData fd;
Tcl_Obj *robjv[2];
struct winsize ws = {0, 0, 0, 0};
@@ -104,16 +104,16 @@
if (Tcl_GetChannelHandle(chan,
dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
- (ClientData*) &fd) == TCL_ERROR) {
+ &fd) == TCL_ERROR) {
return TCL_ERROR;
}
- if (!isatty(fd)) {
+ if (!isatty((int)(intptr_t)fd)) {
Tcl_SetResult(interp, "channel is not connected to a tty", TCL_STATIC);
return TCL_ERROR;
}
- if (ioctl(fd, TIOCGWINSZ, &ws) == -1) {
+ if (ioctl((int)(intptr_t)fd, TIOCGWINSZ, &ws) == -1) {
Tcl_SetResult(interp, "ioctl failed", TCL_STATIC);
return TCL_ERROR;
}
Modified: branches/images-and-archives/base/src/port/port-help.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port-help.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port/port-help.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -30,12 +30,12 @@
}
set porthelp(clean) {
-Removes file associates with given ports
+Removes files associated with the given ports
--dist Removes downloaded distfiles
+--logs Removes log files
--work Removes work directory (default)
--all Removes everything from above
---logs Removes log files for port
}
set porthelp(log) {
Modified: branches/images-and-archives/base/src/port/port.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port/port.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -155,6 +155,13 @@
}
}
+# show the URL for the ticket reporting instructions
+proc print_tickets_url {args} {
+ if {![macports::ui_isset ports_quiet]} {
+ ui_msg "To report a bug, see <http://guide.macports.org/#project.tickets>"
+ }
+}
+
# Form a composite version as is sometimes used for registry functions
proc composite_version {version variations {emptyVersionOkay 0}} {
# Form a composite version out of the version and variations
@@ -2103,10 +2110,14 @@
if {![info exists depscache(port:$portname)]} {
set status [macports::upgrade $portname "port:$portname" [array get requested_variations] [array get options] depscache]
if {$status != 0 && ![macports::ui_isset ports_processall]} {
- return $status
+ break
}
}
}
+
+ if {$status != 0} {
+ print_tickets_url
+ }
return $status
}
@@ -2988,6 +2999,10 @@
}
}
+ if {$status != 0} {
+ print_tickets_url
+ }
+
return $status
}
Modified: branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/port_autoconf.tcl.in 2009-12-11 06:50:45 UTC (rev 61427)
@@ -69,5 +69,4 @@
variable install_user "@DSTUSR@"
variable install_group "@DSTGRP@"
variable prefix "@prefix_expanded@"
- variable macportsuser "@RUNUSR@"
}
Modified: branches/images-and-archives/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portconfigure.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portconfigure.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -153,6 +153,8 @@
options configure.build_arch
default configure.build_arch {${build_arch}}
+options configure.ld_archflags
+default configure.ld_archflags {[portconfigure::configure_get_ld_archflags]}
foreach tool {cc cxx objc f77 f90 fc} {
options configure.${tool}_archflags
default configure.${tool}_archflags "\[portconfigure::configure_get_archflags $tool\]"
@@ -231,6 +233,19 @@
return $flags
}
+# internal function to determine the ld flags to select an arch
+# Unfortunately there's no consistent way to do this when the compiler
+# doesn't support -arch, because it could be used to link rather than using
+# ld directly. So we punt and let portfiles deal with that case.
+proc portconfigure::configure_get_ld_archflags {args} {
+ global configure.build_arch
+ if {${configure.build_arch} != "" && [arch_flag_supported]} {
+ set flags "-arch ${configure.build_arch}"
+ } else {
+ return ""
+ }
+}
+
# internal function to determine the "-arch xy" flags for the compiler
proc portconfigure::configure_get_universal_archflags {args} {
global configure.universal_archs
@@ -461,7 +476,7 @@
global configure.env configure.pipe configure.libs configure.classpath configure.universal_args
global configure.perl configure.python configure.ruby configure.install configure.awk configure.bison configure.pkg_config configure.pkg_config_path
global configure.ccache configure.distcc configure.cpp configure.javac configure.march configure.mtune
- foreach tool {cc cxx objc f77 f90 fc} {
+ foreach tool {cc cxx objc f77 f90 fc ld} {
global configure.${tool} configure.${tool}_archflags
}
foreach flags {cflags cppflags cxxflags objcflags ldflags fflags f90flags fcflags} {
@@ -554,7 +569,7 @@
append_list_to_environment_value configure "LDFLAGS" ${configure.universal_ldflags}
eval configure.pre_args-append ${configure.universal_args}
} else {
- foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS f77 FFLAGS f90 F90FLAGS fc FCFLAGS} {
+ foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS f77 FFLAGS f90 F90FLAGS fc FCFLAGS ld LDFLAGS} {
append_list_to_environment_value configure $flags [set configure.${tool}_archflags]
if {${configure.march} != {}} {
append_list_to_environment_value configure $flags "-march=${configure.march}"
Modified: branches/images-and-archives/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdestroot.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portdestroot.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -88,7 +88,7 @@
proc portdestroot::destroot_start {args} {
global UI_PREFIX prefix name porturl destroot os.platform destroot.clean portsharepath
- global destroot.umask destroot.asroot macportsuser euid egid
+ global destroot.umask destroot.asroot euid egid
global applications_dir frameworks_dir
variable oldmask
Modified: branches/images-and-archives/base/src/port1.0/portload.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portload.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portload.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -42,6 +42,9 @@
namespace eval portload {
}
+options load.asroot
+default load.asroot yes
+
set_ui_prefix
proc portload::load_main {args} {
Modified: branches/images-and-archives/base/src/port1.0/portmain.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portmain.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portmain.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -44,7 +44,7 @@
}
# define options
-options prefix macportsuser name version revision epoch categories maintainers
+options prefix name version revision epoch categories maintainers
options long_description description homepage license provides conflicts replaced_by
options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
options universal_variant os.universal_supported
@@ -76,7 +76,6 @@
default worksrcpath {[file join $workpath $worksrcdir]}
# Configure settings
-default macportsuser {${portutil::autoconf::macportsuser}}
default install.user {${portutil::autoconf::install_user}}
default install.group {${portutil::autoconf::install_group}}
@@ -86,7 +85,6 @@
default os.arch {$os_arch}
# Remove trailing "Endian"
default os.endian {$os_endian}
-default os.universal_supported no
set macosx_version {}
set macosx_version_text {}
@@ -112,7 +110,9 @@
if {[info exists variations(macosx)] && $variations(macosx) == "+"} {
# the universal variant itself is now created in
# add_default_universal_variant, which is called from mportopen
- option os.universal_supported yes
+ default os.universal_supported yes
+} else {
+ default os.universal_supported no
}
# start gsoc08-privileges
Modified: branches/images-and-archives/base/src/port1.0/portunload.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portunload.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portunload.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -42,6 +42,9 @@
namespace eval portunload {
}
+options unload.asroot
+default unload.asroot yes
+
set_ui_prefix
proc portunload::unload_main {args} {
Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -1505,6 +1505,11 @@
if {![file isdirectory $workpath]} {
file mkdir $workpath
chownAsRoot $portbuildpath
+ # Create a symlink to the workpath for port authors
+ if {[tbool place_worksymlink] && ![file isdirectory $worksymlink]} {
+ ui_debug "Attempting ln -sf $workpath $worksymlink"
+ ln -sf $workpath $worksymlink
+ }
}
if { [getuid] != 0 } {
@@ -1552,12 +1557,6 @@
}
}
- # Create a symlink to the workpath for port authors
- if {[tbool place_worksymlink] && ![file isdirectory $worksymlink]} {
- ui_debug "Attempting ln -sf $workpath $worksymlink"
- ln -sf $workpath $worksymlink
- }
-
set fd [open $statefile a+]
if {[catch {flock $fd -exclusive -noblock} result]} {
if {"$result" == "EAGAIN"} {
Modified: branches/images-and-archives/base/src/upgrade_sources_conf_default.tcl
===================================================================
--- branches/images-and-archives/base/src/upgrade_sources_conf_default.tcl 2009-12-11 06:41:53 UTC (rev 61426)
+++ branches/images-and-archives/base/src/upgrade_sources_conf_default.tcl 2009-12-11 06:50:45 UTC (rev 61427)
@@ -42,7 +42,20 @@
set addDefault true
} elseif {[regexp {file://(/.+)} $url -> filepath]} {
if {[file exists [file join ${filepath} .svn]]} {
- if {![catch {set svnChannel [open "|svn info ${filepath}" r]} err]} {
+ if {![info exists svnCmd]} {
+ set svnCmd ""
+ foreach path [concat [list ${prefix}/bin] [split $env(PATH) :]] {
+ if {[file executable ${path}/svn]} {
+ set svnCmd ${path}/svn
+ break
+ }
+ }
+ }
+ if {$svnCmd == ""} {
+ puts "WARNING: Unable to check svn URL for '$filepath' because no svn command could be found; please manually verify $sourcesConf!"
+ continue
+ }
+ if {![catch {set svnChannel [open "|$svnCmd info ${filepath}" r]} err]} {
set svnURL {}
while {[gets $svnChannel svnLine] >= 0} {
regexp {^URL: (.*)} $svnLine -> svnURL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091210/0d935125/attachment-0001.html>
More information about the macports-changes
mailing list