New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #11892: dry.patch

File dry.patch, 3.2 KB (added by gwhitneycom1@…, 5 years ago)

Somewhat hackish patch providing this functionality

  • (a) src/port/port vs. (b) /opt/mpq/bin/port.hack

    a b  
    21612161        pkg                     action_target 
    21622162        rpmpackage      action_target 
    21632163 
     2164        dry             action_target 
     2165 
    21642166        quit            action_exit 
    21652167        exit            action_exit 
    21662168} 
  • darwinports1.0/darwinports.tcl

    diff -rup src/darwinports1.0/darwinports.tcl /opt/mpq/share/darwinports/Tcl/darwinports1.0/darwinports.tcl
    old new  
    957957        if {![catch {$workername eval eval_variants variations $target} result] && $result == 0 && 
    958958                ![catch {$workername eval eval_targets $target} result] && $result == 0} { 
    959959                # If auto-clean mode, clean-up after dependency install 
    960                 if {[string equal ${darwinports::portautoclean} "yes"]} { 
     960                if {$target != "dry" && [string equal ${darwinports::portautoclean} "yes"]} { 
    961961                        # Make sure we are back in the port path before clean 
    962962                        # otherwise if the current directory had been changed to 
    963963                        # inside the port,  the next port may fail when trying to 
     
    977977# dportexec 
    978978# Execute the specified target of the given dport. 
    979979 
     980proc false {args} { 
     981  return 0 
     982} 
     983 
    980984proc dportexec {dport target} { 
    981985    global darwinports::registry.installtype 
    982986 
     
    9971001        if {$target == "configure" || $target == "build" 
    9981002                || $target == "test" 
    9991003                || $target == "destroot" || $target == "install" 
    1000                 || $target == "archive" 
     1004                || $target == "archive" || $target == "dry" 
    10011005                || $target == "pkg" || $target == "mpkg" 
    10021006                || $target == "rpmpackage" || $target == "dpkg" } { 
    10031007 
     
    10141018                # install them 
    10151019                # xxx: as with below, this is ugly.  and deps need to be fixed to 
    10161020                # understand Port Images before this can get prettier 
    1017                 if { [string equal ${darwinports::registry.installtype} "image"] } { 
     1021                if { $target == "dry" } {  # if this is a dry run, then run all dependencies dry 
     1022                    set result [dlist_eval $dlist false [list _dportexec "dry"]] 
     1023                } elseif { [string equal ${darwinports::registry.installtype} "image"] } { 
    10181024                        set result [dlist_eval $dlist _dportinstalled [list _dportexec "activate"]] 
    10191025                } else { 
    10201026                        set result [dlist_eval $dlist _dportinstalled [list _dportexec "install"]] 
    10211027                } 
    1022                  
     1028 
    10231029                if {$result != {}} { 
    10241030                        set errstring "The following dependencies failed to build:" 
    10251031                        foreach ditem $result { 
     
    12821288                mpkg            - 
    12831289                rpmpackage      - 
    12841290                dpkg            - 
     1291                dry                     { set deptypes "depends_lib depends_build depends_run" } 
    12851292                ""                      { set deptypes "depends_lib depends_build depends_run" } 
    12861293        } 
    12871294         
  • port1.0/port.tcl

    diff -rup src/port1.0/port.tcl /opt/mpq/share/darwinports/Tcl/port1.0/port.tcl
    old new  
    5151package require portdistcheck 1.0 
    5252package require portlivecheck 1.0 
    5353package require portmirror 1.0 
     54package require portdry 1.0