Ignore:
Timestamp:
Nov 8, 2002, 9:15:53 PM (18 years ago)
Author:
jkh
Message:

Use mtree to populate the directory hierarchy, also making sure that
permissions are correct. Switch group to admin as default and set permissions
so that users no longer have to be root in order to install ports. Make
sure the ports infrastructure uses it as well as the dports infrastructure,
so things continue to work even if they're decoupled.

Commit first part of master_sites stuff, next part to follow.

File:
1 edited

Legend:

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

    r1200 r1205  
    4040
    4141# define options
    42 options build.target.install
     42options build.target.install no_mtree mtree.file
     43
    4344# Set defaults
    4445default build.target.install install
     46default mtree.file /etc/ports/prefix.mtree
    4547
    4648set UI_PREFIX "---> "
     
    5355
    5456proc install_main {args} {
    55     global portname portversion portpath categories description depends_run contents workdir worksrcdir prefix build.type build.cmd build.target.install UI_PREFIX build.target.current
     57    global portname portversion portpath categories description depends_run contents workdir worksrcdir prefix build.type build.cmd build.target.install UI_PREFIX build.target.current no_mtree mtree.file
    5658
    57     if ![file exists $prefix] {
    58         ui_msg "Warning: The directory $prefix does not exist, creating it."
    59         if [catch {exec mkdir -p $prefix} err] {
    60             ui_error "Could not make directory for ${prefix}: $err"
    61             return -code error "Could not make directory for ${prefix}: $err"
    62         }
     59    # At some point this may popular $destdir instead
     60    if {![tbool no_mtree] && [file exists ${mtree.file}]} {
     61        system "mtree -U -f ${mtree.file} -d -e -p $prefix > /dev/null"
    6362    }
    6463
Note: See TracChangeset for help on using the changeset viewer.