Changeset 12159


Ignore:
Timestamp:
May 4, 2005, 8:12:59 AM (15 years ago)
Author:
olegb
Message:

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

merge release1 into HEAD.

this means that now we have a development branch: HEAD
and a "stable" branch release1.

for people on HEAD that want to try out these new release1 features,
i think reading these notes might help:

http://opendarwin.org/~olegb/NOTES_ON_DARWINPORTS1

Location:
trunk/base
Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Makefile.in

    r12036 r12159  
    1515all:: Mk/dports.autoconf.mk
    1616
     17install::
     18        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 dp_version ${portconfigdir}
     19        @echo ""
     20        @echo "Congratulations, you have successfully installed the DarwinPorts system."
     21        @echo ""
     22        @echo "To get the Portfiles and update the system run:"
     23        @echo ""
     24        @echo "sudo port selfupdate"
     25        @echo ""
     26        @echo "Please read README_RELEASE1 and port(1)."
     27        @echo ""
     28
    1729clean::
    1830
  • trunk/base/doc/Makefile

    r10952 r12159  
    3333                set -x; \
    3434                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 sources.conf ${DESTDIR}${portconfigdir}; \
    35                 echo "file://${dportsdir}" >> ${DESTDIR}${portconfigdir}/sources.conf; \
    3635        fi
    3736        $(SILENT)if test ! -e ${DESTDIR}${portconfigdir}/variants.conf ; then \
  • trunk/base/doc/ports.conf.in

    r10952 r12159  
    1 # Where to find the sources list.
    2 sources_conf            @PORTCONFIGDIR_EXPANDED@/sources.conf
    3 
    4 # Where to find global variants definition file (optional)
    5 #variants_conf          @PORTCONFIGDIR_EXPANDED@/variants.conf
     1# Set the directory in which to install ports
     2prefix                  @prefix_expanded@
    63
    74# Where to store ports specific database files
    85portdbpath              @localstatedir_expanded@/db/dports
    9 
    10 # Set the directory in which to install ports
    11 prefix                  @prefix_expanded@
    126
    137# Type of storage to use for the port registry information, "flat" or "sqlite"
     
    2115x11prefix               /usr/X11R6
    2216
    23 # Set whether to automatically execute "clean" after "install" of ports
    24 portautoclean           yes
     17# Where to find the sources list.
     18sources_conf            @PORTCONFIGDIR_EXPANDED@/sources.conf
     19
     20# Where to find global variants definition file (optional)
     21variants_conf           @PORTCONFIGDIR_EXPANDED@/variants.conf
    2522
    2623# Create and use binary archive packages for installation/reinstallation ease
     
    4138portarchivetype         tgz
    4239
     40# Set whether to automatically execute "clean" after "install" of ports
     41portautoclean           yes
     42
     43# Rsync server to use
     44rsync_server            rsync.opendarwin.org
     45
     46# Rsync directory from which to pull the base/ component (infrastructure) of DP
     47rsync_dir                       dpupdate1/base/
     48
     49# Rsync options
     50rsync_options           "-rtzv --delete --delete-after"
  • trunk/base/doc/sources.conf

    r3480 r12159  
    22# following line to point at your local dports directory
    33# Example: file:///Users/landonf/misc/darwinports/dports
    4 # file:///usr/dports
     4#
     5# To get darwinports from the opendarwin rsync server use:
     6# rsync://rsync.opendarwin.org/dpupdate/dports
     7rsync://rsync.opendarwin.org/dpupdate/dports
  • trunk/base/dp_version

    r11492 r12159  
    1 0.981
     11.001
  • trunk/base/src/darwinports1.0/Makefile

    r11025 r12159  
    2626        done
    2727
     28        echo "${TCL_PACKAGE_DIR}" > ${prefix}/var/db/dports/.tclpackage
     29
    2830        $(SILENT) $(TCLSH) ../pkg_mkindex.tcl ${INSTALLDIR}
    2931# XXX Prior installations of dports on Darwin installed darwinports1.0
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r11919 r12159  
    3737namespace eval darwinports {
    3838    namespace export bootstrap_options portinterp_options open_dports
    39     variable bootstrap_options "portdbpath libpath binpath auto_path sources_conf prefix portdbformat portinstalltype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask variants_conf"
    40     variable portinterp_options "portdbpath portpath auto_path prefix portsharepath registry.path registry.format registry.installtype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask"
     39    variable bootstrap_options "portdbpath libpath binpath auto_path sources_conf prefix portdbformat portinstalltype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask variants_conf rsync_server rsync_options rsync_dir"
     40    variable portinterp_options "portdbpath portpath portbuildpath auto_path prefix portsharepath registry.path registry.format registry.installtype portarchivemode portarchivepath portarchivetype portautoclean destroot_umask rsync_server rsync_options rsync_dir"
    4141       
    4242    variable open_dports {}
     
    7575
    7676proc dportinit {args} {
    77     global auto_path env darwinports::portdbpath darwinports::bootstrap_options darwinports::portinterp_options darwinports::portconf darwinports::sources darwinports::sources_conf darwinports::portsharepath darwinports::registry.path darwinports::autoconf::dports_conf_path darwinports::registry.format darwinports::registry.installtype darwinports::upgrade darwinports::destroot_umask darwinports::variants_conf
     77    global auto_path env darwinports::portdbpath darwinports::bootstrap_options darwinports::portinterp_options darwinports::portconf darwinports::sources darwinports::sources_conf darwinports::portsharepath darwinports::registry.path darwinports::autoconf::dports_conf_path darwinports::registry.format darwinports::registry.installtype darwinports::upgrade darwinports::destroot_umask darwinports::variants_conf darwinports::selfupdate darwinports::rsync_server darwinports::rsync_dir darwinports::rsync_options
    7878        global options variations
    7979
     
    253253        set darwinports::portarchivetype [split $portarchivetype {:,}]
    254254
     255        # Set rync options
     256        if {![info exists rsync_server]} {
     257                set darwinports::rsync_server rsync.opendarwin.org
     258                global darwinports::rsync_server
     259        }
     260        if {![info exists rsync_dir]} {
     261                set darwinports::rsync_dir dpupdate1/base/
     262                global darwinports::rsync_dir
     263        }
     264        if {![info exists rsync_options]} {
     265                set rsync_options "-rtzv --delete --delete-after"
     266                global darwinports::rsync_options
     267        }
     268
    255269    set portsharepath ${prefix}/share/darwinports
    256270    if {![file isdirectory $portsharepath]} {
     
    299313}
    300314
    301 proc darwinports::worker_init {workername portpath options variations} {
     315proc darwinports::worker_init {workername portpath portbuildpath options variations} {
    302316    global darwinports::portinterp_options auto_path registry.installtype
    303317
     
    399413# dports:// sources).
    400414proc darwinports::getportdir {url {destdir "."}} {
    401     if {[regexp {(?x)([^:]+)://(.+)} $url match protocol string] == 1} {
    402         switch -regexp -- ${protocol} {
    403             {^file$} { return $string}
    404         {dports} { return [darwinports::index::fetch_port $url $destdir] }
    405             {http|ftp} { return [darwinports::fetch_port $url] }
    406             default { return -code error "Unsupported protocol $protocol" }
    407         }
    408     } else {
    409         return -code error "Can't parse url $url"
    410     }
     415        if {[regexp {(?x)([^:]+)://(.+)} $url match protocol string] == 1} {
     416                switch -regexp -- ${protocol} {
     417                        {^file$} {
     418                                return $string
     419                        }
     420                        {^dports$} {
     421                                return [darwinports::index::fetch_port $url $destdir]
     422                        }
     423                        {^https?$|^ftp$} {
     424                                return [darwinports::fetch_port $url]
     425                        }
     426                        default {
     427                                return -code error "Unsupported protocol $protocol"
     428                        }
     429                }
     430        } else {
     431                return -code error "Can't parse url $url"
     432        }
    411433}
    412434
     
    457479        ditem_key $dport refcnt 1
    458480
    459     darwinports::worker_init $workername $portpath $options $variations
     481    darwinports::worker_init $workername $portpath [darwinports::getportbuildpath $porturl] $options $variations
    460482    if {![file isfile Portfile]} {
    461483        return -code error "Could not find Portfile in $portdir"
     
    790812}
    791813
     814proc darwinports::getsourcepath {url} {
     815        global darwinports::portdbpath
     816        regsub {://} $url {.} source_path
     817        regsub -all {/} $source_path {_} source_path
     818        return [file join $portdbpath sources $source_path]
     819}
     820
     821proc darwinports::getportbuildpath {porturl} {
     822        global darwinports::portdbpath
     823        regsub {://} $porturl {.} port_path
     824        regsub -all {/} $port_path {_} port_path
     825        return [file join $portdbpath build $port_path]
     826}
     827
    792828proc darwinports::getindex {source} {
    793     global darwinports::portdbpath
    794     # Special case file:// sources
    795     if {[darwinports::getprotocol $source] == "file"} {
    796         return [file join [darwinports::getportdir $source] PortIndex]
    797     }
    798     regsub {://} $source {.} source_dir
    799     regsub -all {/} $source_dir {_} source_dir
    800     return [file join $portdbpath sources $source_dir PortIndex]
     829        # Special case file:// sources
     830        if {[darwinports::getprotocol $source] == "file"} {
     831                return [file join [darwinports::getportdir $source] PortIndex]
     832        }
     833
     834        return [file join [darwinports::getsourcepath $source] PortIndex]
    801835}
    802836
    803837proc dportsync {args} {
    804     global darwinports::sources darwinports::portdbpath tcl_platform
    805 
    806     foreach source $sources {
    807         # Special case file:// sources
    808         if {[darwinports::getprotocol $source] == "file"} {
    809             continue
    810         } elseif {[darwinports::getprotocol $source] == "dports"} {
    811                         darwinports::index::sync $darwinports::portdbpath $source
    812         } else {
    813                         set indexfile [darwinports::getindex $source]
    814                         if {[catch {file mkdir [file dirname $indexfile]} result]} {
    815                                 return -code error $result
    816                         }
    817                         if {![file writable [file dirname $indexfile]]} {
    818                                 return -code error "You do not have permission to write to [file dirname $indexfile]"
    819                         }
    820                         exec curl -L -s -S -o $indexfile $source/PortIndex
     838        global darwinports::sources darwinports::portdbpath tcl_platform
     839
     840        foreach source $sources {
     841                ui_info "Synchronizing from $source"
     842                switch -regexp -- [darwinports::getprotocol $source] {
     843                        {^file$} {
     844                                continue
     845                        }
     846                        {^dports$} {
     847                                darwinports::index::sync $darwinports::portdbpath $source
     848                        }
     849                        {^rsync$} {
     850                                # Where to, boss?
     851                                set destdir [file dirname [darwinports::getindex $source]]
     852
     853                                if {[catch {file mkdir $destdir} result]} {
     854                                        return -code error $result
     855                                }
     856
     857                                # Keep rsync happy with a trailing slash
     858                                if {[string index $source end] != "/"} {
     859                                        set source "${source}/"
     860                                }
     861
     862                                # Do rsync fetch
     863                                if {[catch {system "rsync -rtzv --delete-after --delete \"$source\" \"$destdir\""}]} {
     864                                        return -code error "sync failed doing rsync"
     865                                }
     866                        }
     867                        {^https?$|^ftp$} {
     868                                set indexfile [darwinports::getindex $source]
     869                                if {[catch {file mkdir [file dirname $indexfile]} result]} {
     870                                        return -code error $result
     871                                }
     872                                exec curl -L -s -S -o $indexfile $source/PortIndex
     873                        }
    821874                }
    822875        }
     
    824877
    825878proc dportsearch {regexp {case_sensitive "yes"}} {
    826     global darwinports::portdbpath darwinports::sources
    827     set matches [list]
    828 
    829     # XXX This should not happen, but does with the tk port when searching for tcl.
    830     if {![info exists sources]} { return $matches }
     879        global darwinports::portdbpath darwinports::sources
     880        set matches [list]
     881
    831882        set found 0
    832     foreach source $sources {
    833         if {[darwinports::getprotocol $source] == "dports"} {
    834                 array set attrs [list name $regexp]
     883        foreach source $sources {
     884                if {[darwinports::getprotocol $source] == "dports"} {
     885                        array set attrs [list name $regexp]
    835886                        set res [darwinports::index::search $darwinports::portdbpath $source [array get attrs]]
    836887                        eval lappend matches $res
    837888                } else {
    838                 if {[catch {set fd [open [darwinports::getindex $source] r]} result]} {
    839                     ui_warn "Can't open index file for source: $source"
     889                        if {[catch {set fd [open [darwinports::getindex $source] r]} result]} {
     890                                ui_warn "Can't open index file for source: $source"
    840891                        } else {
    841892                                incr found 1
     
    850901                                                gets $fd line
    851902                                                array set portinfo $line
     903                                                switch -regexp -- [darwinports::getprotocol ${source}] {
     904                                                        {^rsync$} {
     905                                                                # Rsync files are local
     906                                                                set source_url "file://[darwinports::getsourcepath $source]"
     907                                                        }
     908                                                        default {
     909                                                                set source_url $source
     910                                                        }
     911                                                }
    852912                                                if {[info exists portinfo(portarchive)]} {
    853                                                         set porturl ${source}/$portinfo(portarchive)
     913                                                        set porturl ${source_url}/$portinfo(portarchive)
    854914                                                } elseif {[info exists portinfo(portdir)]} {
    855                                                         set porturl ${source}/$portinfo(portdir)
     915                                                        set porturl ${source_url}/$portinfo(portdir)
    856916                                                }
    857917                                                if {[info exists porturl]} {
     
    871931                        }
    872932                }
    873     }
     933        }
    874934        if {!$found} {
    875935                return -code error "No index(es) found! Have you synced your source indexes?"
    876936        }
    877937
    878     return $matches
     938        return $matches
    879939}
    880940
     
    9831043       
    9841044        return 0
     1045}
     1046
     1047# selfupdate procedure
     1048proc darwinports::selfupdate {args} {
     1049        global darwinports::prefix darwinports::rsync_server darwinports::rsync_dir darwinports::rsync_options options
     1050
     1051        if { [info exists options(ports_force)] && $options(ports_force) == "yes" } {
     1052                set use_the_force_luke yes
     1053                ui_debug "Forcing a rebuild of the darwinports base system."
     1054        } else {
     1055                set use_the_force_luke no
     1056                ui_debug "Rebuilding the darwinports base system if needed."
     1057        }
     1058        # syncing ports tree. We expect the user have rsync:// in teh sources.conf
     1059        if {[catch {dportsync} result]} {
     1060                return -code error "Couldnt sync dports tree: $result"
     1061        }
     1062
     1063        set dp_base_path [file join $prefix var/db/dports/sources/rsync.${rsync_server}_${rsync_dir}/]
     1064        if {![file exists $dp_base_path]} {
     1065                file mkdir $dp_base_path
     1066        }
     1067        ui_debug "DarwinPorts base dir: $dp_base_path"
     1068
     1069        # get user of the darwinports system
     1070        set user [file attributes [file join $prefix var/db/dports/sources/] -owner]
     1071        ui_debug "Setting user: $user"
     1072
     1073        # get darwinports version
     1074        set dp_version_path [file join ${prefix}/etc/ports/ dp_version]
     1075        if { [file exists $dp_version_path]} {
     1076                set fd [open $dp_version_path r]
     1077                gets $fd dp_version_old
     1078        } else {
     1079                set dp_version_old 0
     1080        }
     1081        ui_msg "DarwinPorts base version $dp_version_old installed"
     1082
     1083        ui_debug "Updating using rsync"
     1084        if { [catch { system "/usr/bin/rsync $rsync_options rsync://${rsync_server}/${rsync_dir} $dp_base_path" } ] } {
     1085                return -code error "Error: rsync failed in selfupdate"
     1086        }
     1087
     1088        # get new darwinports version and write the old version back
     1089        set fd [open [file join $dp_base_path dp_version] r]
     1090        gets $fd dp_version_new
     1091        close $fd
     1092        ui_msg "New DarwinPorts base version $dp_version_new"
     1093
     1094        # check if we we need to rebuild base
     1095        if {$dp_version_new > $dp_version_old || $use_the_force_luke == "yes"} {
     1096                ui_msg "Configuring, Building and Installing new DarwinPorts base"
     1097                # check if $prefix/bin/port is writable, if so we go !
     1098                # get installation user / group
     1099                set owner root
     1100                set group admin
     1101                if {[file exists [file join $prefix bin/port] ]} {
     1102                        # set owner
     1103                        set owner [file attributes [file join $prefix bin/port] -owner]
     1104                        # set group
     1105                        set group [file attributes [file join $prefix bin/port] -group]
     1106                }
     1107                set p_user [exec /usr/bin/whoami]
     1108                if {[file writable ${prefix}/bin/port] || [string equal $p_user $owner] } {
     1109                        ui_debug "permissions OK"
     1110                } else {
     1111                        return -code error "Error: $p_user cannot write to ${prefix}/bin - try using sudo"
     1112                }
     1113                ui_debug "Setting owner: $owner group: $group"
     1114
     1115                set dp_tclpackage_path [file join $prefix var/db/dports/ .tclpackage]
     1116                if { [file exists $dp_tclpackage_path]} {
     1117                        set fd [open $dp_tclpackage_path r]
     1118                                gets $fd tclpackage
     1119                } else {
     1120                        set tclpackage [file join ${prefix} share/darwinports/Tcl]
     1121                }
     1122                # do the actual installation of new base
     1123                ui_debug "Install in: $prefix as $owner : $group - TCL-PACKAGE in $tclpackage"
     1124                if { [catch { system "cd $dp_base_path && ./configure --prefix=$prefix --with-install-user=$owner --with-install-group=$group --with-tclpackage=$tclpackage && make && make install" } result] } {
     1125                        return -code error "Error installing new DarwinPorts base: $result"
     1126                }
     1127        }
     1128
     1129        # set the darwinports system to the right owner
     1130        ui_debug "Setting ownership to $user"
     1131        if { [catch { exec chown -R $user [file join $prefix var/db/dports/sources/] } result] } {
     1132                return -code error "Couldn't change permissions: $result"
     1133        }
     1134
     1135        # set the right version
     1136        ui_msg "selfupdate done!"
     1137
     1138        return 0
     1139}
     1140
     1141proc darwinports::version {} {
     1142        global darwinports::prefix darwinports::rsync_server darwinports::rsync_dir
     1143       
     1144        set dp_version_path [file join $prefix etc/ports/ dp_version]
     1145
     1146        if [file exists $dp_version_path] {
     1147                set fd [open $dp_version_path r]
     1148                gets $fd retval
     1149                return $retval
     1150        } else {
     1151                return -1
     1152        }
    9851153}
    9861154
  • trunk/base/src/pextlib1.0/Pextlib.c

    r11663 r12159  
    11/*
    22 * Pextlib.c
    3  * $Id: Pextlib.c,v 1.75 2005/04/07 03:07:25 landonf Exp $
     3 * $Id: Pextlib.c,v 1.76 2005/05/04 08:12:58 olegb Exp $
    44 *
    55 * Copyright (c) 2002 - 2003 Apple Computer, Inc.
  • trunk/base/src/port/port.1

    r11406 r12159  
    7474verbose mode (generate verbose messages)
    7575.It Fl d
    76 debug mode (generate debugging messages; implies
     76debug mode (generate debugging messages, implies
    7777.Fl v )
    7878.It Fl q
     
    113113For example:
    114114.Pp
    115 .Dl "port uninstall vim
    116 .Dl "port -u uninstall
     115.Dl "port uninstall vim"
     116.Dl "port -u uninstall"
     117.Ss activate
     118Activate the installed
     119.Ar portname .
     120.Ss deactivate
     121Deactivate the installed
     122.Ar portname .
    117123.Ss installed
    118124List all installed ports.
     
    126132For example:
    127133.Pp
    128 .Dl "port upgrade vim
    129 .Dl "port -a upgrade
     134.Dl "port upgrade vim"
     135.Dl "port -a upgrade"
     136.Pp
     137To upgrade
     138.Ar portname
     139wihtout following its dependencies, specify
     140.Fl n .
     141For example:
     142.Pp
     143.Dl "port -n upgrade ethereal"
     144.Ss selfupdate
     145Updates the DarwinPorts system, both the dports tree and if needed the base tools, installing the newest infrastructure if available. To update you would typically do:
     146.Pp
     147.Dl "sudo port -d selfupdate"
     148.Ss sync
     149Performs a sync operation only on the dports tree of a DarwinPorts installation, pulling in the latest revision available of the Portfiles. To update you would do:
     150.Pp
     151.Dl "sudo port -d sync"
    130152.Ss clean
    131153Clean the files used for building
     
    135157To remove the distribution files (tarballs, etc), specify
    136158.Fl -dist .
    137 To remove any archives, specify
     159To remove the archive(s) for the current version of a port, specify
    138160.Fl -archive .
    139 To remove the work files, distribution files, and archives, specify
     161To remove the work files, distribution files and archives, specify
    140162.Fl -all .
    141163For example:
    142164.Pp
    143 .Dl "port clean --dist vim
    144 .Dl "port clean --archive vim
     165.Dl "port clean --dist vim"
     166.Dl "port clean --archive vim"
     167.Pp
     168To remove only certain version(s) of a port's archives (
     169.Ar version
     170is any valid UNIX glob pattern), you can use:
     171.Pp
     172.Dl "port clean --archive vim 6.2.114"
     173.Pp
     174or:
     175.Pp
     176.Dl "port clean --archive vim '6.*'"
    145177.Ss list
    146178List all available ports.
     
    148180Search for an available port whose name matches a regular expression.
    149181.Pp
    150 .Dl "post search vim
    151 .Pp
     182.Dl "port search vim"
     183.Pp
     184.Ss info
     185Displays the meta-information about an available
     186.Ar portname .
     187.Ss variants
     188Lists the build variants available for
     189.Ar portname .
     190.Ss deps
     191Lists the other ports that are required for building and running
     192.Ar portname .
    152193.Ss contents
    153194Lists the files installed by
    154195.Ar portname .
    155 .Ss deps
    156 Lists the other ports that are required for building and running
    157 .Ar portname .
    158 .Ss variants
    159 Lists the build variants available for the
    160 .Ar portname .
    161 .Ss info
    162 Displays the meta-information about an available
    163 .Ar portname .
     196.Ss version
     197Display the release number of the installed DarwinPorts infrastructure.
    164198.Sh DEVELOPER TARGETS
    165 The targets that are often used by Port developers are intended to provide access to the different phases of a Port's build:
     199The targets that are often used by Port developers are intended to provide access to the different phases of a Port's build process:
    166200.Ss unarchive
    167 Unarchive the port from a pre-built binary. When archive mode is enabled, this command is called automatically, prior to
     201Unpack the port from a pre-built binary archive. When archive mode is enabled, this command is called automatically, prior to
    168202.Ar fetch ,
    169203to check for an existing binary archive to unpack. If found, it is unpacked and all stages up to
     
    201235.Ar archive
    202236target is called explicitly.
    203 .Ss activate
    204 Activate the installed
    205 .Ar portname .
    206 .Ss deactivate
    207 Deactivate the installed
    208 .Ar portname .
    209237.Sh PACKAGING TARGETS
    210238There are also targets for producing installable packages of ports:
     
    226254The following demonstrates invoking
    227255.Nm
    228 with the "extract" target on portdir "textproc/figlet" and extract.suffix set to ".tgz":
    229 .Pp
    230 .Dl "port extract -d textproc/figlet extract.suffix=.tgz"
     256with the "extract" target on
     257.Ar portdir
     258"textproc/figlet" and extract.suffix set to ".tgz":
     259.Pp
     260.Dl "port extract -D textproc/figlet extract.suffix=.tgz"
    231261.Pp
    232262.Sh DIAGNOSTICS
    233263.Ex -std
    234264.Sh SEE ALSO
     265.Xr portall 1 ,
    235266.Xr portfile 7 ,
    236267.Xr porthier 7 ,
     
    242273.An Ole Guldberg Jensen Aq olegb@opendarwin.org
    243274.An Robert Shaw Aq rshaw@opendarwin.org
     275.An Chris Ridd Aq cjr@opendarwin.org
  • trunk/base/src/port/port.tcl

    r11913 r12159  
    384384                }
    385385        }
     386        selfupdate {
     387                if { [catch {darwinports::selfupdate} result ] } {
     388                        puts "Selfupdate failed: $result"
     389                        exit 1
     390                }
     391        }
    386392        upgrade {
    387393        if {[info exists options(port_upgrade_all)] } {
     
    412418        }
    413419    }
     420
     421        version {
     422                puts "Version: [darwinports::version]"
     423        }
    414424
    415425        compact {
     
    783793                }
    784794                if {![info exists porturl]} {
    785                         set porturl file://./
     795                        set porturl file://[pwd]
    786796                }
    787797                # If version was specified, save it as a version glob for use
  • trunk/base/src/port1.0/portclean.tcl

    r11491 r12159  
    143143
    144144proc clean_work {args} {
    145         global workpath
     145        global workpath worksymlink
    146146
    147147        if {[file isdirectory ${workpath}]} {
     
    152152        } else {
    153153                ui_debug "No work directory found to remove."
     154        }
     155
     156        # Clean symlink, if necessary
     157        if {[file type $worksymlink] == "link"} {
     158                ui_debug "Removing symlink: ${worksymlink}"
     159                file delete -force -- ${worksymlink}
    154160        }
    155161
  • trunk/base/src/port1.0/portmain.tcl

    r10952 r12159  
    5454default distpath {[file join $portdbpath distfiles]}
    5555default workdir work
    56 default workpath {[file join $portpath $workdir]}
     56default workpath {[file join $portbuildpath $workdir]}
     57default worksymlink {[file join $portpath $workdir]}
    5758default prefix /opt/local
    5859default x11prefix /usr/X11R6
  • trunk/base/src/port1.0/portutil.tcl

    r10292 r12159  
    696696# open file to store name of completed targets
    697697proc open_statefile {args} {
    698     global workpath portname portpath ports_ignore_older
     698    global workpath worksymlink portname portpath ports_ignore_older
    699699   
    700700    if {![file isdirectory $workpath]} {
     
    713713            exec mkdir [file join $workpath]
    714714        }
     715    }
     716
     717    # Create a symlink to the workpath for port authors
     718    if {![file isdirectory $worksymlink]} {
     719            exec ln -sf $workpath $worksymlink
    715720    }
    716721   
  • trunk/base/src/port1.0/resources/group/perl5-1.0.tcl

    r12069 r12159  
    22# perl5-1.0.tcl
    33#
    4 # $Id: perl5-1.0.tcl,v 1.10 2005/04/28 21:44:14 mww Exp $
     4# $Id: perl5-1.0.tcl,v 1.11 2005/05/04 08:12:59 olegb Exp $
    55#
    66# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>,
Note: See TracChangeset for help on using the changeset viewer.