Ticket #2377 (new defect)
portvariants doesn't reflect excluded variants
| Reported by: | david.serpa@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts base bugs |
| Component: | base | Version: | |
| Keywords: | Cc: | ||
| Port: |
Description
portvariants always has the form +variant1+variant2+..., never +variant1-variant2-...+... If someone were to exclude one or more default_variants during port install, I think it would be desirable to allow portvariants to take the 2nd form. In base/src, only port1.0/portactivate.tcl, port1.0/ portinstall.tcl and port1.0/portutil.tcl access portvariants. Possible patches for these 3 files follow:
--- darwinports/base/src/port1.0/portactivate.tcl.orig Sun Nov 7 22:03:54 2004 +++ darwinports/base/src/port1.0/portactivate.tcl Sun Nov 7 22:30:57 2004 @@ -54,7 +54,7 @@
# Put together variants in the form +foo+bar for the registry foreach v $vlist {
if { ![string equal $v [option os.platform]] && ![string equal $v [option os.arch]] } {
- set portvariants "${portvariants}+${v}" + set portvariants "${portvariants}$variations(${v})${v}"
}
}
}
--- darwinports/base/src/port1.0/portinstall.tcl.orig Sun Nov 7 22:04:16 2004 +++ darwinports/base/src/port1.0/portinstall.tcl Sun Nov 7 22:31:22 2004 @@ -51,7 +51,7 @@
# Put together variants in the form +foo+bar for the registry foreach v $vlist {
if { ![string equal $v [option os.platform]] && ![string equal $v [option os.arch]] } {
- set portvariants "${portvariants}+${v}" + set portvariants "${portvariants}$variations(${v})${v}"
}
}
}
--- darwinports/base/src/port1.0/portutil.tcl.orig Sun Nov 7 22:04:30 2004 +++ darwinports/base/src/port1.0/portutil.tcl Sun Nov 7 22:31:47 2004 @@ -543,7 +543,7 @@
# Put together variants in the form +foo+bar for the registry foreach v $vlist {
if { ![string equal $v [option os.platform]] && ![string equal $v [option os.arch]] } {
- set portvariants "${portvariants}+${v}" + set portvariants "${portvariants}$variations(${v})${v}"
}
}
}

