<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.7
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/12845cd46b08cba16efa677d5d605f69139b05f5">https://github.com/macports/macports-base/commit/12845cd46b08cba16efa677d5d605f69139b05f5</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 12845cd46b08cba16efa677d5d605f69139b05f5
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Jan 26 23:06:24 2022 +1100
<span style='display:block; white-space:pre;color:#404040;'> More use of shellescape
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 7c70b8004d6173f7d4454371b95c97083fbf2687)
</span>---
src/images_to_archives.tcl.in | 4 ++--
src/macports1.0/macports.tcl | 6 +++---
src/macports1.0/selfupdate.tcl | 10 +++++-----
src/package1.0/portdmg.tcl | 6 +++---
src/package1.0/portmdmg.tcl | 6 +++---
src/package1.0/portmpkg.tcl | 8 ++++----
src/package1.0/portpkg.tcl | 16 ++++++++--------
src/port1.0/portfetch.tcl | 6 +++---
src/port1.0/portutil.tcl | 10 +++++-----
9 files changed, 36 insertions(+), 36 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/images_to_archives.tcl.in b/src/images_to_archives.tcl.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 86cc87c2..2826430c 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/images_to_archives.tcl.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/images_to_archives.tcl.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -100,7 +100,7 @@ foreach installed $ilist {
</span> file rename $oldarchivefullpath $newlocation
} elseif {$installtype eq "image" && [file isdirectory $location]} {
# create archive from image dir
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W $location "$tarcmd -cjf $newlocation * > ${targetdir}/error.log 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W $location "$tarcmd -cjf [macports::shellescape $newlocation] * > [macports::shellescape ${targetdir}/error.log] 2>&1"
</span> file delete -force ${targetdir}/error.log
} else {
# direct mode (or missing image dir), create archive from installed files
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -110,7 +110,7 @@ foreach installed $ilist {
</span> puts $fd $entry
}
close $fd
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "$tarcmd -cjf $newlocation -T ${targetdir}/tarlist > ${targetdir}/error.log 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "$tarcmd -cjf [macports::shellescape $newlocation] -T [macports::shellescape ${targetdir}/tarlist] > [macports::shellescape ${targetdir}/error.log] 2>&1"
</span> file delete -force ${targetdir}/tarlist ${targetdir}/error.log
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 390226af..2470f7ad 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2908,13 +2908,13 @@ proc mportsync {{optionslist {}}} {
</span> set striparg "--strip-components=1"
set tar [macports::findBinary tar $macports::autoconf::tar_path]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -W "${destdir}" "$tar $verboseflag $striparg $extflag -xf $tarpath"} error]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -W ${destdir} "$tar $verboseflag $striparg $extflag -xf [macports::shellescape $tarpath]"} error]} {
</span> ui_error "Extracting $source failed ($error)"
incr numfailed
continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system "chmod -R a+r \"$destdir\""}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system "chmod -R a+r [macports::shellescape $destdir]"}]} {
</span> ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2944,7 +2944,7 @@ proc mportsync {{optionslist {}}} {
</span> if {![info exists options(no_reindex)]} {
global macports::prefix
set indexdir [file dirname [macports::getindex $source]]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system "${macports::prefix}/bin/portindex [macports::shellescape $indexdir]"}]} {
</span> ui_error "updating PortIndex for $source failed"
}
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/selfupdate.tcl b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index cfae374b..a4bbd2b4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -69,7 +69,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> # sync the MacPorts sources
ui_msg "$macports::ui_prefix Updating MacPorts base sources using rsync"
try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "$rsync_path $rsync_options rsync://${rsync_server}/$rsync_dir $mp_source_path"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "$rsync_path $rsync_options [macports::shellescape rsync://${rsync_server}/$rsync_dir] [macports::shellescape $mp_source_path]"
</span> } catch {{*} eCode eMessage} {
error "Error synchronizing MacPorts sources: $eMessage"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -78,7 +78,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> # verify signature for tarball
global macports::archivefetch_pubkeys
try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "$rsync_path $rsync_options rsync://${rsync_server}/${rsync_dir}.rmd160 $mp_source_path"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "$rsync_path $rsync_options [macports::shellescape rsync://${rsync_server}/${rsync_dir}.rmd160] [macports::shellescape $mp_source_path]"
</span> } catch {{*} eCode eMessage} {
error "Error synchronizing MacPorts source signature: $eMessage"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -104,7 +104,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> # extract tarball and move into place
set tar [macports::findBinary tar $macports::autoconf::tar_path]
file mkdir ${mp_source_path}/tmp
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tar_cmd "$tar -C ${mp_source_path}/tmp -xf $tarball"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tar_cmd "$tar -C [macports::shellescape ${mp_source_path}/tmp] -xf [macports::shellescape $tarball]"
</span> try -pass_signal {
system $tar_cmd
} catch {*} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -200,7 +200,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> foreach check_dir $check_dirs {
set sdk ${check_dir}/MacOSX${sdk_version}.sdk
if {[file exists $sdk]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set sdk_arg "SDKROOT=${sdk} "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk_arg "SDKROOT=[macports::shellescape ${sdk}] "
</span> break
} elseif {$::macports::os_major >= 20} {
set matches [glob -nocomplain -directory ${check_dir} MacOSX${sdk_version}*.sdk]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -208,7 +208,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> set matches [lsort -decreasing -command vercmp $matches]
}
if {[llength $matches] > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set sdk_arg "SDKROOT=[lindex $matches 0] "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdk_arg "SDKROOT=[macports::shellescape [lindex $matches 0]] "
</span> break
}
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portdmg.tcl b/src/package1.0/portdmg.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 4f1556c6..fa5a5bd1 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portdmg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portdmg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -86,14 +86,14 @@ proc portdmg::package_dmg {portname portversion portrevision} {
</span> }
set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${pkgpath} ${tmp_image}"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[system "$hdiutil create -quiet -fs HFS+ -volname [shellescape ${imagename}] -srcfolder [shellescape ${pkgpath}] [shellescape ${tmp_image}]"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[system "$hdiutil convert [shellescape ${tmp_image}] -format UDCO -o [shellescape ${final_image}] -quiet"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
}
# internet-enable verb removed from hdiutil in Catalina
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 19 && [system "$hdiutil internet-enable -quiet -yes ${final_image}"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 19 && [system "$hdiutil internet-enable -quiet -yes [shellescape ${final_image}]"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to internet-enable: %s"] ${final_image}]
}
file delete -force "${tmp_image}"
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portmdmg.tcl b/src/package1.0/portmdmg.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 74a0ee37..885f4e7e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portmdmg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portmdmg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -86,14 +86,14 @@ proc portmdmg::package_mdmg {portname portversion portrevision} {
</span> }
set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder [shellescape ${mpkgpath}] [shellescape ${tmp_image}]"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[system "$hdiutil convert [shellescape ${tmp_image}] -format UDCO -o [shellescape ${final_image}] -quiet"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
}
# internet-enable verb removed from hdiutil in Catalina
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 19 && [system "$hdiutil internet-enable -quiet -yes ${final_image}"] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 19 && [system "$hdiutil internet-enable -quiet -yes [shellescape ${final_image}]"] ne ""} {
</span> return -code error [format [msgcat::mc "Failed to internet-enable: %s"] ${final_image}]
}
file delete -force "${tmp_image}"
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portmpkg.tcl b/src/package1.0/portmpkg.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 717223c7..ca761d52 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portmpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portmpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -137,8 +137,8 @@ proc portmpkg::package_mpkg {portname portepoch portversion portrevision} {
</span> set packages_path ${mpkgpath}/Contents/Packages
set resources_path ${mpkgpath}/Contents/Resources
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "mkdir -p -m 0755 ${packages_path}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "mkdir -p -m 0755 ${resources_path}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "mkdir -p -m 0755 [shellescape ${packages_path}]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "mkdir -p -m 0755 [shellescape ${resources_path}]"
</span>
set dependencies {}
# get deplist
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -166,7 +166,7 @@ proc portmpkg::package_mpkg {portname portepoch portversion portrevision} {
</span> }
# copy our own pkg into the mpkg
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "cp -PR ${pkgpath} ${packages_path}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "cp -PR [shellescape ${pkgpath}] [shellescape ${packages_path}]"
</span>
if {!${package.flat} || ${os.major} < 10} {
portpkg::write_PkgInfo ${mpkgpath}/Contents/PkgInfo
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -189,7 +189,7 @@ proc portmpkg::package_mpkg {portname portepoch portversion portrevision} {
</span> write_distribution ${workpath}/Distribution $portname $dependencies
set productbuild [findBinary productbuild]
set v [portpkg::mp_version_to_apple_version $portepoch $portversion $portrevision]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdline "$productbuild --resources ${resources_path} --identifier org.macports.mpkg.${portname} --distribution ${workpath}/Distribution --package-path ${packages_path} --version ${v} ${mpkgpath}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "$productbuild --resources [shellescape ${resources_path}] --identifier org.macports.mpkg.${portname} --distribution [shellescape ${workpath}/Distribution] --package-path [shellescape ${packages_path}] --version ${v} [shellescape ${mpkgpath}]"
</span> ui_debug "Running command line: $cmdline"
system $cmdline
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portpkg.tcl b/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index a8a92824..f5150f41 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -151,19 +151,19 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> if {${os.major} >= 9} {
if {${package.flat}} {
set pkgtarget "10.5"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set pkgresources " --scripts ${package.scripts}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgresources " --scripts [shellescape ${package.scripts}]"
</span> set infofile "${workpath}/PackageInfo"
write_package_info $infofile
} else {
set pkgtarget "10.3"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set pkgresources " --resources ${package.resources} --title \"$portname-$portversion\""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgresources " --resources [shellescape ${package.resources}] --title \"$portname-$portversion\""
</span> set infofile "${workpath}/Info.plist"
write_info_plist $infofile $portname $portversion $portrevision
}
if {$using_pkgbuild} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdline "$pkgbuild --root ${destpath} ${pkgresources} --info $infofile --install-location / --identifier org.macports.$portname"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "$pkgbuild --root [shellescape ${destpath}] ${pkgresources} --info [shellescape $infofile] --install-location / --identifier org.macports.$portname"
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdline "PMResourceLocale=${language} $packagemaker --root ${destpath} --out ${pkgpath} ${pkgresources} --info $infofile --target $pkgtarget --domain system --id org.macports.$portname"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "PMResourceLocale=${language} $packagemaker --root [shellescape ${destpath}] --out [shellescape ${pkgpath}] ${pkgresources} --info [shellescape $infofile] --target $pkgtarget --domain system --id org.macports.$portname"
</span> }
if {${os.major} >= 10} {
set v [mp_version_to_apple_version $portepoch $portversion $portrevision]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -186,14 +186,14 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> file rename -force ${pkgpath} ${componentpath}
# Generate a distribution
set productbuild [findBinary productbuild]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdline "$productbuild --resources ${package.resources} --identifier org.macports.${portname} --distribution ${workpath}/Distribution --package-path ${package.destpath} ${pkgpath}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "$productbuild --resources [shellescape ${package.resources}] --identifier org.macports.${portname} --distribution [shellescape ${workpath}/Distribution] --package-path [shellescape ${package.destpath}] [shellescape ${pkgpath}]"
</span> ui_debug "Running command line: $cmdline"
system $cmdline
}
} else {
write_info_plist ${workpath}/Info.plist $portname $portversion $portrevision
write_description_plist ${workpath}/Description.plist $portname $portversion $description
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "$packagemaker -build -f ${destpath} -p ${pkgpath} -r ${package.resources} -i ${workpath}/Info.plist -d ${workpath}/Description.plist"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "$packagemaker -build -f [shellescape ${destpath}] -p [shellescape ${pkgpath}] -r [shellescape ${package.resources}] -i [shellescape ${workpath}/Info.plist] -d [shellescape ${workpath}/Description.plist]"
</span> }
file delete ${workpath}/Info.plist \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -213,8 +213,8 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> write_PkgInfo ${pkgpath}/Contents/PkgInfo
write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $portrevision
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "[findBinary mkbom $portutil::autoconf::mkbom_path] ${destpath} ${pkgpath}/Contents/Archive.bom"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${destpath} "[findBinary pax $portutil::autoconf::pax_path] -x cpio -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "[findBinary mkbom $portutil::autoconf::mkbom_path] [shellescape ${destpath}] [shellescape ${pkgpath}/Contents/Archive.bom]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${destpath} "[findBinary pax $portutil::autoconf::pax_path] -x cpio -w -z . > [shellescape ${pkgpath}/Contents/Archive.pax.gz]"
</span>
write_description_plist ${pkgpath}/Contents/Resources/Description.plist $portname $portversion $description
write_sizes_file ${pkgpath}/Contents/Resources/Archive.sizes ${pkgpath} ${destpath}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portfetch.tcl b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 63da6c8c..d26d5dc2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -446,14 +446,14 @@ proc portfetch::gitfetch {args} {
</span> # if we're just using HEAD, we can make a shallow repo
append options " --depth=1"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${git.cmd} clone $options ${git.url} ${worksrcpath} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${git.cmd} clone $options ${git.url} [shellescape ${worksrcpath}] 2>&1"
</span> ui_debug "Executing: $cmdstring"
if {[catch {system $cmdstring} result]} {
return -code error [msgcat::mc "Git clone failed"]
}
if {${git.branch} ne ""} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set env "GIT_DIR=${worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set env "GIT_DIR=[shellescape ${worksrcpath}/.git] GIT_WORK_TREE=[shellescape ${worksrcpath}]"
</span> set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1"
ui_debug "Executing $cmdstring"
if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -478,7 +478,7 @@ proc portfetch::hgfetch {args} {
</span> set insecureflag " --insecure"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} ${worksrcpath} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} [shellescape ${worksrcpath}] 2>&1"
</span> ui_debug "Executing: $cmdstring"
if {[catch {system $cmdstring} result]} {
return -code error [msgcat::mc "Mercurial clone failed"]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index fd26972c..3e5637e6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1348,9 +1348,9 @@ proc lipo {} {
</span> file delete ${file}
set lipoSources ""
foreach arch $universal_archlist {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- append lipoSources "-arch ${arch} ${workpath}/${arch}/${file} "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append lipoSources "-arch ${arch} [shellescape ${workpath}/${arch}/${file}] "
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "[findBinary lipo $portutil::autoconf::lipo_path] ${lipoSources}-create -output ${file}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "[findBinary lipo $portutil::autoconf::lipo_path] ${lipoSources}-create -output [shellescape ${file}]"
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2789,16 +2789,16 @@ proc extract_archive_metadata {archive_location archive_type metadata_type} {
</span> set raw_contents [exec -ignorestderr [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $archive_location --use-compress-program [findBinary lzma ""] ./+CONTENTS]
}
xar {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${tempdir} "[findBinary xar ${portutil::autoconf::xar_path}] -xf $archive_location +CONTENTS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${tempdir} "[findBinary xar ${portutil::autoconf::xar_path}] -xf [shellescape $archive_location] +CONTENTS"
</span> }
zip {
set raw_contents [exec -ignorestderr [findBinary unzip ${portutil::autoconf::unzip_path}] -p $archive_location +CONTENTS]
}
cpgz {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${tempdir} "[findBinary pax ${portutil::autoconf::pax_path}] -rzf $archive_location +CONTENTS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${tempdir} "[findBinary pax ${portutil::autoconf::pax_path}] -rzf [shellescape $archive_location] +CONTENTS"
</span> }
cpio {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${tempdir} "[findBinary pax ${portutil::autoconf::pax_path}] -rf $archive_location +CONTENTS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${tempdir} "[findBinary pax ${portutil::autoconf::pax_path}] -rf [shellescape $archive_location] +CONTENTS"
</span> }
}
if {[info exists twostep]} {
</pre><pre style='margin:0'>
</pre>