[69042] trunk/base/src/port1.0/portextract.tcl
jmr at macports.org
jmr at macports.org
Mon Jun 21 15:51:46 PDT 2010
Revision: 69042
http://trac.macports.org/changeset/69042
Author: jmr at macports.org
Date: 2010-06-21 15:51:44 -0700 (Mon, 21 Jun 2010)
Log Message:
-----------
move contents of extract_init to extract_start, as it consists entirely of code that writes to disk or can throw errors
Modified Paths:
--------------
trunk/base/src/port1.0/portextract.tcl
Modified: trunk/base/src/port1.0/portextract.tcl
===================================================================
--- trunk/base/src/port1.0/portextract.tcl 2010-06-21 22:04:56 UTC (rev 69041)
+++ trunk/base/src/port1.0/portextract.tcl 2010-06-21 22:51:44 UTC (rev 69042)
@@ -35,7 +35,6 @@
package require portutil 1.0
set org.macports.extract [target_new org.macports.extract portextract::extract_main]
-target_init ${org.macports.extract} portextract::extract_init
target_provides ${org.macports.extract} extract
target_requires ${org.macports.extract} fetch checksum
target_prerun ${org.macports.extract} portextract::extract_start
@@ -73,9 +72,11 @@
return $val
}
-proc portextract::extract_init {args} {
- global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir use_bzip2 use_lzma use_xz use_zip use_7z use_dmg
+proc portextract::extract_start {args} {
+ global UI_PREFIX extract.dir extract.mkdir use_bzip2 use_lzma use_xz use_zip use_7z use_dmg
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
+
# should the distfiles be extracted to worksrcpath instead?
if {[tbool extract.mkdir]} {
global worksrcpath
@@ -83,7 +84,6 @@
file mkdir ${worksrcpath}
set extract.dir ${worksrcpath}
}
-
if {[tbool use_bzip2]} {
option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
} elseif {[tbool use_lzma]} {
@@ -93,13 +93,13 @@
} elseif {[tbool use_zip]} {
option extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
option extract.pre_args -q
- option extract.post_args "-d [option extract.dir]"
+ option extract.post_args "-d ${extract.dir}"
} elseif {[tbool use_7z]} {
option extract.cmd [binaryInPath "7za"]
option extract.pre_args x
option extract.post_args ""
} elseif {[tbool use_dmg]} {
- global distname
+ global distname extract.cmd
set dmg_mount [mkdtemp "/tmp/mports.XXXXXXXX"]
option extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}]
option extract.pre_args attach
@@ -107,12 +107,6 @@
}
}
-proc portextract::extract_start {args} {
- global UI_PREFIX
-
- ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
-}
-
proc portextract::extract_main {args} {
global UI_PREFIX filespath worksrcpath extract.dir usealtworkpath altprefix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100621/8d175f3b/attachment.html>
More information about the macports-changes
mailing list