Ticket #47592: elevate-rev-upgrade-macports.tcl.diff

File elevate-rev-upgrade-macports.tcl.diff, 551 bytes (added by mp@…, 10 years ago)

elevate privileges for rev-upgrade

  • base/src/macports1.0/macports.tcl

    diff --git a/base/src/macports1.0/macports.tcl b/base/src/macports1.0/macports.tcl
    index 1dacd30..826397f 100644
    a b proc macports::revupgrade_scanandrebuild {broken_port_counts_name opts} { 
    45274527    if {$fancy_output} {
    45284528        set revupgrade_progress $macports::ui_options(progress_generic)
    45294529    }
     4530    if {[getuid] == 0 && [geteuid] != 0} {
     4531        seteuid 0; setegid 0
     4532    }
    45304533    if {$files_count > 0} {
    45314534        registry::write {
    45324535            try {