Changeset 11967


Ignore:
Timestamp:
Apr 23, 2005, 6:06:50 AM (12 years ago)
Author:
olegb
Message:

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
+ make selfupdate forcable
+ make selfupdate understand where --with-tclpackage is.

Location:
branches/release1/base/src/darwinports1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/release1/base/src/darwinports1.0/Makefile

    r11025 r11967  
    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
  • branches/release1/base/src/darwinports1.0/darwinports.tcl

    r11938 r11967  
    10451045# selfupdate procedure
    10461046proc darwinports::selfupdate {args} {
    1047         global darwinports::prefix darwinports::rsync_server darwinports::rsync_dir darwinports::rsync_options
    1048 
     1047        global darwinports::prefix darwinports::rsync_server darwinports::rsync_dir darwinports::rsync_options options
     1048
     1049        if { [info exists options(ports_force)] && $options(ports_force) == "yes" } {
     1050                set use_the_force_luke yes
     1051                ui_debug "Forcing a rebuild of the darwinports base system."
     1052        } else {
     1053                set use_the_force_luke no
     1054                ui_debug "Rebuilding the darwinports base system if needed."
     1055        }
    10491056        # syncing ports tree. We expect the user have rsync:// in teh sources.conf
    10501057        if {[catch {dportsync} result]} {
     
    10841091
    10851092        # check if we we need to rebuild base
    1086         if {$dp_version_new > $dp_version_old } {
     1093        if {$dp_version_new > $dp_version_old || $use_the_force_luke == "yes"} {
    10871094                ui_msg "Configuring, Building and Installing new DarwinPorts base"
    10881095                # check if $prefix/bin/port is writable, if so we go !
     
    11041111                ui_debug "Setting owner: $owner group: $group"
    11051112
     1113                set dp_tclpackage_path [file join $prefix var/db/dports/ .tclpackage]
     1114                if { [file exists $dp_tclpackage_path]} {
     1115                        set fd [open $dp_tclpackage_path r]
     1116                                gets $fd tclpackage
     1117                } else {
     1118                        set tclpackage [file join ${prefix} share/darwinports/Tcl]
     1119                }
    11061120                # do the actual installation of new base
    1107                 if { [catch { system "cd $dp_base_path && ./configure --prefix=$prefix --with-install-user=$owner --with-install-group=$group && make && make install" } result] } {
     1121                ui_debug "Install in: $prefix as $owner : $group - TCL-PACKAGE in $tclpackage"
     1122                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] } {
    11081123                        return -code error "Error installing new DarwinPorts base: $result"
    11091124                }
Note: See TracChangeset for help on using the changeset viewer.