Ticket #25671: unprivileged_install_error.diff

File unprivileged_install_error.diff, 859 bytes (added by jmroot (Joshua Root), 14 years ago)
  • src/port1.0/portutil.tcl

     
    14491449
    14501450
    14511451proc eval_targets {target} {
    1452     global targets target_state_fd name version revision portvariants epoch ports_dryrun user_options
     1452    global targets target_state_fd name version revision portvariants epoch ports_dryrun user_options usealtworkpath
    14531453    set dlist $targets
    14541454
     1455    if {$usealtworkpath && ($target == "install" || $target == "activate")} {
     1456        return -code error "insufficient privileges to run target '$target'"
     1457    }
     1458
    14551459    # the statefile will likely be autocleaned away after install,
    14561460    # so special-case already-completed install and activate
    14571461    if {[registry_exists $name $version $revision $portvariants]} {