Opened 22 years ago

Closed 22 years ago

Last modified 20 years ago

#505 closed defect (wontfix)

problem with reinplace in 2 different variant

Reported by: bchesneau@… Owned by: kvv@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc:
Port:

Description

this don't work :

variant a {

post-configure {

reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile

}

}

variant b {

post-configure {

reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile

}

}

when I do port -dv build +a +b , only b is ok.

but this work :

variant a {

post-configure {

reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile

}

}

Change History (2)

comment:1 Changed 22 years ago by bchesneau@…

in don't work variant a is :

variant a {

post-configure {

reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile

}

}

comment:2 Changed 22 years ago by kevin@…

Resolution: wontfix
Status: newclosed

Variants and targets are completely orthogonal (at least in 0.5) so pre-/post-/override directives shouldn't appear in more than one variant. Instead, a custom target should test whether certain variants are set via the variant_isset procedure and execute code conditionally, e.g.:

configure {

if {[variant_isset x11]} {

reinplace ...

}

}

Note: See TracTickets for help on using tickets.