Opened 14 years ago

Closed 14 years ago

#22419 closed defect (invalid)

variant_isset does not work for default_variants

Reported by: tenomoto (Takeshi Enomoto) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.8.1
Keywords: Cc:
Port:

Description

When using the default variants set by platform it seems that one should write

if {[variant_isset gcc42] || (${os.platform}=="darwin" && ${os.major}>=10)} {
# zap
}
# zap
platform darwin 10 {}
if {[variant_isset darwin_10]} {
   default_variants +gcc42
}

I would expect default_variants set by platform is valid when variant_isset is called so variant_isset should be true without the second condition on a machine running Snow Leopard. Thus }}}

in place of

if {[variant_isset gcc42]} {
# zap
}

should be sufficient. The default variant appears to be selected so variant_isset needs fixing.

Change History (1)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed

The gcc42 variant is in fact not set when you call variant_isset in this example. It becomes set when you call default_variants.

Note: See TracTickets for help on using tickets.