[MacPorts] #21864: bad code in fs-traverse update in portarchive.tcl
MacPorts
noreply at macports.org
Sun Oct 25 00:56:14 PDT 2009
#21864: bad code in fs-traverse update in portarchive.tcl
-----------------------------------------+----------------------------------
Reporter: david.osguthorpe@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: High | Milestone:
Component: base | Version: 1.8.0
Resolution: fixed | Keywords:
Port: |
-----------------------------------------+----------------------------------
Changes (by jmr@…):
* status: new => closed
* resolution: => fixed
Old description:
> Since 1.8.0 at least (but not at 1.7.0) the original 1.7.0 find code in
> archive_main in portarchive.tcl
>
> {{{
> foreach fullpath [exec find $destpath ! -type d] {
> ...
> }
> }}}
>
> was replaced by an fs-traverse call
>
> {{{
> fs-traverse fullpath $destpath {
> if {[file isdirectory $fullpath]} {
> continue
> }
> ....
> }
> }}}
>
> this code terminates immediately as the first fullpath is a directory
> which is skipped and hence the contents of the directory are not scanned
> - ... is never executed for anything
>
> this means since 1.8.0 all +CONTENTS files in archives are incorrect as
> they do not have a file list
>
> fixups are
>
> {{{
> fs-traverse -depth fullpath $destpath {
> if {[file isdirectory $fullpath]} {
> continue
> }
> ....
> }
> }}}
>
> or
>
> {{{
> fs-traverse fullpath $destpath {
> if {![file isdirectory $fullpath]} {
> ...
> }
> }
> }}}
New description:
Since 1.8.0 at least (but not at 1.7.0) the original 1.7.0 find code in
archive_main in portarchive.tcl
{{{
foreach fullpath [exec find $destpath ! -type d] {
...
}
}}}
was replaced by an fs-traverse call
{{{
fs-traverse fullpath $destpath {
if {[file isdirectory $fullpath]} {
continue
}
....
}
}}}
this code terminates immediately as the first fullpath is a directory
which is skipped and hence the contents of the directory are not scanned -
... is never executed for anything
this means since 1.8.0 all +CONTENTS files in archives are incorrect as
they do not have a file list
fixups are
{{{
fs-traverse -depth fullpath $destpath {
if {[file isdirectory $fullpath]} {
continue
}
....
}
}}}
or
{{{
fs-traverse fullpath $destpath {
if {![file isdirectory $fullpath]} {
...
}
}
}}}
--
Comment:
r59882
--
Ticket URL: <http://trac.macports.org/ticket/21864#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list