Changeset 1888 for trunk/base


Ignore:
Timestamp:
Jan 26, 2003, 7:29:38 AM (17 years ago)
Author:
jpm
Message:

use tcl's file removal primitive rather than exec'ing an rm. this solves
an issue when attempting to remove read-only files (hang waiting for user
input) and also consumes less resources by not forking many rm's. to test
the theory, i ran /usr/bin/time on port uninstall for the gtk port.
results below show the tcl primitive out performing the exec.

# using 'exec rm ...'

---> Uninstalling gtk-1.2.10

4.81 real 1.02 user 4.36 sys

# using tcl's 'file delete ...' primitive

---> Uninstalling gtk-1.2.10

2.85 real 0.86 user 2.40 sys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portuninstall.tcl

    r1782 r1888  
    112112                    }
    113113                } else {
    114                     if [catch {exec rm $fname}] {
     114                    if [catch {file delete -- $fname}] {
    115115                        ui_info "$UI_PREFIX  [format [msgcat::mc "Uninstall unable to remove file %s"] $fname]"
    116116                        set uninst_err 1
Note: See TracChangeset for help on using the changeset viewer.