Changeset 82923


Ignore:
Timestamp:
Aug 22, 2011, 2:01:16 AM (9 years ago)
Author:
derek@…
Message:

Merge from trunk

Location:
branches/gsoc11-statistics/base
Files:
52 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/gsoc11-statistics/base

  • branches/gsoc11-statistics/base/ChangeLog

    r79672 r82923  
    44###
    55
    6 Release 2.0.0 (unreleased):
     6    - Implement new option-replace using lsearch/lreplace. The old behavior is
     7      deprecated for option-replace with only one argument, but can still be
     8      found in option-strsed.
     9      (raimue in r82760, r82761)
     10
     11Release 2.0.1 (2011-08-02 by jmr):
     12    - Fixed errors when installing some archives built on a case-sensitive
     13      filesystem onto a case-insensitive one. (#30373, jmr in r81562)
     14
     15    - Fixed users created by MacPorts showing up in the GUI in some places on
     16      Lion. (#30168, jeremyhu in r81558)
     17
     18    - Added replaced_by pseudo-portname selector. (afb in r81475)
     19
     20    - Added progress output to port image conversion script.
     21      (#30347, jmr in r81464)
     22
     23    - Now doing a better job of avoiding UID conflicts with non-local users
     24      when creating the 'macports' user. (#30464, jmr in r81414, r81415) Also
     25      improved Tiger compatibility in this area. (jmr in r81454, r81467)
     26
     27    - Fixed 'port selfupdate' exiting with non-zero status after installing a
     28      new version of base. (jmr in r81371)
     29
     30    - Added --subports to options accepted by 'port info'. (jmr in r81234)
     31
     32    - Fixed incorrect info sometimes being added to PortIndex entries when
     33      using subports. (#30463, jmr in r81361)
     34
     35    - Fixed descriptions not being shown for default variants. (jmr in r80971)
     36
     37    - Fixed 'port variants --index'. (jmr in r80969)
     38
     39Release 2.0.0 (2011-07-22 by jmr):
    740
    841    - Multiple ports can now be defined in one Portfile using the 'subport'
  • branches/gsoc11-statistics/base/Makefile.in

    r79672 r82923  
    4444# create run user if it doesn't exist
    4545        @if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
    46         if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then \
    47             if test $$USER = root; then \
     46        if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
     47            if test `id -u` -eq 0; then \
    4848                echo "Creating group \"${RUNUSR}\"" ; \
    49                 ${DSEDITGROUP} -q -o create -n . ${RUNUSR} ; \
     49                ${DSEDITGROUP} -q -o create ${RUNUSR} ; \
    5050            else \
    5151                echo "Not creating group \"${RUNUSR}\" (not root)" ; \
     
    5353        fi ; \
    5454        if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
    55             if test $$USER = root; then \
     55            if test `id -u` -eq 0; then \
    5656                echo "Creating user \"${RUNUSR}\"" ; \
     57                NEXTUID=501; \
     58                while test -n "`${DSCL} -q /Search -search /Users UniqueID $$NEXTUID`"; do \
     59                    let "NEXTUID=NEXTUID+1"; \
     60                done; \
     61                ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
     62                \
     63                ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority ; \
     64                ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions ; \
     65                ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys ; \
     66                ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData ; \
     67                \
     68                ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
    5769                ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
    58                 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
    5970                ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
    60                 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /dev/null ; \
     71                ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty ; \
    6172                ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
    6273            else \
    6374                echo "Not creating user \"${RUNUSR}\" (not root)" ; \
     75            fi ; \
     76        fi ; \
     77        if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
     78            GID=`${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
     79            if test "`${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
     80                echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
     81                ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$GID ; \
     82                ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
    6483            fi ; \
    6584        fi ; \
  • branches/gsoc11-statistics/base/Mk/macports.autoconf.mk.in

    r79672 r82923  
    88
    99CC                      = @CC@
    10 CFLAGS                  = @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR)
    11 OBJCFLAGS               = @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR)
     10CFLAGS                  = @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
     11OBJCFLAGS               = @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
    1212CPPFLAGS                = @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
    1313TCL_DEFS                = @TCL_DEFS@
    1414SHLIB_CFLAGS            = @SHLIB_CFLAGS@
    1515CFLAGS_QUICHEEATERS     = @CFLAGS_QUICHEEATERS@
     16CFLAGS_PEDANTIC         = @CFLAGS_PEDANTIC@
    1617CFLAGS_WERROR           = @CFLAGS_WERROR@
    1718
  • branches/gsoc11-statistics/base/aclocal.m4

    r79672 r82923  
    336336                # Set Tcl package directory to ~/Library/Tcl
    337337            AC_MSG_CHECKING(for Tcl package directory)
    338                 ac_cv_c_tclpkgd="~$DSTUSR/Library/Tcl"
     338                ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
    339339            # Convert to a native path and substitute into the output files.
    340340            PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
     
    647647                            fi
    648648                        elif test "$path" = "~/Library/Tcl"; then
    649                             ac_cv_c_tclpkgd="~$DSTUSR/Library/Tcl"
     649                            ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
    650650                            break
    651651                        fi
  • branches/gsoc11-statistics/base/config/RELEASE_URL

    r79672 r82923  
    1 https://svn.macports.org/repository/macports/tags/release_1_9_2/base
     1https://svn.macports.org/repository/macports/tags/release_2_0_1/base
  • branches/gsoc11-statistics/base/config/macports_version

    r67297 r82923  
    1 1.9.99
     12.0.99
  • branches/gsoc11-statistics/base/configure

    r79672 r82923  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.68 for MacPorts 1.9.99.
     3# Generated by GNU Autoconf 2.68 for MacPorts 2.0.99.
    44#
    55# Report bugs to <macports-dev@lists.macosforge.org>.
     
    561561PACKAGE_NAME='MacPorts'
    562562PACKAGE_TARNAME='macports'
    563 PACKAGE_VERSION='1.9.99'
    564 PACKAGE_STRING='MacPorts 1.9.99'
     563PACKAGE_VERSION='2.0.99'
     564PACKAGE_STRING='MacPorts 2.0.99'
    565565PACKAGE_BUGREPORT='macports-dev@lists.macosforge.org'
    566566PACKAGE_URL=''
     
    675675acx_pthread_config
    676676CFLAGS_WERROR
     677CFLAGS_PEDANTIC
    677678CFLAGS_QUICHEEATERS
    678679TAR_CMD
     
    684685MKBOM
    685686LSBOM
     687XZ
     688LZMA
    686689BZIP2
    687690GNUPATCH
     
    839842GNUMAKE
    840843BZIP2
     844LZMA
     845XZ
    841846XAR
    842847OPEN
     
    13851390  # This message is too long to be a string in the A/UX 3.1 sh.
    13861391  cat <<_ACEOF
    1387 \`configure' configures MacPorts 1.9.99 to adapt to many kinds of systems.
     1392\`configure' configures MacPorts 2.0.99 to adapt to many kinds of systems.
    13881393
    13891394Usage: $0 [OPTION]... [VAR=VALUE]...
     
    14511456if test -n "$ac_init_help"; then
    14521457  case $ac_init_help in
    1453      short | recursive ) echo "Configuration of MacPorts 1.9.99:";;
     1458     short | recursive ) echo "Configuration of MacPorts 2.0.99:";;
    14541459   esac
    14551460  cat <<\_ACEOF
     
    15231528  GNUMAKE     path to gnumake command
    15241529  BZIP2       path to bzip2 command
     1530  LZMA        path to lzma command
     1531  XZ          path to xz command
    15251532  XAR         path to xar command
    15261533  OPEN        path to open command
     
    15941601if $ac_init_version; then
    15951602  cat <<\_ACEOF
    1596 MacPorts configure 1.9.99
     1603MacPorts configure 2.0.99
    15971604generated by GNU Autoconf 2.68
    15981605
     
    22632270running configure, to aid debugging if configure makes a mistake.
    22642271
    2265 It was created by MacPorts $as_me 1.9.99, which was
     2272It was created by MacPorts $as_me 2.0.99, which was
    22662273generated by GNU Autoconf 2.68.  Invocation command line was
    22672274
     
    27582765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MacPorts version" >&5
    27592766$as_echo_n "checking MacPorts version... " >&6; }
    2760 MACPORTS_VERSION=1.9.99
     2767MACPORTS_VERSION=2.0.99
    27612768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACPORTS_VERSION" >&5
    27622769$as_echo "$MACPORTS_VERSION" >&6; }
     
    29242931                  Please upgrade at http://store.apple.com/" "$LINENO" 5
    29252932    ;;
    2926   10.4.[0-9]|10.4.10|10.5.[0-7]|10.6.[0-6])
     2933  10.4.[0-9]|10.4.10|10.5.[0-7]|10.6.[0-7])
    29272934    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This version of Mac OS X is out of date" >&5
    29282935$as_echo "$as_me: WARNING: This version of Mac OS X is out of date" >&2;}
     
    55035510
    55045511
     5512# Extract the first word of "lzma", so it can be a program name with args.
     5513set dummy lzma; ac_word=$2
     5514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5515$as_echo_n "checking for $ac_word... " >&6; }
     5516if ${ac_cv_path_LZMA+:} false; then :
     5517  $as_echo_n "(cached) " >&6
     5518else
     5519  case $LZMA in
     5520  [\\/]* | ?:[\\/]*)
     5521  ac_cv_path_LZMA="$LZMA" # Let the user override the test with a path.
     5522  ;;
     5523  *)
     5524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     5525for as_dir in $PATH
     5526do
     5527  IFS=$as_save_IFS
     5528  test -z "$as_dir" && as_dir=.
     5529    for ac_exec_ext in '' $ac_executable_extensions; do
     5530  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     5531    ac_cv_path_LZMA="$as_dir/$ac_word$ac_exec_ext"
     5532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5533    break 2
     5534  fi
     5535done
     5536  done
     5537IFS=$as_save_IFS
     5538
     5539  ;;
     5540esac
     5541fi
     5542LZMA=$ac_cv_path_LZMA
     5543if test -n "$LZMA"; then
     5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZMA" >&5
     5545$as_echo "$LZMA" >&6; }
     5546else
     5547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5548$as_echo "no" >&6; }
     5549fi
     5550
     5551
     5552# Extract the first word of "xz", so it can be a program name with args.
     5553set dummy xz; ac_word=$2
     5554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5555$as_echo_n "checking for $ac_word... " >&6; }
     5556if ${ac_cv_path_XZ+:} false; then :
     5557  $as_echo_n "(cached) " >&6
     5558else
     5559  case $XZ in
     5560  [\\/]* | ?:[\\/]*)
     5561  ac_cv_path_XZ="$XZ" # Let the user override the test with a path.
     5562  ;;
     5563  *)
     5564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     5565for as_dir in $PATH
     5566do
     5567  IFS=$as_save_IFS
     5568  test -z "$as_dir" && as_dir=.
     5569    for ac_exec_ext in '' $ac_executable_extensions; do
     5570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     5571    ac_cv_path_XZ="$as_dir/$ac_word$ac_exec_ext"
     5572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5573    break 2
     5574  fi
     5575done
     5576  done
     5577IFS=$as_save_IFS
     5578
     5579  ;;
     5580esac
     5581fi
     5582XZ=$ac_cv_path_XZ
     5583if test -n "$XZ"; then
     5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XZ" >&5
     5585$as_echo "$XZ" >&6; }
     5586else
     5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5588$as_echo "no" >&6; }
     5589fi
     5590
     5591
    55055592# Extract the first word of "lsbom", so it can be a program name with args.
    55065593set dummy lsbom; ac_word=$2
     
    57055792
    57065793# Define some precious variables allowing user to override PATH for some programs
     5794
     5795
    57075796
    57085797
     
    60526141# Quiche eaters options.
    60536142if test x$GCC = xyes; then
    6054         CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
    6055 fi
     6143        CFLAGS_QUICHEEATERS='-Wextra -Wall'
     6144        CFLAGS_PEDANTIC='-pedantic'
     6145fi
     6146
    60566147
    60576148
     
    76517742fi
    76527743
    7653 if test x$prefix = x/usr/local -a x$with_unsupported_prefix != xyes; then
    7654     as_fn_error $? "Installing MacPorts into /usr/local is not supported. If \
     7744if test x$prefix = x/usr/local -o x$prefix = x/usr && test x$with_unsupported_prefix != xyes; then
     7745    as_fn_error $? "Installing MacPorts into $prefix is not supported. If \
    76557746you understand this and wish to do so anyway, pass --with-unsupported-prefix \
    76567747to configure." "$LINENO" 5
     
    77487839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl package directory" >&5
    77497840$as_echo_n "checking for Tcl package directory... " >&6; }
    7750                 ac_cv_c_tclpkgd="~$DSTUSR/Library/Tcl"
     7841                ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
    77517842            # Convert to a native path and substitute into the output files.
    77527843            PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
     
    92119302                            fi
    92129303                        elif test "$path" = "~/Library/Tcl"; then
    9213                             ac_cv_c_tclpkgd="~$DSTUSR/Library/Tcl"
     9304                            ac_cv_c_tclpkgd=`eval echo ~$DSTUSR/Library/Tcl`
    92149305                            break
    92159306                        fi
     
    1017910270# values after options handling.
    1018010271ac_log="
    10181 This file was extended by MacPorts $as_me 1.9.99, which was
     10272This file was extended by MacPorts $as_me 2.0.99, which was
    1018210273generated by GNU Autoconf 2.68.  Invocation command line was
    1018310274
     
    1024110332ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    1024210333ac_cs_version="\\
    10243 MacPorts config.status 1.9.99
     10334MacPorts config.status 2.0.99
    1024410335configured by $0, generated by GNU Autoconf 2.68,
    1024510336  with options \\"\$ac_cs_config\\"
  • branches/gsoc11-statistics/base/configure.ac

    r79672 r82923  
    3333                  Please upgrade at http://store.apple.com/])
    3434    ;;
    35   10.4.[[0-9]]|10.4.10|10.5.[[0-7]]|10.6.[[0-6]])
     35  10.4.[[0-9]]|10.4.10|10.5.[[0-7]]|10.6.[[0-7]])
    3636    AC_MSG_WARN([This version of Mac OS X is out of date])
    3737    AC_MSG_WARN([Please run Software Update to update it])
     
    124124AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [], [$PATH:/usr/local/bin])
    125125AC_PATH_PROG(BZIP2, [bzip2], [])
     126AC_PATH_PROG(LZMA, [lzma], [])
     127AC_PATH_PROG(XZ, [xz], [])
    126128AC_PATH_PROG(LSBOM, [lsbom], [])
    127129AC_PATH_PROG(MKBOM, [mkbom], [])
     
    143145AC_ARG_VAR(GNUMAKE, [path to gnumake command])
    144146AC_ARG_VAR(BZIP2, [path to bzip2 command])
     147AC_ARG_VAR(LZMA, [path to lzma command])
     148AC_ARG_VAR(XZ, [path to xz command])
    145149AC_ARG_VAR(XAR, [path to xar command])
    146150AC_ARG_VAR(OPEN, [path to open command])
     
    153157# Quiche eaters options.
    154158if test x$GCC = xyes; then
    155         CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
     159        CFLAGS_QUICHEEATERS='-Wextra -Wall'
     160        CFLAGS_PEDANTIC='-pedantic'
    156161fi
    157162AC_SUBST(CFLAGS_QUICHEEATERS)
     163AC_SUBST(CFLAGS_PEDANTIC)
    158164MP_WERROR
    159165
     
    181187                [with_unsupported_prefix=$withval],
    182188                [with_unsupported_prefix=no])
    183 if test x$prefix = x/usr/local -a x$with_unsupported_prefix != xyes; then
    184     AC_MSG_ERROR([Installing MacPorts into /usr/local is not supported. If \
     189if test x$prefix = x/usr/local -o x$prefix = x/usr && test x$with_unsupported_prefix != xyes; then
     190    AC_MSG_ERROR([Installing MacPorts into $prefix is not supported. If \
    185191you understand this and wish to do so anyway, pass --with-unsupported-prefix \
    186192to configure.])
  • branches/gsoc11-statistics/base/doc/portfile.7

    r79672 r82923  
    21202120.It Ic md5 Ar
    21212121Compute the MD5 hashes of the file(s).
    2122 .It Ic rpm-vercomp Ar versionA Ar versionB
    2123 Compare two RPM-format versions for equality.  The return value is like
     2122.It Ic vercmp Ar versionA Ar versionB
     2123Compare two EVR-format versions for equality.  The return value is like
    21242124strcmp(), returning -1, 0, or 1 when versionA is earlier, equal to, or
    21252125later than versionB, respectively.  Note that some comparisions featuring
  • branches/gsoc11-statistics/base/doc/porthier.7

    r77511 r82923  
    100100Holds the distfiles of the fetched ports
    101101.It Pa receipts/
    102 Holds the registry information and receipts for the installed ports
     102Obsolete. Formerly held the registry information and receipts for the installed ports,
     103in flat-file format.
     104.It Pa registry/
     105Contains the registry database in sqlite format.
    103106.It Pa software/
    104107Holds compressed images of the installed ports. These
  • branches/gsoc11-statistics/base/portmgr/ReleaseProcess

    r79672 r82923  
    3232=== Create a Release Branch ===
    3333
    34 For each major release (i.e. 1.5.x, 1.6.x, etc.) an appropriate branch is created with a
     34For each major release (i.e. 1.9.x, 2.0.x, etc.) an appropriate branch is created with a
    3535consistent name. To do this, two things are required:
    3636
    3737 * Choose the svn revision from which to create the branch, most likely based off trunk.
    38  * Create the branch (e.g. release_1_6) through the svn "copy" command for history preservation,
     38 * Create the branch (e.g. release_2_0) through the svn "copy" command for history preservation,
    3939   first creating the needed branch directory to preserve the required directory structure
    4040   (the 'base' directory level *needs* to exist in each release branch, otherwise selfupdate breaks):
    4141
    42  svn mkdir -m "commit-message" https://svn.macports.org/repository/macports/branches/release_1_6
     42 svn mkdir -m "commit-message" https://svn.macports.org/repository/macports/branches/release_2_0
    4343 svn cp [-r<rev>] -m "commit-message" https://svn.macports.org/repository/macports/trunk/base \
    44      https://svn.macports.org/repository/macports/branches/release_1_6
     44     https://svn.macports.org/repository/macports/branches/release_2_0
    4545
    4646The actual release, alpha or beta releases, release candidates, and any point releases will all
     
    8282Tagging conventions:
    8383
    84  * release_1_6_0-rc1 (release candidate 1 for release 1.6.0)
    85  * release_1_6_0 (tagged release 1.6.0)
    86  * release_1_6_0-archive (tagged release 1.6.0 -- complete archive)
    87  * release_1_6_1 (1.6.1 release)
     84 * release_2_0_0-beta2 (beta 2 for release 2.0.0)
     85 * release_2_0_0-rc1 (release candidate 1 for release 2.0.0)
     86 * release_2_0_0 (tagged release 2.0.0)
     87 * release_2_0_0-archive (tagged release 2.0.0 -- complete archive)
     88 * release_2_0_1 (2.0.1 release)
    8889
    8990We first tag the branched base directory to make up the final release:
    9091
    91  svn cp -m "commit-message" https://svn.macports.org/repository/macports/branches/release_1_6 \
    92      https://svn.macports.org/repository/macports/tags/release_1_6_0
     92 svn cp -m "commit-message" https://svn.macports.org/repository/macports/branches/release_2_0 \
     93     https://svn.macports.org/repository/macports/tags/release_2_0_0
    9394
    9495Although only the base subdirectory is branched and tagged for a given major release, we also create a
    9596separate tag for the entire tree (base sources and full ports tree) at the time the final release tag is
    96 created (only for major releases, 1.x.0), in order to provide a stake in the ground that specifies a set
     97created (only for major releases, x.y.0), in order to provide a stake in the ground that specifies a set
    9798of ports intended to work with that release. Note that this tag incorporates the entire svn trunk directory
    9899at the revision number at which the final release was tagged.
     
    102103tag URL. For instance:
    103104
    104  svn co [-r<rev>] https://svn.macports.org/repository/macports/trunk release_1.6.0-archive
    105  cd release_1.6.0-archive/base
    106  svn switch https://svn.macports.org/repository/macports/tags/release_1_6_0/base
    107 
    108 And finally we tag the entire directory as release_1_6_0-archive:
     105 svn co [-r<rev>] https://svn.macports.org/repository/macports/trunk release_2.0.0-archive
     106 cd release_2.0.0-archive/base
     107 svn switch https://svn.macports.org/repository/macports/tags/release_2_0_0/base
     108
     109And finally we tag the entire directory as release_2_0_0-archive:
    109110
    110111 cd ../../
    111  svn cp -m "commit-message" release_1.6.0-archive https://svn.macports.org/repository/macports/tags/release_1_6_0-archive
     112 svn cp -m "commit-message" release_2.0.0-archive https://svn.macports.org/repository/macports/tags/release_2_0_0-archive
    112113
    113114
     
    117118for a particular release. They are named with the following naming convention:
    118119
    119  MacPorts-1.6.0.tar.{bz2,gz} (base directory only, corresponding to tag release_1_6_0)
    120  MacPorts-1.6.0-archive.tar.{bz2,gz} (complete archives corresponding to tag release_1_6_0-archive)
     120 MacPorts-2.0.0.tar.{bz2,gz} (base directory only, corresponding to tag release_2_0_0)
     121 MacPorts-2.0.0-archive.tar.{bz2,gz} (complete archives corresponding to tag release_2_0_0-archive)
    121122
    122123The following commands issued to the top level Makefile will generate all the tarballs and checksums:
    123124
    124  make ARC=yes DISTVER=1.6.0 distfromsvn
     125 make ARC=yes DISTVER=2.0.0 distfromsvn
    125126
    126127Note that if you omit the "ARC=yes" flag at the start of the make call then the full archive tarballs will not be produced.
     
    132133for each of the files:
    133134
    134  MacPorts-1.6.0.chk.txt
     135 MacPorts-2.0.0.chk.txt
    135136 (We should have a way to sign these checksums, and have the signer's keys posted somewhere.
    136137 Security experts in the project, would you be interested in leading this effort? Eric? Mark? Anyone else?)
     
    140141
    141142The dmg is a Mac OS X disk image that contains a standalone installer, configured in the usual way, for major
    142 MacPorts releases (1.x.0), named in a consistent fashion and incorporating the OS version for which it
     143MacPorts releases (x.y.0), named in a consistent fashion and incorporating the OS version for which it
    143144was built.
    144145
    145  MacPorts-1.6.0-10.4-Tiger.dmg
    146  MacPorts-1.6.0-10.5-Leopard.dmg
     146 MacPorts-2.0.0-10.5-Leopard.dmg
     147 MacPorts-2.0.0-10.6-SnowLeopard.dmg
     148 MacPorts-2.0.0-10.7-Lion.dmg
    147149
    148150To create a disk image, use the MacPorts port. The Portfile will need to be updated to incorporate the
     
    157159
    158160 cd work
    159  mv MacPorts-1.6.0.dmg MacPorts-1.6.0-10.5-Leopard.dmg
    160  for dmg in MacPorts-1.6.0-*.dmg; do for type in -md5 -sha1 -ripemd160 -sha256; do openssl dgst $type $dmg; done >> MacPorts-1.6.0.chk.txt; done
     161 mv MacPorts-2.0.0.dmg MacPorts-2.0.0-10.6-SnowLeopard.dmg
     162 for dmg in MacPorts-2.0.0-*.dmg; do for type in -md5 -sha1 -ripemd160 -sha256; do openssl dgst $type $dmg; done >> MacPorts-2.0.0.chk.txt; done
    161163
    162164These new products, along with the new checksums, also have to be posted to the appropriate
     
    207209
    208210=== Update trunk's version for next release ===
     211
    209212Once trunk is to be used for development of the next major version, increase its version information to
    210 indicate it's moved past the release version by setting the patch-level version to 99, e.g., 1.8.99 (in
     213indicate it's moved past the release version by setting the patch-level version to 99, e.g. 2.0.99 (in
    211214trunk/base/config/macports_version).
    212215
     
    219222 * The MacPorts website, by adapting the $macports_version_major and $macports_version_latest variables as appropriate in the trunk/www/includes/common.inc file.
    220223 * [https://trac.macports.org/news/] The MacOSforge news section (submitter: portmgr@)
    221  * [http://www.apple.com/downloads/macosx/unix_open_source/macports.html Apple's downloads page] (submitter: jmpp@)
    222224 * [http://freshmeat.net/projects/macports/ Freshmeat] (submitter: mww@)
    223225 * [http://www.versiontracker.com/dyn/moreinfo/macosx/26679 VersionTracker] (submitter: mij@)
     
    226228 * [http://twitter.com/macports twitter] (submitter: raimue@)
    227229 * (Where else?)
     230
     231
     232=== Use of new features in Portfiles ===
     233
     234Using new features introduced by a release should be delayed for 14 days. This
     235should allow users to upgrade their installations to the new release. This
     236delay matches the warning about outdated ports tree sources.
     237
     238
  • branches/gsoc11-statistics/base/portmgr/dmg/InstallationCheck

    r68593 r82923  
    1 #!/bin/sh
     1#!/bin/bash
    22#
    33# $Id$
  • branches/gsoc11-statistics/base/portmgr/dmg/postflight

    r79672 r82923  
    3737
    3838# Script identification ('cause more often than not the svn Id is not expanded):
    39 VERSION=1.9.0
     39VERSION=2.0.0
    4040
    4141# Abstraction variables:
     
    5858function setup_configs {
    5959    for f in macports.conf pubkeys.conf sources.conf variants.conf ; do
    60         if [ ! -f ${CONFIGPATH}/${f} ]; then
     60        if [[ ! -f ${CONFIGPATH}/${f} ]]; then
    6161            echo "Copying ${f}.default to ${f}"
    6262            /bin/cp ${CONFIGPATH}/${f}.default ${CONFIGPATH}/${f}
     
    8888# which hints that we've already tweaked it and therefore already backed it up.
    8989function write_setting () {
    90     if [ -f ${HOME}/.${CONF_FILE} ] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then
     90    if [[ -f ${HOME}/.${CONF_FILE} ]] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then
    9191        echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
    9292        /bin/cp -fp ${HOME}/.${CONF_FILE} "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
     
    118118# Delete the old registry1.0 directory
    119119function delete_reg1 {
    120     if [ -d ${REG1DIR} ]; then
     120    if [[ -d ${REG1DIR} ]]; then
    121121        rm -vrf ${REG1DIR}
    122122    fi
     
    126126function link_tcl_package {
    127127    # delete old directory if present
    128     if ! test -L "${TCL_PACKAGE_DIR}/macports1.0" && test -d "${TCL_PACKAGE_DIR}/macports1.0"; then
    129         rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
    130     fi
    131     if ! test -e "${TCL_PACKAGE_DIR}/macports1.0" && test -w "${TCL_PACKAGE_DIR}"; then
    132                 ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
     128    if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
     129        if [[ ! -e "${TCL_PACKAGE_DIR}" ]]; then
     130            /usr/bin/install -d "${TCL_PACKAGE_DIR}" || true
     131        fi
     132        if [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
     133            rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
     134        fi
     135        if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" && -d "${TCL_PACKAGE_DIR}" ]]; then
     136            ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
     137        fi
    133138        fi
    134139}
     
    137142function create_run_user {
    138143    DSEDITGROUP=/usr/sbin/dseditgroup
    139     if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then
    140         if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then
    141             echo "Creating group \"${RUNUSR}\""
    142             ${DSEDITGROUP} -q -o create -n . ${RUNUSR}
    143         fi
    144         if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
    145             echo "Creating user \"${RUNUSR}\""
    146             ${DSCL} -q . -create /Users/${RUNUSR} Password *
    147             ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1))
    148             ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
    149             ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /dev/null
    150             ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
    151         fi
    152     else
    153         echo "Can't find ${DSCL} / ${DSEDITGROUP}, unable to create user \"${RUNUSR}\""
    154         exit 1
     144    if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then
     145        echo "Creating group \"${RUNUSR}\""
     146        ${DSEDITGROUP} -q -o create ${RUNUSR}
     147    fi
     148    if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
     149        echo "Creating user \"${RUNUSR}\""
     150        NEXTUID=501
     151        while [[ -n "`${DSCL} -q /Search -search /Users UniqueID $NEXTUID`" ]]; do
     152            let "NEXTUID=NEXTUID+1"
     153        done
     154        ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $NEXTUID
     155
     156        # These are implicitly added on Mac OSX Lion.  AuthenticationAuthority
     157        # causes the user to be visible in the Users & Groups Preference Pane,
     158        # and the others are just noise, so delete them.
     159        # https://trac.macports.org/ticket/30168
     160        ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority
     161        ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions
     162        ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys
     163        ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData
     164
     165        ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
     166        ${DSCL} -q . -create /Users/${RUNUSR} Password \*
     167        ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
     168        ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty
     169        ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
     170    fi
     171    if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
     172        GID=$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
     173        if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then
     174            echo "Fixing PrimaryGroupID for user \"${RUNUSR}\""
     175            ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $GID
     176            ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
     177        fi
    155178    fi
    156179}
     
    158181echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
    159182
     183# create macports user
     184create_run_user
    160185# Set up config files
    161186setup_configs
     
    180205        ENV_COMMAND="setenv"
    181206        ASSIGN=" "
    182         if [ -f ${HOME}/.tcshrc ]; then
     207        if [[ -f ${HOME}/.tcshrc ]]; then
    183208            CONF_FILE=tcshrc
    184         elif [ -f ${HOME}/.cshrc ]; then
     209        elif [[ -f ${HOME}/.cshrc ]]; then
    185210            CONF_FILE=cshrc
    186211        else
     
    193218        ENV_COMMAND="export"
    194219        ASSIGN="="
    195         if [ -f ${HOME}/.bash_profile ]; then
     220        if [[ -f ${HOME}/.bash_profile ]]; then
    196221            CONF_FILE=bash_profile
    197         elif [ -f ${HOME}/.bash_login ]; then
     222        elif [[ -f ${HOME}/.bash_login ]]; then
    198223            CONF_FILE=bash_login
    199224        else
     
    221246if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null || \
    222247# and following that, if it's not empty:
    223   [ -z "${ORIGINAL_MANPATH}" ] || \
     248  [[ -z "${ORIGINAL_MANPATH}" ]] || \
    224249# or if it doesn't already contain our path:
    225250  echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null || \
     
    227252  echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null || \
    228253# or at the start of it:
    229   [ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ] || \
     254  [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ]] || \
    230255# or at the end of it:
    231   [ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')" ]; then
     256  [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')" ]]; then
    232257    echo "Your shell already has the right MANPATH environment variable for use with MacPorts!"
    233258else
  • branches/gsoc11-statistics/base/portmgr/fedora/macports.spec

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/portmgr/jobs/mprsyncup

    r79672 r82923  
    4444# Paths we'll work on:
    4545ROOT=/var/tmp/macports
    46 TMPDIR=mp_trunk/base
    4746PREFIX=${ROOT}/opt/local
    4847TCLPKG=${PREFIX}/lib/tcl
     
    6059# copy new index of this platform to old index location for MP v1.8 compatability
    6160OLD_INDEX_PLATFORM="9_i386"
    62 
    63 MP_USER=nobody
    64 MP_GROUP=nobody
    6561
    6662# Sources information:
     
    121117pushd ${PORTS} >> /dev/null
    122118# build MP trunk in a private location for indexing
    123 pushd ${ROOT}/${TMPDIR} >> /dev/null
     119pushd ${TBASE} >> /dev/null
    124120${MKDIR} -p ${TCLPKG}
    125121./configure \
    126122    --prefix=${PREFIX} \
    127     --with-tclpackage=${TCLPKG} \
    128     --with-install-user=${MP_USER} \
    129     --with-install-group=${MP_GROUP}
     123    --with-tclpackage=${TCLPKG}
    130124make clean
    131125make
  • branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl

    r79672 r82923  
    2121set check_deptypes {depends_build depends_lib}
    2222
    23 set good_licenses {agpl apache apsl artistic boost bsd cecill cpl curl \
    24                    fontconfig freebsd freetype gfdl gpl ibmpl ijg jasper \
    25                    lgpl libpng mit mpl openssl php psf qpl public-domain \
    26                    ruby sleepycat ssleay x11 zlib zpl}
     23
     24# Notes:
     25# 'Restrictive/Distributable' means a non-free license that nonetheless allows
     26# distributing binaries.
     27# 'Restrictive' means a non-free license that does not allow distributing
     28# binaries, and is thus not in the list.
     29# 'Permissive' is a catchall for other licenses that allow
     30# modification and distribution of source and binaries.
     31# 'Copyleft' means a license that requires source code to be made available,
     32# and derivative works to be licensed the same as the original.
     33# 'GPLConflict' should be added if the license conflicts with the GPL (and its
     34# variants like CeCILL and the AGPL) and is not in the list of licenses known
     35# to do so below.
     36# 'Noncommercial' means a license that prohibits commercial use.
     37set good_licenses {agpl apache apsl artistic autoconf boost bsd cecill copyleft cpl
     38                   curl fontconfig freebsd freetype gfdl gpl gplconflict ibmpl ijg
     39                   jasper lgpl libpng libtool mit mpl noncommercial openssl permissive
     40                   php psf qpl public-domain restrictive/distributable ruby sleepycat
     41                   ssleay tcl/tk x11 zlib zpl}
    2742foreach lic $good_licenses {
    2843    set license_good($lic) 1
     
    3045# keep these values sorted
    3146array set license_conflicts \
    32     {agpl {cecill gpl} \
    33     apache {cecill gpl} \
    34     apsl {cecill gpl} \
    35     cpl {cecill gpl} \
    36     cecill {agpl apache apsl cpl ibmpl mpl openssl php qpl ssleay zpl-1} \
    37     freetype {gpl-2} \
    38     gpl {agpl apache apsl cpl ibmpl mpl openssl php qpl ssleay zpl-1} \
    39     gpl-2 {freetype} \
    40     ibmpl {cecill gpl} \
    41     mpl {cecill gpl} \
    42     openssl {cecill gpl} \
    43     php {cecill gpl} \
    44     qpl {cecill gpl} \
     47    {agpl {apache-1 apache-1.1 cecill gpl-1 gpl-2 gplconflict noncommercial restrictive/distributable}
     48    apache {cecill gpl-1 gpl-2}
     49    apache-1 {agpl gpl}
     50    apache-1.1 {agpl gpl}
     51    apsl {cecill gpl}
     52    cpl {cecill gpl}
     53    cecill {agpl apache apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
     54    freetype {gpl-2}
     55    gpl {agpl apache-1 apache-1.1 apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
     56    gpl-1 {apache gpl-3 gpl-3+ lgpl-3 lgpl-3+}
     57    gpl-2 {apache freetype gpl-3 gpl-3+ lgpl-3 lgpl-3+}
     58    gpl-3 {gpl-1 gpl-2}
     59    gpl-3+ {gpl-1 gpl-2}
     60    ibmpl {cecill gpl}
     61    lgpl-3 {gpl-1 gpl-2}
     62    lgpl-3+ {gpl-1 gpl-2}
     63    mpl {cecill gpl}
     64    openssl {cecill gpl}
     65    php {cecill gpl}
     66    qpl {cecill gpl}
     67    restrictive/distributable {agpl cecill gpl}
    4568    ssleay {cecill gpl}
    4669    zpl-1 {cecill gpl}}
  • branches/gsoc11-statistics/base/portmgr/jobs/portfile_mirror.pl

    r79672 r82923  
    2121my $TMPROOT = "/tmp/mp_mirror/$rev";
    2222
    23 my @changes = `$SVNLOOK changed $REPOPATH -r $rev`;
     23my @changes = `$SVNLOOK changed $REPOPATH -r $rev | grep '/Portfile' | grep -vE '^[ ]+D'`;
    2424
    2525foreach my $change (@changes) {
  • branches/gsoc11-statistics/base/src/cregistry/vercomp.c

    r65474 r82923  
    4848
    4949/**
    50  * RPM version comparison. Shamelessly copied from Pextlib, with some changes to
     50 * EVR version comparison. Shamelessly copied from Pextlib, with some changes to
    5151 * use string lengths instead of strlen by default. That's necessary to make it
    5252 * work with sqlite3 collations. It should be shared with Pextlib, rather than
     
    5959 * @return              -1 if A < B; 0 if A = B; 1 if A > B
    6060 */
    61 static int rpm_vercomp (const char *versionA, int lengthA, const char *versionB,
     61static int vercmp (const char *versionA, int lengthA, const char *versionB,
    6262        int lengthB) {
    6363    const char *endA, *endB;
     
    174174/**
    175175 * VERSION collation for sqlite3. This function collates text according to
    176  * pextlib's rpm-vercomp function. This allows direct comparison and sorting of
     176 * pextlib's vercmp function. This allows direct comparison and sorting of
    177177 * version columns, such as port.version and port.revision.
    178178 *
     
    186186int sql_version(void* userdata UNUSED, int alen, const void* a, int blen,
    187187        const void* b) {
    188     return rpm_vercomp((const char*)a, alen, (const char*)b, blen);
     188    return vercmp((const char*)a, alen, (const char*)b, blen);
    189189}
  • branches/gsoc11-statistics/base/src/darwintracelib1.0/Makefile

    r74369 r82923  
    77include ../../Mk/macports.autoconf.mk
    88
    9 CFLAGS+= -fPIC
     9CFLAGS+= -fPIC -Wno-deprecated-declarations
     10CFLAGS_PEDANTIC=
    1011
    1112all:: ${SHLIB_NAME}
  • branches/gsoc11-statistics/base/src/darwintracelib1.0/darwintrace.c

    r79672 r82923  
    164164#if __STDC_VERSION__>=199901L
    165165#if DARWINTRACE_DEBUG_OUTPUT
    166 #define dprintf(...) fprintf(stderr, __VA_ARGS__)
     166#define debug_printf(...) fprintf(stderr, __VA_ARGS__)
    167167#else
    168 #define dprintf(...)
     168#define debug_printf(...)
    169169#endif
    170170#else
     
    172172__attribute__ ((format (printf, 1, 2)))
    173173static inline
    174 int dprintf(const char *format, ...) {
     174int debug_printf(const char *format, ...) {
    175175    int ret;
    176176    va_list args;
     
    181181}
    182182#else
    183 #define dprintf(format, param)
     183#define debug_printf(format, param)
    184184#endif
    185185#endif
     
    363363                        if(connect(sock, (struct sockaddr*)&sun, strlen(__env_darwintrace_log)+1+sizeof(sun.sun_family))!=-1)
    364364                        {
    365                                 dprintf("darwintrace: connect successful. socket %d\n", sock);
     365                                debug_printf("darwintrace: connect successful. socket %d\n", sock);
    366366                                __darwintrace_fd=sock;
    367367                                ask_for_filemap();
    368368                        } else {
    369                                 dprintf("connect failed: %s\n", strerror(errno));
     369                                debug_printf("connect failed: %s\n", strerror(errno));
    370370                                abort();
    371371                        }
     
    470470  }
    471471
    472   dprintf("darwintrace: cleanup resulted in %s\n", path);
     472  debug_printf("darwintrace: cleanup resulted in %s\n", path);
    473473}
    474474
     
    664664                isInSandbox = __darwintrace_is_in_sandbox(path, newpath);
    665665                if (isInSandbox == 0) {
    666                         dprintf("darwintrace: creation/writing was forbidden at %s\n", path);
     666                        debug_printf("darwintrace: creation/writing was forbidden at %s\n", path);
    667667                        errno = EACCES;
    668668                        result = -1;
     
    810810        int isInSandbox = __darwintrace_is_in_sandbox(path, 0);
    811811        if (isInSandbox == 1) {
    812                 dprintf("darwintrace: unlink was allowed at %s\n", path);
     812                debug_printf("darwintrace: unlink was allowed at %s\n", path);
    813813        } else if (isInSandbox == 0) {
    814814                /* outside sandbox, but sandbox is defined: forbid */
    815                 dprintf("darwintrace: unlink was forbidden at %s\n", path);
     815                debug_printf("darwintrace: unlink was forbidden at %s\n", path);
    816816                errno = EACCES;
    817817                result = -1;
     
    832832        int isInSandbox = __darwintrace_is_in_sandbox(path, 0);
    833833        if (isInSandbox == 1) {
    834                 dprintf("darwintrace: mkdir was allowed at %s\n", path);
     834                debug_printf("darwintrace: mkdir was allowed at %s\n", path);
    835835        } else if (isInSandbox == 0) {
    836836                /* outside sandbox, but sandbox is defined: forbid */
     
    841841                if ((err == -1) && (errno == ENOENT))
    842842                {
    843                         dprintf("darwintrace: mkdir was forbidden at %s\n", path);
     843                        debug_printf("darwintrace: mkdir was forbidden at %s\n", path);
    844844                        errno = EACCES;
    845845                        result = -1;
     
    862862        int isInSandbox = __darwintrace_is_in_sandbox(path, 0);
    863863        if (isInSandbox == 1) {
    864                 dprintf("darwintrace: rmdir was allowed at %s\n", path);
     864                debug_printf("darwintrace: rmdir was allowed at %s\n", path);
    865865        } else if (isInSandbox == 0) {
    866866                /* outside sandbox, but sandbox is defined: forbid */
    867                 dprintf("darwintrace: removing directory %s was forbidden\n", path);
     867                debug_printf("darwintrace: removing directory %s was forbidden\n", path);
    868868                errno = EACCES;
    869869                result = -1;
     
    884884        int isInSandbox = __darwintrace_is_in_sandbox(from, 0);
    885885        if (isInSandbox == 1) {
    886                 dprintf("darwintrace: rename was allowed at %s\n", from);
     886                debug_printf("darwintrace: rename was allowed at %s\n", from);
    887887        } else if (isInSandbox == 0) {
    888888                /* outside sandbox, but sandbox is defined: forbid */
    889                 dprintf("darwintrace: renaming from %s was forbidden\n", from);
     889                debug_printf("darwintrace: renaming from %s was forbidden\n", from);
    890890                errno = EACCES;
    891891                result = -1;
     
    895895                isInSandbox = __darwintrace_is_in_sandbox(to, 0);
    896896                if (isInSandbox == 1) {
    897                         dprintf("darwintrace: rename was allowed at %s\n", to);
     897                        debug_printf("darwintrace: rename was allowed at %s\n", to);
    898898                } else if (isInSandbox == 0) {
    899899                        /* outside sandbox, but sandbox is defined: forbid */
    900                         dprintf("darwintrace: renaming to %s was forbidden\n", to);
     900                        debug_printf("darwintrace: renaming to %s was forbidden\n", to);
    901901                        errno = EACCES;
    902902                        result = -1;
  • branches/gsoc11-statistics/base/src/images_to_archives.tcl

    r79672 r82923  
    1414umask 022
    1515
    16 mportinit
     16array set ui_options {ports_verbose yes}
     17
     18mportinit ui_options
    1719
    1820# always converting to tbz2 should be fine as both these programs are
     
    3234# the registry only after we know all creation attempts were successful.
    3335set archived_list {}
     36set installed_len [llength $ilist]
     37set counter 0
    3438
    3539foreach installed $ilist {
     40    incr counter
    3641    set iname [lindex $installed 0]
    3742    set iversion [lindex $installed 1]
     
    8388        # compute new name and location of archive
    8489        set archivename "${iname}-${iversion}_${irevision}${ivariants}.${macports::os_platform}_${macports::os_major}.[join $archs -].${archivetype}"
     90        ui_msg "Processing ${counter} of ${installed_len}: ${archivename}"
    8591        if {$installtype == "image"} {
    8692            set targetdir [file dirname $location]
     
    114120}
    115121
     122set archived_len [llength $archived_list]
     123set counter 0
     124
    116125registry::write {
    117126    foreach archived $archived_list {
     127        incr counter
     128        ui_msg "Updating registry: ${counter} of ${archived_len}"
    118129        set installtype [lindex $archived 0]
    119130        set iref [lindex $archived 1]
     
    133144}
    134145
     146set counter 0
    135147foreach archived $archived_list {
     148    incr counter
    136149    set location [lindex $archived 2]
     150    ui_msg "Deleting ${counter} of ${archived_len}: ${location}"
    137151    if {$location != "" && [file isdirectory $location]} {
    138152        if {[catch {file delete -force $location} result]} {
  • branches/gsoc11-statistics/base/src/macports1.0/Makefile

    r79672 r82923  
    3434        echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
    3535        if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
    36                 if test ! -d "${TCL_PACKAGE_DIR}"; then \
    37                         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
    38                 fi; \
    39                 if test -w "${TCL_PACKAGE_DIR}"; then \
    40                         if test ! -L "${INSTALLPKGLINK}" && test -d "${INSTALLPKGLINK}"; then \
    41                                 rm -rf "${INSTALLPKGLINK}" || true; \
    42                         fi; \
    43                         if test ! -e "${INSTALLPKGLINK}"; then \
    44                                 ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
    45                         fi; \
    46                 fi; \
     36                if test ! -L "${INSTALLPKGLINK}"; then \
     37            if test ! -e "${TCL_PACKAGE_DIR}"; then \
     38                $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
     39            fi; \
     40            if test -d "${INSTALLPKGLINK}"; then \
     41                rm -vrf "${INSTALLPKGLINK}" || true; \
     42            fi; \
     43            if test ! -e "${INSTALLPKGLINK}"; then \
     44                ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
     45            fi; \
     46        fi; \
    4747        fi
  • branches/gsoc11-statistics/base/src/macports1.0/macports.tcl

    r79672 r82923  
    4949        applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \
    5050        macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \
    51         master_site_local patch_site_local archive_site_local stats_participate stats_url stats_id"
     51        master_site_local patch_site_local archive_site_local buildfromsource stats_participate stats_url stats_id"
    5252    variable user_options "submitter_name submitter_email submitter_key"
    5353    variable portinterp_options "\
     
    375375                    } elseif {$devtoolscore_v >= 1204.0} {
    376376                        set macports::xcodeversion "3.1.4"
    377                     } elseif {$devtoolscore_v > 921.0} {
    378                         # XXX find actual version corresponding to 3.1
     377                    } elseif {$devtoolscore_v >= 1100.0} {
    379378                        set macports::xcodeversion "3.1"
    380379                    } elseif {$devtoolscore_v >= 921.0} {
     
    528527        # Otherwise define the user directory as a direcotory that will never exist
    529528        set macports::macports_user_dir "/dev/null/NO_HOME_DIR"
     529        # Tcl library code wants to do tilde expansion in various places
     530        set env(HOME) ${macports::macports_user_dir}
    530531    }
    531532
     
    722723        }
    723724    }
     725    # Check command line override for source/binary only mode
     726    if {![info exists macports::global_options(ports_binary_only)]
     727        && ![info exists macports::global_options(ports_source_only)]
     728        && [info exists macports::buildfromsource]} {
     729        if {${macports::buildfromsource} == "never"} {
     730            set macports::global_options(ports_binary_only) yes
     731        } elseif {${macports::buildfromsource} == "always"} {
     732            set macports::global_options(ports_source_only) yes
     733        } elseif {${macports::buildfromsource} != "ifneeded"} {
     734            ui_warn "'buildfromsource' set to unknown value '${macports::buildfromsource}', using 'ifneeded' instead"
     735        }
     736    }
    724737
    725738    # Duplicate prefix into prefix_frozen, so that port actions
     
    884897    }
    885898
     899    # make tools we run operate in UTF-8 mode
     900    set env(LANG) en_US.UTF-8
     901
    886902    if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} {
    887903        # We'll resolve these later (if needed)
     
    9971013    set registry_open yes
    9981014    # convert any flat receipts if we just created a new db
    999     if {$db_exists == 0 && [file writable $db_path]} {
     1015    if {$db_exists == 0 && [file exists ${registry.path}/receipts] && [file writable $db_path]} {
    10001016        ui_warn "Converting your registry to sqlite format, this might take a while..."
    10011017        if {[catch {registry::convert_to_sqlite}]} {
     
    12111227    set tarflags [get_tar_flags [file extension $fetchfile]]
    12121228    set qflag ${macports::autoconf::tar_q}
    1213     set cmdline "$tarcmd ${tarflags}${qflag}xOf {$fetchfile} +CONTENTS"
     1229    set cmdline "$tarcmd ${tarflags}${qflag}xOf \"$fetchfile\" +CONTENTS"
    12141230    ui_debug "$cmdline"
    1215     set contents [eval exec $cmdline]
    12161231    if {![catch {set contents [eval exec $cmdline]}]} {
    12171232        set binary 1
     
    12351250    ui_debug "extracting port archive to [pwd]"
    12361251    if {$binary} {
    1237         set cmdline "$tarcmd ${tarflags}${qflag}xOf {$fetchfile} +PORTFILE > Portfile"
    1238     } else {
    1239         set cmdline "$tarcmd ${tarflags}xf {$fetchfile}"
     1252        set cmdline "$tarcmd ${tarflags}${qflag}xOf \"$fetchfile\" +PORTFILE > Portfile"
     1253    } else {
     1254        set cmdline "$tarcmd ${tarflags}xf \"$fetchfile\""
    12401255    }
    12411256    ui_debug "$cmdline"
     
    12661281        file {
    12671282            set path [file normalize [string range $url [expr [string length $protocol] + 3] end]]
    1268             if {[file isdirectory $path]} {
     1283            if {![file isfile $path]} {
    12691284                return $path
    12701285            } else {
     
    16381653    # xxx: set the work path?
    16391654    set workername [ditem_key $mport workername]
     1655    $workername eval validate_macportsuser
    16401656    if {![catch {$workername eval check_variants $target} result] && $result == 0 &&
    16411657        ![catch {$workername eval check_supported_archs} result] && $result == 0 &&
     
    16731689    set workername [ditem_key $mport workername]
    16741690
     1691    # check for existence of macportsuser and use fallback if necessary
     1692    $workername eval validate_macportsuser
    16751693    # check variants
    16761694    if {[$workername eval check_variants $target] != 0} {
     
    26362654    set deptypes [macports::_deptypes_for_target $target $workername]
    26372655
    2638     set subPorts {}
     2656    set depPorts {}
    26392657    if {[llength $deptypes] > 0} {
    26402658        array set optionsarray [ditem_key $mport options]
     
    27072725                }
    27082726                lappend options subport $dep_portname
    2709                 # Figure out the subport. Check the open_mports list first, since
     2727                # Figure out the depport. Check the open_mports list first, since
    27102728                # we potentially leak mport references if we mportopen each time,
    27112729                # because mportexec only closes each open mport once.
    2712                 set subport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $options variations $variations]]
     2730                set depport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $options variations $variations]]
    27132731               
    2714                 if {$subport == {}} {
     2732                if {$depport == {}} {
    27152733                    # We haven't opened this one yet.
    2716                     set subport [mportopen $dep_portinfo(porturl) $options $variations]
     2734                    set depport [mportopen $dep_portinfo(porturl) $options $variations]
    27172735                }
    27182736            }
     
    27202738            # check archs
    27212739            if {$parse && $check_archs
    2722                 && ![macports::_mport_supports_archs $subport $required_archs]} {
    2723 
    2724                 set supported_archs [_mportkey $subport supported_archs]
    2725                 mportclose $subport
     2740                && ![macports::_mport_supports_archs $depport $required_archs]} {
     2741
     2742                set supported_archs [_mportkey $depport supported_archs]
     2743                mportclose $depport
    27262744                set arch_mismatch 1
    27272745                set has_universal 0
     
    27342752                        set variation_array(universal) +
    27352753                        # try again with +universal
    2736                         set subport [mportopen $dep_portinfo(porturl) $options [array get variation_array]]
    2737                         if {[macports::_mport_supports_archs $subport $required_archs]} {
     2754                        set depport [mportopen $dep_portinfo(porturl) $options [array get variation_array]]
     2755                        if {[macports::_mport_supports_archs $depport $required_archs]} {
    27382756                            set arch_mismatch 0
    27392757                        }
     
    27492767                if {$recurseDeps} {
    27502768                    # Add to the list we need to recurse on.
    2751                     lappend subPorts $subport
    2752                 }
    2753    
     2769                    lappend depPorts $depport
     2770                }
     2771
    27542772                # Append the sub-port's provides to the port's requirements list.
    2755                 set subport_provides "[ditem_key $subport provides]"
    2756                 ditem_append_unique $mport requires $subport_provides
    2757                 set depspec_seen($seenkey) $subport_provides
     2773                set depport_provides "[ditem_key $depport provides]"
     2774                ditem_append_unique $mport requires $depport_provides
     2775                set depspec_seen($seenkey) $depport_provides
    27582776            } else {
    27592777                set depspec_seen($seenkey) 0
     
    27622780    }
    27632781
    2764     # Loop on the subports.
     2782    # Loop on the depports.
    27652783    if {$recurseDeps} {
    2766         foreach subport $subPorts {
     2784        foreach depport $depPorts {
    27672785            # Sub ports should be installed (all dependencies must be satisfied).
    2768             set res [mportdepends $subport "" $recurseDeps $skipSatisfied 1]
     2786            set res [mportdepends $depport "" $recurseDeps $skipSatisfied 1]
    27692787            if {$res != 0} {
    27702788                return $res
     
    30283046
    30293047    # check if we we need to rebuild base
    3030     set comp [rpm-vercomp $macports_version_new $macports::autoconf::macports_version]
     3048    set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
    30313049    if {$use_the_force_luke == "yes" || $comp > 0} {
    30323050        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
     
    30633081            }
    30643082
    3065             if {$prefix == "/usr/local"} {
     3083            if {$prefix == "/usr/local" || $prefix == "/usr"} {
    30663084                append configure_args " --with-unsupported-prefix"
    30673085            }
    30683086
     3087            # Choose a sane compiler
    30693088            set cc_arg ""
    3070             switch -glob -- $::macports::macosx_version {
    3071                 10.[45] { set cc_arg "CC=/usr/bin/gcc-4.0 " }
    3072                 10.6     { set cc_arg "CC=/usr/bin/gcc-4.2 " }
    3073                 10.*     { set cc_arg "CC=/usr/bin/llvm-gcc-4.2 " }
     3089            if {$::macports::os_platform == "darwin"} {
     3090                set cc_arg "CC=/usr/bin/cc "
    30743091            }
    30753092
     
    32523269        set epoch [lindex $i 5]
    32533270        if { $version_installed == {} || ($epoch > $epoch_installed && $version != $version_installed) ||
    3254                 ($epoch >= $epoch_installed && [rpm-vercomp $version $version_installed] > 0)
     3271                ($epoch >= $epoch_installed && [vercmp $version $version_installed] > 0)
    32553272                || ($epoch >= $epoch_installed
    3256                     && [rpm-vercomp $version $version_installed] == 0
     3273                    && [vercmp $version $version_installed] == 0
    32573274                    && $revision > $revision_installed)} {
    32583275            set version_installed $version
     
    33863403    set will_install yes
    33873404    # check installed version against version in ports
    3388     if { ( [rpm-vercomp $version_installed $version_in_tree] > 0
    3389             || ([rpm-vercomp $version_installed $version_in_tree] == 0
    3390                 && [rpm-vercomp $revision_installed $revision_in_tree] >= 0 ))
     3405    if { ( [vercmp $version_installed $version_in_tree] > 0
     3406            || ([vercmp $version_installed $version_in_tree] == 0
     3407                && [vercmp $revision_installed $revision_in_tree] >= 0 ))
    33913408        && ![info exists options(ports_upgrade_force)] } {
    33923409        if {$portname != $newname} {
  • branches/gsoc11-statistics/base/src/package1.0/portarchivefetch.tcl

    r79672 r82923  
    6767proc portarchivefetch::filter_sites {} {
    6868    global prefix porturl
     69    set mirrorfile [get_full_archive_sites_path]
     70    if {[file exists $mirrorfile]} {
     71        source $mirrorfile
     72    }
    6973    set ret {}
    7074    foreach site [array names portfetch::mirror_sites::archive_prefix] {
     
    7579    if {[file rootname [file tail $porturl]] == [file rootname [file tail [get_portimage_path]]]} {
    7680        lappend ret [string range $porturl 0 end-[string length [file tail $porturl]]]
     81        archive.subdir
    7782    }
    7883    return $ret
     
    9499    archiveTypeIsSupported $portarchivetype
    95100
    96     if {[file isfile ${archive.path}]} {
    97         ui_debug "Found archive: ${archive.path}"
    98         set all_archive_files {}
    99         set fetch_urls {}
    100     } else {
    101         set archive.file [file tail ${archive.path}]
    102         lappend all_archive_files ${archive.file}
    103         if {[info exists archive_sites]} {
    104             lappend fetch_urls archive_sites ${archive.file}
    105         }
     101    set archive.file [file tail ${archive.path}]
     102    lappend all_archive_files ${archive.file}
     103    if {[info exists archive_sites]} {
     104        lappend fetch_urls archive_sites ${archive.file}
    106105    }
    107106}
  • branches/gsoc11-statistics/base/src/package1.0/portdpkg.tcl

    r79672 r82923  
    5454
    5555proc portdpkg::main {args} {
    56         global UI_PREFIX destpath os.arch os.platform
     56        global UI_PREFIX destpath os.arch os.platform supported_archs configure.build_arch
    5757   
    5858        ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option subport] [option version]]"
     
    132132        # freebsd and openbsd. Use of gnu in this string is reserved for the           
    133133        # GNU/Hurd operating system.
    134         switch -regex ${os.arch} {
     134        switch -regex ${configure.build_arch} {
    135135                i[3-9]86 { set pkg_arch "i386" }
     136                x86_64 { set pkg_arch "x86_64" }
    136137                default { set pkg_arch ${os.arch} }
    137138        }
     
    141142        if {${os.platform} != "linux"} {
    142143                set pkg_arch "${os.platform}-${pkg_arch}"
     144        } elseif {${pkg_arch} == "x86_64"} {
     145                set pkg_arch "amd64"
     146        }
     147       
     148        # An architecture-independent package
     149        if {$supported_archs == "noarch"} {
     150                set pkg_arch "all"
    143151        }
    144152
  • branches/gsoc11-statistics/base/src/package1.0/portpkg.tcl

    r79672 r82923  
    5656
    5757    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating pkg for %s-%s"] ${subport} ${version}]"
     58
     59    if {[getuid] == 0 && [geteuid] != 0} {
     60        elevateToRoot "pkg"
     61    }
    5862
    5963    return [package_pkg $subport $version $revision]
  • branches/gsoc11-statistics/base/src/pextlib1.0/Makefile

    r72727 r82923  
    1717
    1818test:: ${SHLIB_NAME}
    19         ${TCLSH} tests/checksums.tcl ${SHLIB_NAME}
    20         ${TCLSH} tests/curl.tcl ${SHLIB_NAME}
    21         ${TCLSH} tests/filemap.tcl ${SHLIB_NAME}
    22         ${TCLSH} tests/fs-traverse.tcl ${SHLIB_NAME}
    23         ${TCLSH} tests/symlink.tcl ${SHLIB_NAME}
    24         ${TCLSH} tests/unsetenv.tcl ${SHLIB_NAME}
     19        ${TCLSH} tests/checksums.tcl ./${SHLIB_NAME}
     20        ${TCLSH} tests/curl.tcl ./${SHLIB_NAME}
     21        ${TCLSH} tests/filemap.tcl ./${SHLIB_NAME}
     22        ${TCLSH} tests/fs-traverse.tcl ./${SHLIB_NAME}
     23        ${TCLSH} tests/symlink.tcl ./${SHLIB_NAME}
     24        ${TCLSH} tests/unsetenv.tcl ./${SHLIB_NAME}
     25        ${TCLSH} tests/vercomp.tcl ./${SHLIB_NAME}
  • branches/gsoc11-statistics/base/src/pextlib1.0/Pextlib.c

    r79672 r82923  
    400400        /* Crashes on Linux without this. */
    401401        setenv("MACPORTS_DUMMY", "", 0);
     402        unsetenv("MACPORTS_DUMMY");
    402403#endif
    403404    } else {
     
    484485        Tcl_CreateObjCommand(interp, "fs-traverse", FsTraverseCmd, NULL, NULL);
    485486        Tcl_CreateObjCommand(interp, "filemap", FilemapCmd, NULL, NULL);
    486         Tcl_CreateObjCommand(interp, "rpm-vercomp", RPMVercompCmd, NULL, NULL);
     487#if 1
     488        /* the name "rpm-vercomp" is deprecated, use "vercmp" instead */
     489        Tcl_CreateObjCommand(interp, "rpm-vercomp", VercompCmd, NULL, NULL);
     490#endif
     491        Tcl_CreateObjCommand(interp, "vercmp", VercompCmd, NULL, NULL);
    487492        Tcl_CreateObjCommand(interp, "rmd160", RMD160Cmd, NULL, NULL);
    488493        Tcl_CreateObjCommand(interp, "sha256", SHA256Cmd, NULL, NULL);
  • branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c

    r79672 r82923  
    147147        } else if (*(xpath + tlen) == '/') {
    148148            xpath += tlen + 1;
     149        } else if (*(target + tlen - 1) == '/') {
     150            xpath += tlen;
    149151        }
    150152    }
  • branches/gsoc11-statistics/base/src/pextlib1.0/sha2.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/src/pextlib1.0/sha2.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/src/pextlib1.0/sha256cmd.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/src/pextlib1.0/sha256cmd.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/src/pextlib1.0/tests/curl.tcl

    r64988 r82923  
    2525       
    2626        # use --disable-epsv
    27         curl fetch --disable-epsv ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/archive/netperf-2.2pl5.tar.gz $tempfile
    28         test {[md5 file $tempfile] == "a4b0f4a5fbd8bec23002ad8023e01729"}
     27        #curl fetch --disable-epsv ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/archive/netperf-2.2pl5.tar.gz $tempfile
     28        #test {[md5 file $tempfile] == "a4b0f4a5fbd8bec23002ad8023e01729"}
    2929       
    3030        # use -u
  • branches/gsoc11-statistics/base/src/pextlib1.0/vercomp.c

    r79672 r82923  
    22 * vercomp.c
    33 * $Id$
    4  * RPM compatible version comparison
     4 * version comparison
    55 *
    66 * Author: Landon Fuller <landonf@macports.org>
     
    4949 * If A is newer than B, return an integer > 0
    5050 * If A and B are equal, return 0
    51  * If B is newer than A, retun an integer < 0
     51 * If B is newer than A, return an integer < 0
    5252 */
    5353
    54 static int rpm_vercomp (const char *versionA, const char *versionB) {
     54static int vercmp (const char *versionA, const char *versionB) {
    5555        const char *ptrA, *ptrB;
    5656        const char *eptrA, *eptrB;
     
    156156}
    157157
    158 int RPMVercompCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
     158int VercompCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
    159159{
    160160        Tcl_Obj *tcl_result;
     
    170170        versionB = Tcl_GetString(objv[2]);
    171171
    172         rval = rpm_vercomp(versionA, versionB);
     172        rval = vercmp(versionA, versionB);
    173173
    174174        tcl_result = Tcl_NewIntObj(rval);
  • branches/gsoc11-statistics/base/src/pextlib1.0/vercomp.h

    r79672 r82923  
    3333 */
    3434
    35 int RPMVercompCmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
     35int VercompCmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
  • branches/gsoc11-statistics/base/src/port/port.tcl

    r82920 r82923  
    237237# show the URL for the ticket reporting instructions
    238238proc print_tickets_url {args} {
    239     ui_notice "To report a bug, see <http://guide.macports.org/#project.tickets>"
     239    if {${macports::prefix} != "/usr/local" && ${macports::prefix} != "/usr"} {
     240        ui_notice "To report a bug, see <http://guide.macports.org/#project.tickets>"
     241    }
    240242}
    241243
     
    481483    set avr_ [split $a_(version) "_"]
    482484    set bvr_ [split $b_(version) "_"]
    483     set vercmp [rpm-vercomp [lindex $avr_ 0] [lindex $bvr_ 0]]
    484     if {$vercmp != 0} {
    485         return $vercmp
     485    set versioncmp [vercmp [lindex $avr_ 0] [lindex $bvr_ 0]]
     486    if {$versioncmp != 0} {
     487        return $versioncmp
    486488    }
    487489    set ar_ [lindex $avr_ 1]
     
    854856                set comp_result [expr $installed_epoch - $latest_epoch]
    855857                if { $comp_result == 0 } {
    856                     set comp_result [rpm-vercomp $installed_version $latest_version]
     858                    set comp_result [vercmp $installed_version $latest_version]
    857859                }
    858860            }
     
    12811283        ^depends_extract:   -
    12821284        ^depends_fetch:     -
     1285        ^replaced_by:       -
    12831286        ^revision:          -
    12841287        ^license:           { # Handle special port selectors
     
    20912094                            array set variant $vinfo($v)
    20922095                            if {[info exists variant(is_default)]} {
    2093                                 set varmodifier "\[+]"
     2096                                set varmodifier "\[$variant(is_default)]"
    20942097                            }
    20952098                        }
     
    32703273            # Compare versions, first checking epoch, then version, then revision
    32713274            set epoch_comp_result [expr $installed_epoch - $latest_epoch]
    3272             set comp_result [rpm-vercomp $installed_version $latest_version]
     3275            set comp_result [vercmp $installed_version $latest_version]
    32733276            if { $comp_result == 0 } {
    32743277                set comp_result [expr $installed_revision - $latest_revision]
     
    34923495            foreach v [lsort $portinfo(variants)] {
    34933496                unset -nocomplain vconflicts vdescription vrequires
     3497                set varmodifier "   "
    34943498                # Retrieve variants' information from the new format.
    34953499                if {[info exists vinfo]} {
     
    35133517                        set varmodifier "($global_variations($v))"
    35143518                    } elseif {[info exists variant(is_default)]} {
    3515                         set varmodifier "\[+]"
    3516                     } else {
    3517                         set varmodifier "   "
     3519                        set varmodifier "\[$variant(is_default)\]"
    35183520                    }
    35193521                    if {[info exists variant(requires)]} {
     
    42534255                 line long_description
    42544256                 maintainer maintainers name platform platforms portdir pretty
    4255                  replaced_by revision variant variants version}
     4257                 replaced_by revision subports variant variants version}
    42564258    contents    {size {units 1}}
    42574259    deps        {index no-build}
     
    43494351                            lappend errlst "--[lindex $e 0]"
    43504352                        }
    4351                         return -code error "${action} --${key} is ambiguous: \n  [join $errlst "\n "]"
     4353                        return -code error "\"port ${action} --${key}\" is ambiguous: \n  port ${action} [join $errlst "\n  port ${action} "]"
    43524354                    }
    43534355                    set key   [lindex [lindex $kopts 0] 0]
     
    45064508        } else {
    45074509            if {[llength $actions] > 1} {
    4508                 puts "Ambiguous action \"$action\": could be any of {$actions}."
     4510                ui_error "\"port ${action}\" is ambiguous: \n  port [join $actions "\n  port "]"
    45094511            } else {
    4510                 puts "Unrecognized action \"$action\""
     4512                ui_error "Unrecognized action \"port $action\""
    45114513            }
    45124514            set action_status 1
     
    48664868    set exit_status [process_command_files $ui_options(ports_commandfiles)]
    48674869}
     4870if {$exit_status == -999} {
     4871    set exit_status 0
     4872}
    48684873
    48694874# shut down macports1.0
  • branches/gsoc11-statistics/base/src/port/portindex.tcl

    r79672 r82923  
    147147            } else {
    148148                set prefix $save_prefix
     149                array unset portinfo
    149150                array set portinfo [mportinfo $interp]
    150151                mportclose $interp
  • branches/gsoc11-statistics/base/src/port1.0/port_autoconf.tcl.in

    r79672 r82923  
    3434namespace eval portutil::autoconf {
    3535        variable bzip2_path "@BZIP2@"
     36        variable lzma_path "@LZMA@"
     37        variable xz_path "@XZ@"
    3638        variable cp_path "@CP@"
    3739        variable cpio_path "@CPIO@"
  • branches/gsoc11-statistics/base/src/port1.0/portclean.tcl

    r79672 r82923  
    5656    ui_notice "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option subport]]"
    5757
    58     if {![file writable $prefix] || ([getuid] == 0 && [geteuid] != 0)} {
     58    if {[getuid] == 0 && [geteuid] != 0} {
    5959        elevateToRoot "clean"
    6060    }
  • branches/gsoc11-statistics/base/src/port1.0/portconfigure.tcl

    r79672 r82923  
    195195    set name ""
    196196    switch -exact ${configure.compiler} {
     197        cc { set name "System cc" }
    197198        gcc { set name "System gcc" }
    198199        gcc-3.3 { set name "Mac OS X gcc 3.3" }
     
    353354# internal function to determine the default compiler
    354355proc portconfigure::configure_get_default_compiler {args} {
    355     global macosx_deployment_target
    356     switch -exact ${macosx_deployment_target} {
    357         "10.4"      -
    358         "10.5"      { return gcc-4.0 }
    359         "10.6"      { return gcc-4.2 }
    360         "10.7"      { return llvm-gcc-4.2 }
    361         default     { return gcc }
     356    global xcodeversion macosx_deployment_target
     357    if {$xcodeversion == "none" || $xcodeversion == ""} {
     358        return cc
     359    } elseif {[vercmp $xcodeversion 4.2] >= 0} {
     360        return clang
     361    } elseif {[vercmp $xcodeversion 4.0] >= 0} {
     362        return llvm-gcc-4.2
     363    } elseif {[vercmp $xcodeversion 3.2] >= 0 && $macosx_deployment_target != "10.4"} {
     364        return gcc-4.2
     365    } else {
     366        return gcc-4.0
    362367    }
    363368}
     
    368373    set ret ""
    369374    switch -exact ${configure.compiler} {
     375        cc {
     376            switch -exact ${type} {
     377                cc   { set ret /usr/bin/cc }
     378                objc { set ret /usr/bin/cc }
     379                cxx  { set ret /usr/bin/c++ }
     380                cpp  { set ret /usr/bin/cpp }
     381            }
     382        }
    370383        gcc {
    371384            switch -exact ${type} {
     
    439452                objc { set ret ${prefix}/bin/gcc-apple-4.2 }
    440453                cpp  { set ret ${prefix}/bin/cpp-apple-4.2 }
     454                cxx  { set ret ${prefix}/bin/g++-apple-4.2 }
    441455            }
    442456        }
  • branches/gsoc11-statistics/base/src/port1.0/portdistcheck.tcl

    r79672 r82923  
    4848
    4949# define options
    50 options distcheck.type distcheck.check
     50options distcheck.type
    5151
    5252# defaults
    5353default distcheck.type moddate
    54 default distcheck.check moddate
    55 
    56 # Deprecation
    57 option_deprecate distcheck.check distcheck.type
    5854
    5955proc portdistcheck::distcheck_main {args} {
  • branches/gsoc11-statistics/base/src/port1.0/portextract.tcl

    r79672 r82923  
    9393        option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
    9494    } elseif {[tbool use_lzma]} {
    95         option extract.cmd [binaryInPath "lzma"]
     95        option extract.cmd [findBinary lzma ${portutil::autoconf::lzma_path}]
    9696    } elseif {[tbool use_xz]} {
    97         option extract.cmd [binaryInPath "xz"]
     97        option extract.cmd [findBinary xz ${portutil::autoconf::xz_path}]
    9898    } elseif {[tbool use_zip]} {
    9999        option extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
  • branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl

    r79672 r82923  
    123123default mirror_sites.listpath {"port1.0/fetch"}
    124124
    125 # Deprecation
    126 option_deprecate svn.tag svn.revision
    127 
    128125# Option-executed procedures
    129126option_proc use_bzip2 portfetch::set_extract_type
  • branches/gsoc11-statistics/base/src/port1.0/portlivecheck.tcl

    r79672 r82923  
    4848
    4949# define options
    50 options livecheck.url livecheck.type livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version livecheck.ignore_sslcert
     50options livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version livecheck.ignore_sslcert
    5151
    5252# defaults
    5353default livecheck.url {$homepage}
    54 default livecheck.check default
    5554default livecheck.type default
    5655default livecheck.md5 ""
     
    6160default livecheck.ignore_sslcert yes
    6261
    63 # Deprecation
    64 option_deprecate livecheck.check livecheck.type
    65 
    6662proc portlivecheck::livecheck_main {args} {
    6763    global livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
     
    10298            foreach {master_site} ${master_sites} {
    10399                if {[regexp "^($available_types)(?::(\[^:\]+))?" ${master_site} _ site subdir]} {
     100                    set subdirs [split $subdir /]
     101                    if {[llength $subdirs] > 1} {
     102                        if {[lindex $subdirs 0] == "project"} {
     103                            set subdir [lindex $subdirs 1]
     104                        } else {
     105                            set subdir ""
     106                        }
     107                    }
    104108                    if {${subdir} ne "" && ${livecheck.name} eq "default"} {
    105109                        set livecheck.name ${subdir}
     
    168172                        if {[regexp $the_re $line matched upver]} {
    169173                            set foundmatch 1
    170                             if {$updated_version == 0 || [rpm-vercomp $upver $updated_version] > 0} {
     174                            if {$updated_version == 0 || [vercmp $upver $updated_version] > 0} {
    171175                                set updated_version $upver
    172176                            }
  • branches/gsoc11-statistics/base/src/port1.0/portutil.tcl

    r79672 r82923  
    133133
    134134##
     135# Handle option-strsed
     136#
     137# @param option name of the option
     138# @param args arguments
     139proc handle_option-strsed {option args} {
     140    global $option user_options option_procs
     141
     142    if {![info exists user_options($option)] && [info exists $option]} {
     143        set temp [set $option]
     144        foreach val $args {
     145            set temp [strsed $temp $val]
     146        }
     147        set $option $temp
     148    }
     149}
     150
     151##
    135152# Handle option-replace
    136153#
     
    138155# @param args arguments
    139156proc handle_option-replace {option args} {
    140     global $option user_options option_procs
     157    global $option user_options option_procs deprecated_options
     158
     159    # Deprecate -replace with only one argument, for backwards compatibility call -strsed
     160    # XXX: Remove this in 2.2.0
     161    if {[llength $args] == 1} {
     162        if {![info exists deprecated_options(${option}-replace)]} {
     163            set deprecated_options(${option}-replace) [list ${option}-strsed 0]
     164        }
     165        set refcount [lindex $deprecated_options(${option}-replace) 1]
     166        lset deprecated_options(${option}-replace) 1 [expr $refcount + 1]
     167        return [eval handle_option-strsed $option $args]
     168    }
    141169
    142170    if {![info exists user_options($option)] && [info exists $option]} {
    143         set temp [set $option]
    144         foreach val $args {
    145             set temp [strsed $temp $val]
    146         }
    147         set $option $temp
     171        foreach {old new} $args {
     172            set index [lsearch -exact [set $option] $old]
     173            if {$index == -1} {
     174                continue
     175            }
     176            set $option [lreplace [set $option] $index $index $new]
     177        }
    148178    }
    149179}
     
    161191        interp alias {} $option-append {} handle_option-append $option
    162192        interp alias {} $option-delete {} handle_option-delete $option
     193        interp alias {} $option-strsed {} handle_option-strsed $option
    163194        interp alias {} $option-replace {} handle_option-replace $option
    164195    }
     
    20212052
    20222053            foreach v $value {
    2023                 if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant]} {
     2054                if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant] && ![info exists variations($variant)]} {
    20242055                    # Retrieve the information associated with this variant.
    20252056                    if {![info exists vinfo($variant)]} {
    20262057                        set vinfo($variant) {}
    20272058                    }
     2059                    array unset info
    20282060                    array set info $vinfo($variant)
    2029 
    2030                     if {![info exists variations($variant)]} {
    2031                         # Set is_default and update vinfo.
    2032                         array set info [list is_default val]
    2033                         array set vinfo [list $variant [array get info]]
    2034 
    2035                         set variations($variant) $val
    2036                     }
     2061                    # Set is_default and update vinfo.
     2062                    set info(is_default) $val
     2063                    array set vinfo [list $variant [array get info]]
     2064
     2065                    set variations($variant) $val
    20372066                }
    20382067            }
     
    20782107    } elseif {[geteuid] != 0} {
    20792108        seteuid 0; setegid 0
     2109        set escalated 1
    20802110    }
    20812111
     
    20842114    set gid [existsgroup nogroup]
    20852115    set realname ${name}
    2086     set home /dev/null
    2087     set shell /dev/null
     2116    set home /var/empty
     2117    set shell /usr/bin/false
    20882118
    20892119    foreach arg $args {
     
    20992129    if {${os.platform} eq "darwin"} {
    21002130        set dscl [findBinary dscl $portutil::autoconf::dscl_path]
     2131        exec $dscl . -create /Users/${name} UniqueID ${uid}
     2132
     2133        # These are implicitly added on Mac OSX Lion.  AuthenticationAuthority
     2134        # causes the user to be visible in the Users & Groups Preference Pane,
     2135        # and the others are just noise, so delete them.
     2136        # https://trac.macports.org/ticket/30168
     2137        exec $dscl . -delete /Users/${name} AuthenticationAuthority
     2138        exec $dscl . -delete /Users/${name} PasswordPolicyOptions
     2139        exec $dscl . -delete /Users/${name} dsAttrTypeNative:KerberosKeys
     2140        exec $dscl . -delete /Users/${name} dsAttrTypeNative:ShadowHashData
     2141
     2142        exec $dscl . -create /Users/${name} RealName ${realname}
    21012143        exec $dscl . -create /Users/${name} Password ${passwd}
    2102         exec $dscl . -create /Users/${name} UniqueID ${uid}
    21032144        exec $dscl . -create /Users/${name} PrimaryGroupID ${gid}
    2104         exec $dscl . -create /Users/${name} RealName ${realname}
    21052145        exec $dscl . -create /Users/${name} NFSHomeDirectory ${home}
    21062146        exec $dscl . -create /Users/${name} UserShell ${shell}
     
    21102150        ui_warn "The requested user '$name' was not created."
    21112151    }
     2152
     2153    if {[info exists escalated]} {
     2154        dropPrivileges
     2155    }
    21122156}
    21132157
     
    21212165    } elseif {[geteuid] != 0} {
    21222166        seteuid 0; setegid 0
     2167        set escalated 1
    21232168    }
    21242169
     
    21502195        ui_warn "addgroup is not implemented on ${os.platform}."
    21512196        ui_warn "The requested group was not created."
     2197    }
     2198
     2199    if {[info exists escalated]} {
     2200        dropPrivileges
    21522201    }
    21532202}
     
    25092558}
    25102559
     2560proc validate_macportsuser {} {
     2561    global macportsuser
     2562    if {[getuid] == 0 && $macportsuser != "root" &&
     2563        ([existsuser $macportsuser] == 0 || [existsgroup $macportsuser] == 0 )} {
     2564        ui_warn "configured user/group $macportsuser does not exist, will build as root"
     2565        set macportsuser "root"
     2566    }
     2567}
     2568
    25112569# dependency analysis helpers
    25122570
     
    26362694}
    26372695
     2696# returns the flags that should be passed to the compiler to choose arch(s)
     2697proc get_canonical_archflags {{tool cc}} {
     2698    if {![variant_exists universal] || ![variant_isset universal]} {
     2699        return [option configure.${tool}_archflags]
     2700    } else {
     2701        if {$tool == "cc" || $tool == "objc"} {
     2702            set tool c
     2703        }
     2704        return [option configure.universal_${tool}flags]
     2705    }
     2706}
     2707
    26382708# check that the selected archs are supported
    26392709proc check_supported_archs {} {
     
    26712741                set rec 3.1.4
    26722742            }
    2673             default {
     2743            10.6 {
    26742744                set min 3.2
    26752745                set ok 3.2
    26762746                set rec 3.2.6
    26772747            }
     2748            default {
     2749                set min 4.1
     2750                set ok 4.1
     2751                set rec 4.1
     2752            }
    26782753        }
    26792754        if {$xcodeversion == "none"} {
    26802755            ui_warn "Xcode does not appear to be installed; most ports will likely fail to build."
    2681         } elseif {[rpm-vercomp $xcodeversion $min] < 0} {
     2756        } elseif {[vercmp $xcodeversion $min] < 0} {
    26822757            ui_error "The installed version of Xcode (${xcodeversion}) is too old to use on the installed OS version. Version $rec or later is recommended on Mac OS X ${macosx_version}."
    26832758            return 1
    2684         } elseif {[rpm-vercomp $xcodeversion $ok] < 0} {
     2759        } elseif {[vercmp $xcodeversion $ok] < 0} {
    26852760            ui_warn "The installed version of Xcode (${xcodeversion}) is known to cause problems. Version $rec or later is recommended on Mac OS X ${macosx_version}."
    26862761        }
  • branches/gsoc11-statistics/base/src/programs/daemondo/Makefile.in

    r54794 r82923  
    99mandircat8=     ${mandir}/cat8
    1010
    11 CFLAGS_QUICHEEATERS     = -W -Wall
     11CFLAGS_PEDANTIC =
    1212CPPFLAGS        += -I../..
    1313SRCS            = main.c
  • branches/gsoc11-statistics/base/src/registry2.0/Makefile

    r66844 r82923  
    2121
    2222test:: ${SHLIB_NAME}
    23         ${TCLSH} tests/entry.tcl ${SHLIB_NAME}
    24         ${TCLSH} tests/depends.tcl ${SHLIB_NAME}
     23        ${TCLSH} tests/entry.tcl ./${SHLIB_NAME}
     24        ${TCLSH} tests/depends.tcl ./${SHLIB_NAME}
    2525
    2626distclean:: clean
  • branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl

    r79672 r82923  
    250250## @return 1 if file needs to be explicitly deleted if we have to roll back, 0 otherwise
    251251proc _activate_file {srcfile dstfile} {
    252     switch [file type $srcfile] {
     252    if {[catch {set filetype [file type $srcfile]} result]} {
     253        # this can happen if the archive was built on case-sensitive and we're case-insensitive
     254        # we know any existing dstfile is ours because we checked for conflicts earlier
     255        if {![catch {file type $dstfile}]} {
     256            ui_debug "skipping case-conflicting file: $srcfile"
     257            return 0
     258        } else {
     259            error $result
     260        }
     261    }
     262    switch $filetype {
    253263        directory {
    254264            # Don't recursively copy directories
     
    280290# returns: path to the extracted directory
    281291proc extract_archive_to_tmpdir {location} {
    282     set extractdir [mkdtemp [file join [macports::gettmpdir] mpextractXXXXXXXX]]
     292    global macports::registry.path
     293    set extractdir [mkdtemp [file dirname $location]/mpextractXXXXXXXX]
     294    set startpwd [pwd]
    283295
    284296    try {
    285         set startpwd [pwd]
    286297        if {[catch {cd $extractdir} err]} {
    287298            throw MACPORTS $err
     
    295306        set unarchive.args {}
    296307        set unarchive.pipe_cmd ""
    297         set unarchive.type [file tail $location]
     308        set unarchive.type [file extension $location]
    298309        switch -regex ${unarchive.type} {
    299310            cp(io|gz) {
     
    464475                        # files to a backup file, both in the filesystem and in the
    465476                        # registry
    466                         if { [file exists $file] } {
     477                        if { ![catch {file type $file}] } {
    467478                            set bakfile "${file}${baksuffix}"
    468479                            ui_warn "File $file already exists.  Moving to: $bakfile."
  • branches/gsoc11-statistics/base/src/registry2.0/receipt_sqlite.tcl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/tests/test/xcodeversion/Portfile

    r79672 r82923  
    2020
    2121test {
     22        # rpm-vercomp is now deprecated, change it here too when removed
     23        # from all ports and base (but keep this test here, meanwhile...)
    2224        if {$xcodeversion != "" && [rpm-vercomp $xcodeversion 2.1] >= 0} {
    2325                ui_msg "xcodeversion >= 2.1"
Note: See TracChangeset for help on using the changeset viewer.