Ignore:
Timestamp:
Apr 2, 2009, 5:28:01 PM (11 years ago)
Author:
toby@…
Message:

Remove the deprecated dport* procs. Not sure if the portmgr stuff even still works, just did a basic search and replace.

Location:
trunk/base/portmgr/packaging
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/packaging/dpkgall.tcl

    r46960 r49059  
    294294        array set options {}
    295295        array set variations {}
    296         dportinit ui_options options variations
     296        mportinit ui_options options variations
    297297
    298298        # If -i was specified, install base system and exit
     
    348348        # If no portlist file was specified, create a portlist that includes all ports
    349349        if {[llength $portlist] == 0 || "$buildall_flag" == "true"} {
    350                 set res [dportsearch {.*}]
     350                set res [mportsearch {.*}]
    351351                foreach {name array} $res {
    352352                        lappend portlist $name
     
    495495                }
    496496
    497                 if {[catch {set workername [dportopen $portinfo(porturl) [array get options] [array get variations] yes]} result] || $result == 1} {
     497                if {[catch {set workername [mportopen $portinfo(porturl) [array get options] [array get variations] yes]} result] || $result == 1} {
    498498                        global errorInfo
    499499                        ui_debug "$errorInfo"
     
    502502                }
    503503
    504                 if {[catch {set result [dportexec $workername clean]} result] || $result == 1} {
     504                if {[catch {set result [mportexec $workername clean]} result] || $result == 1} {
    505505                        ui_noisy_error "Cleaning $portinfo(name) failed, consult build log"
    506506
     
    512512
    513513                        # Close the port
    514                         dportclose $workername
     514                        mportclose $workername
    515515
    516516                        continue
     
    518518
    519519                # Re-open the port. MacPorts doesn't play well with multiple targets, apparently
    520                 dportclose $workername
    521                 if {[catch {set workername [dportopen $portinfo(porturl) [array get options] [array get variations] yes]} result] || $result == 1} {
     520                mportclose $workername
     521                if {[catch {set workername [mportopen $portinfo(porturl) [array get options] [array get variations] yes]} result] || $result == 1} {
    522522                        global errorInfo
    523523                        ui_debug "$errorInfo"
     
    526526                }
    527527
    528                 if {[catch {set result [dportexec $workername dpkg]} result] || $result == 1} {
     528                if {[catch {set result [mportexec $workername dpkg]} result] || $result == 1} {
    529529                        ui_noisy_error "Packaging $portinfo(name) failed, consult build log"
    530530
     
    533533
    534534                        # Close the port
    535                         dportclose $workername
     535                        mportclose $workername
    536536
    537537                        # Close the log
     
    567567
    568568                # Close the port
    569                 dportclose $workername
     569                mportclose $workername
    570570        }
    571571
     
    741741        array set portinfo [lindex [get_portinfo $port] 1]
    742742
    743         if {[catch {set workername [dportopen $portinfo(porturl) $options $variants yes]} result] || $result == 1} {
     743        if {[catch {set workername [mportopen $portinfo(porturl) $options $variants yes]} result] || $result == 1} {
    744744                return -code error "Internal error: unable to open port: $result"
    745745                exit 1
    746746        }
    747747
    748         if {[catch {set result [dportexec $workername install]} result] || $result == 1} {
     748        if {[catch {set result [mportexec $workername install]} result] || $result == 1} {
    749749
    750750                # Close the port
    751                 dportclose $workername
     751                mportclose $workername
    752752
    753753                # Return error
     
    758758proc get_portinfo {port} {
    759759        set searchstring [regex_escape_portname $port]
    760         set res [dportsearch "^${searchstring}\$"]
     760        set res [mportsearch "^${searchstring}\$"]
    761761
    762762        if {[llength $res] < 2} {
  • trunk/base/portmgr/packaging/mpkgall.tcl

    r26177 r49059  
    5555        if {$portname == "XFree86"} { return {} }
    5656       
    57         if {[catch {set res [dportsearch "^$portname\$"]} error]} {
     57        if {[catch {set res [mportsearch "^$portname\$"]} error]} {
    5858                puts stderr "Internal error: port search failed: $error"
    5959                return
     
    217217#       set ui_options(ports_verbose) yes
    218218
    219 if {[catch {dportinit ui_options options variations} result]} {
     219if {[catch {mportinit ui_options options variations} result]} {
    220220    puts "Failed to initialize ports system, $result"
    221221    exit 1
     
    231231foreach pname $argv {
    232232
    233 if {[catch {set res [dportsearch "^${pname}\$"]} result]} {
     233if {[catch {set res [mportsearch "^${pname}\$"]} result]} {
    234234        puts "port search failed: $result"
    235235        exit 1
  • trunk/base/portmgr/packaging/packageall.tcl

    r46975 r49059  
    120120        set result {}
    121121       
    122         if {[catch {set res [dportsearch "^$portname\$"]} error]} {
     122        if {[catch {set res [mportsearch "^$portname\$"]} error]} {
    123123                global errorInfo
    124124                ui_debug "$errorInfo"
     
    201201#       set ui_options(ports_verbose) yes
    202202
    203 if {[catch {dportinit ui_options options variations} result]} {
     203if {[catch {mportinit ui_options options variations} result]} {
    204204    puts "Failed to initialize ports system, $result"
    205205    exit 1
     
    215215foreach pname $argv {
    216216
    217 if {[catch {set res [dportsearch "^${pname}\$"]} result]} {
     217if {[catch {set res [mportsearch "^${pname}\$"]} result]} {
    218218        puts "port search failed: $result"
    219219        exit 1
     
    392392        # Turn on verbose output for the build
    393393        set ui_options(ports_verbose) yes
    394         if {[catch {set workername [dportopen $porturl [array get options] [array get variations] yes]} result] ||
     394        if {[catch {set workername [mportopen $porturl [array get options] [array get variations] yes]} result] ||
    395395                $result == 1} {
    396396                global errorInfo
     
    399399            continue
    400400        }       
    401         if {[catch {set result [dportexec $workername pkg]} result] ||
     401        if {[catch {set result [mportexec $workername pkg]} result] ||
    402402                $result == 1} {
    403403                global errorInfo
    404404                ui_debug "$errorInfo"
    405405            ui_error "port package failed: $result"
    406                 dportclose $workername
     406                mportclose $workername
    407407            continue
    408408        }
     
    410410        # Turn verbose output off after the build
    411411
    412         dportclose $workername
     412        mportclose $workername
    413413
    414414        # We made it to the end.  We can delete the log file.
  • trunk/base/portmgr/packaging/rpmall.tcl

    r46958 r49059  
    123123        set result {}
    124124       
    125         if {[catch {set search [dportsearch "^$portname\$"]} error]} {
     125        if {[catch {set search [mportsearch "^$portname\$"]} error]} {
    126126                global errorInfo
    127127                ui_debug "$errorInfo"
     
    210210}
    211211
    212 if {[catch {dportinit ui_options options variations} result]} {
     212if {[catch {mportinit ui_options options variations} result]} {
    213213    puts "Failed to initialize ports system, $result"
    214214    exit 1
     
    224224foreach pname $argv {
    225225
    226 if {[catch {set allpackages [dportsearch "^${pname}\$"]} result]} {
     226if {[catch {set allpackages [mportsearch "^${pname}\$"]} result]} {
    227227        puts "port search failed: $result"
    228228        exit 1
     
    438438                if {![file exists /bin/${prebuild}] && ![file exists /usr/bin/${prebuild}]} {
    439439                        ui_msg "--->  Pre-installing ${prebuild}"
    440                         if {[catch {set search [dportsearch "^${prebuild}\$"]} error]} {
     440                        if {[catch {set search [mportsearch "^${prebuild}\$"]} error]} {
    441441                                global errorInfo
    442442                                ui_debug "$errorInfo"
     
    445445                        array set prebuildinfo [lindex $search 1]
    446446                        set ui_options(ports_verbose) yes
    447                         if {[catch {set workername [dportopen $prebuildinfo(porturl) [array get options] [array get variations] yes]} result] ||
     447                        if {[catch {set workername [mportopen $prebuildinfo(porturl) [array get options] [array get variations] yes]} result] ||
    448448                                $result == 1} {
    449449                                global errorInfo
     
    452452                                exit 1
    453453                        }
    454                         if {[catch {set result [dportexec $workername install]} result] ||
     454                        if {[catch {set result [mportexec $workername install]} result] ||
    455455                                $result == 1} {
    456456                                global errorInfo
    457457                                ui_debug "$errorInfo"
    458458                                ui_error "installation of ${prebuild} failed: $result"
    459                                 dportclose $workername
     459                                mportclose $workername
    460460                                exit 1
    461461                        }
     
    465465        # Turn on verbose output for the build
    466466        set ui_options(ports_verbose) yes
    467         if {[catch {set workername [dportopen $porturl [array get options] [array get variations]]} result] ||
     467        if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result] ||
    468468                $result == 1} {
    469469                global errorInfo
     
    472472            continue
    473473        }
    474         if {[catch {set result [dportexec $workername rpmpackage]} result] ||
     474        if {[catch {set result [mportexec $workername rpmpackage]} result] ||
    475475                $result == 1} {
    476476                global errorInfo
    477477                ui_debug "$errorInfo"
    478478            ui_error "port package failed: $result"
    479                 dportclose $workername
     479                mportclose $workername
    480480            continue
    481481        }
     
    483483        # Turn verbose output off after the build
    484484
    485         dportclose $workername
     485        mportclose $workername
    486486
    487487        # We made it to the end.  We can delete the log file.
Note: See TracChangeset for help on using the changeset viewer.