Skip to content

Commit

Permalink
Don't report undeclared dependencies with the extract target, since t…
Browse files Browse the repository at this point in the history
…here's no

way to declare a dependency for the extract target anyway.

This avoids unwanted warnings with bzip2 port (as use_bzip2 will take any bzip2
in path and therefore the one from DP if it's installed).

On the long-run, we might want to specify the path to bzip2 at configure time
or support dependencies for extract.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@18726 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
pguyot committed Jul 25, 2006
1 parent 6d1fc1d commit 146b3a5
Showing 1 changed file with 39 additions and 33 deletions.
72 changes: 39 additions & 33 deletions src/port1.0/portutil.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# et:ts=4
# portutil.tcl
# $Id: portutil.tcl,v 1.193 2006/07/24 05:55:44 pguyot Exp $
# $Id: portutil.tcl,v 1.194 2006/07/25 08:44:14 pguyot Exp $
#
# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
# Copyright (c) 2002 Apple Computer, Inc.
Expand Down Expand Up @@ -679,44 +679,50 @@ proc target_run {ditem} {
}

# Check dependencies & file creations outside workpath.
if {([info exists ports_trace]
if {[info exists ports_trace]
&& $ports_trace == "yes"
&& $target != "clean")} {
set depends {}
set deptypes {}
&& $target != "clean"} {

# Determine deptypes to look for based on target
switch $target {
configure { set deptypes "depends_lib" }
# Don't check dependencies for extract (they're not honored
# anyway). This avoids warnings about bzip2.
if {$target != "extract"} {
set depends {}
set deptypes {}

build { set deptypes "depends_lib depends_build" }
# Determine deptypes to look for based on target
switch $target {
configure { set deptypes "depends_lib" }

build { set deptypes "depends_lib depends_build" }

destroot -
install -
archive -
pkg -
mpkg -
rpmpackage -
dpkg -
"" { set deptypes "depends_lib depends_build depends_run" }
}

destroot -
install -
archive -
pkg -
mpkg -
rpmpackage -
dpkg -
"" { set deptypes "depends_lib depends_build depends_run" }
}

# Gather the dependencies for deptypes
foreach deptype $deptypes {
# Add to the list of dependencies if the option exists and isn't empty.
if {[info exists PortInfo($deptype)] && $PortInfo($deptype) != ""} {
set depends [concat $depends $PortInfo($deptype)]
# Gather the dependencies for deptypes
foreach deptype $deptypes {
# Add to the list of dependencies if the option exists and isn't empty.
if {[info exists PortInfo($deptype)] && $PortInfo($deptype) != ""} {
set depends [concat $depends $PortInfo($deptype)]
}
}

# Dependencies are in the form verb:[param:]port
set depsPorts {}
foreach depspec $depends {
# grab the portname portion of the depspec
set dep_portname [lindex [split $depspec :] end]
lappend depsPorts $dep_portname
}
trace_check_deps $target $depsPorts
}

# Dependencies are in the form verb:[param:]port
set depsPorts {}
foreach depspec $depends {
# grab the portname portion of the depspec
set dep_portname [lindex [split $depspec :] end]
lappend depsPorts $dep_portname
}
trace_check_deps $target $depsPorts

trace_check_violations

# End of trace.
Expand Down

0 comments on commit 146b3a5

Please sign in to comment.