[95480] trunk/base/src/images_to_archives.tcl
jmr at macports.org
jmr at macports.org
Fri Jul 13 14:43:45 PDT 2012
Revision: 95480
https://trac.macports.org/changeset/95480
Author: jmr at macports.org
Date: 2012-07-13 14:43:43 -0700 (Fri, 13 Jul 2012)
Log Message:
-----------
cope with missing image dirs in images_to_archives
Modified Paths:
--------------
trunk/base/src/images_to_archives.tcl
Modified: trunk/base/src/images_to_archives.tcl
===================================================================
--- trunk/base/src/images_to_archives.tcl 2012-07-13 19:40:04 UTC (rev 95479)
+++ trunk/base/src/images_to_archives.tcl 2012-07-13 21:43:43 UTC (rev 95480)
@@ -92,19 +92,21 @@
set targetdir [file dirname $location]
} else {
set targetdir [file join ${macports::registry.path} software ${iname}]
- file mkdir $targetdir
+ }
+ if {$location == "" || ![file isdirectory $location]} {
set contents [$iref imagefiles]
}
+ file mkdir $targetdir
set newlocation [file join $targetdir $archivename]
if {$found} {
file rename $oldarchivefullpath $newlocation
- } elseif {$installtype == "image"} {
+ } elseif {$installtype == "image" && [file isdirectory $location]} {
# create archive from image dir
- system "cd $location && $tarcmd -cjf $newlocation * > ${targetdir}/error.log 2>&1"
+ system -W $location "$tarcmd -cjf $newlocation * > ${targetdir}/error.log 2>&1"
file delete -force ${targetdir}/error.log
} else {
- # direct mode, create archive from installed files
+ # direct mode (or missing image dir), create archive from installed files
# we tell tar to read filenames from a file so as not to run afoul of command line length limits
set fd [open ${targetdir}/tarlist w]
foreach entry $contents {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120713/18ae3ebc/attachment.html>
More information about the macports-changes
mailing list