Changeset 139300


Ignore:
Timestamp:
Aug 11, 2015, 3:51:45 PM (3 years ago)
Author:
ijackson@…
Message:

Add user confirmation option while installing using libsolv.

Remove puts statements added previously for debugging purposes.

Location:
branches/gsoc15-dependency/base/src/macports1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc15-dependency/base/src/macports1.0/macports.tcl

    r139046 r139300  
    20392039                set options(subport) $portname
    20402040               
    2041                 puts "Current: $portname" 
    20422041                set mport [mportopen $porturl [list subport $portname]]
    20432042                foreach dep [$portsolv lookup_deparray $solv::SOLVABLE_REQUIRES] {
     
    20462045                        continue
    20472046                    }
    2048                     puts "Adding $depname to requires"
    20492047                    ditem_append_unique $mport requires $depname
    20502048                }
  • branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl

    r139046 r139300  
    407407       
    408408        set install_list [list]
    409 
     409        set dep_list [list]
    410410        foreach cl [$trans classify $clflag] {
    411411            if {[$cl cget -type] == $solv::Transaction_SOLVER_TRANSACTION_ERASE} {
     
    436436                } else {
    437437                    puts [$p __str__]
     438                    lappend dep_list [$p __str__]
    438439                    array set portinfo $portindexinfo([$p cget -id])
    439440                    set porturl "file://[[$p cget -repo] cget -name]/${portinfo(portdir)}"
     
    443444            }
    444445        }
     446        if {[info exists macports::ui_options(questions_yesno)]} {
     447            set retvalue [$macports::ui_options(questions_yesno) "The following dependencies will be installed by libsolv: " "" [lsort $dep_list] {y} 0]
     448            if {$retvalue == 1} {
     449                return {}
     450            }
     451        } else {
     452            set depstring "$macports::ui_prefix Dependencies to be installed by libsolv:"
     453        }
    445454        return $install_list
    446455    }
Note: See TracChangeset for help on using the changeset viewer.