Changeset 1530 for trunk/base
- Timestamp:
- Jan 3, 2003, 9:15:39 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portpackage.tcl
r1527 r1530 42 42 43 43 # Set defaults 44 default package.type tarball44 default package.type pkg 45 45 default package.destpath {${workpath}} 46 46 … … 48 48 49 49 proc package_main {args} { 50 global portname portversion package.type UI_PREFIX50 global portname portversion package.type package.destpath UI_PREFIX 51 51 52 52 set rfile [registry_exists $portname $portversion] … … 55 55 return -code error "Package ${portname}-${portversion} not installed on this system" 56 56 } 57 ui_msg "$UI_PREFIX Creating ${package.type} package for ${portname}-${portversion}"57 ui_msg "$UI_PREFIX Creating ${package.type} format package for ${portname}-${portversion}" 58 58 if [regexp .bz2$ $rfile] { 59 59 set fd [open "|bunzip2 -c $rfile" r] … … 64 64 close $fd 65 65 66 # For now the only package type we support is "tarball" but move that 67 # into another routine anyway so that this is abstract enough. 68 69 return [package_pkg $portname $portversion $entry] 66 # Make sure the destination path exists. 67 system "mkdir -p ${package.destpath}" 68 69 # For now we only support pkg and tarball package types. 70 switch -exact -- ${package.type} { 71 pkg { 72 return [package_pkg $portname $portversion $entry] 73 } 74 tarball { 75 return [package_tarball $portname $portversion $entry] 76 } 77 default { 78 ui_error "Do not know how to generate package of type ${package.type}" 79 return -code error "Unknown package type: ${package.type}" 80 } 81 } 70 82 } 71 83
Note: See TracChangeset
for help on using the changeset viewer.