Ticket #5063: dependents.diff

File dependents.diff, 2.2 KB (added by olegb@…, 19 years ago)

dependents target

  • darwinports1.0/darwinports.tcl

    ? Makefile
    ? config.h
    ? darwinports1.0/.darwinports.tcl.swp
    ? darwinports1.0/Darwinports.dylib
    ? darwinports1.0/darwinports_autoconf.tcl
    ? darwinports1.0/darwinports_fastload.tcl
    ? darwintracelib1.0/darwintrace.dylib
    ? pextlib1.0/Pextlib.dylib
    ? port/.port.tcl.swp
    ? port/port
    ? port/portindex
    ? port1.0/port_autoconf.tcl
    ? programs/Makefile
    ? programs/daemondo/Makefile
    ? programs/daemondo/build
    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v
    retrieving revision 1.202
    diff -u -r1.202 darwinports.tcl
     
    14181418        return 0
    14191419}
    14201420
     1421# Return a list of dependents of a port
     1422proc darwinports::dependents {portname} {
     1423        registry::open_dep_map
     1424    set deplist [registry::list_dependents $portname]
     1425    if { [llength $deplist] > 0 } {
     1426        set dl [list]
     1427        # Check the deps first
     1428        foreach dep $deplist {
     1429                set depport [lindex $dep 2]
     1430                ui_msg "$depport depends on this port"
     1431                # xxx: Should look at making registry::installed return 0 or
     1432                # something instead  of erroring.
     1433                if { ![catch {set installed [registry::installed $depport]} res] } {
     1434                        if { [llength [registry::installed $depport]] > 0 } {
     1435                        lappend dl $depport
     1436                        }
     1437                }
     1438        }
     1439        } else {
     1440                ui_msg "No dependents"
     1441        }
     1442}
     1443
    14211444proc darwinports::version {} {
    14221445        global darwinports::prefix darwinports::rsync_server darwinports::rsync_dir
    14231446       
  • port/port.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port/port.tcl,v
    retrieving revision 1.145
    diff -u -r1.145 port.tcl
     
    13471347                        fatal "selfupdate failed: $result"
    13481348                }
    13491349        }
     1350
     1351        dependents {
     1352                require_portlist
     1353
     1354                foreachport $portlist {
     1355                        darwinports::dependents $portname
     1356                }
     1357        }
    13501358       
    13511359        upgrade {
    13521360        # Otherwise if the user has supplied no ports we'll use the current port