Opened 19 years ago

Closed 18 years ago

#8229 closed enhancement (fixed)

BUG: 'port deps' has innaccurrate output with multiple targets

Reported by: ray@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.2
Keywords: Cc: markd@…
Port:

Description (last modified by jberry@…)

For example:

fping has build dependencies on:

automake libtool

fping has library dependencies on:

expat freetype

freetype has build dependencies on:

automake libtool

freetype has library dependencies on:

zlib

freetype has build dependencies on:

automake libtool

freetype has library dependencies on:

zlib

gd2 has build dependencies on:

automake libtool

gd2 has library dependencies on:

libpng jpeg freetype XFree86

Notice that the freetype library dependencies are listed and then the build dependencies are listed. And then both of them are listed again....

Change History (7)

comment:1 Changed 19 years ago by ray@…

figured something out...

"port installed" showed me:

freetype @2.1.10_1 (active) freetype @2.1.9_1

But why would I be interested in the inactive port? Perhaps this should filter inactive ports out of the list.

comment:2 Changed 18 years ago by markd@…

Type: defectenhancement

comment:3 Changed 18 years ago by markd@…

Cc: markd@… added
Summary: the 'port deps installed' script is putting out dupesBUG: 'port deps' has innaccurrate output with multiple targets

For a concrete example:

port deps nrg nrg has library dependencies on:

rrdtool

port deps mysql mysql has no dependencies

port deps nrg mysql nrg has library dependencies on:

rrdtool

mysql has library dependencies on:

rrdtool

But the ouput is correct when the port with no dependencies is listed first:

port deps mysql nrg mysql has no dependencies nrg has library dependencies on:

rrdtool

comment:4 Changed 18 years ago by kirk.kelsey@…

this is caused by the use of "array set", which does not initialize the array of properties, but only sets those specified. If a port doesn't have dependencies, then the associated parts of the array are not explicitly set and end up being carried over from the previous port.

The following patch seems to resolve the problem (the result of diff ./port /opt/local/bin/port)

1688,1689d1687 < array set portinfo [lindex $result 1] < 1692a1691,1696

foreach depstype $depstypes {

set portinfo($depstype) ""

}

array set portinfo [lindex $result 1]

comment:5 Changed 18 years ago by kirk.kelsey@…

sorry. that should be:

1688,1689d1687
<               array set portinfo [lindex $result 1]
<
1692a1691,1696
>               foreach depstype $depstypes {
>                       set portinfo($depstype) ""
>               }
>
>               array set portinfo [lindex $result 1]
>

comment:6 Changed 18 years ago by jberry@…

Description: modified (diff)

Thanks for the report. This should be resolved in r19992. Please verify.

comment:7 Changed 18 years ago by jberry@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.