Opened 19 years ago

Closed 18 years ago

#4315 closed defect (fixed)

patch.args do not support being overwritten inside variants

Reported by: yeled@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc: pguyot (Paul Guyot)
Port:

Description

The original issue is thus:

I have many patches to a Portfile. Some of these need patch.args -p1, some need -p0.

If we add a patch.args to a variant {} it uses a patch.args-append logic. This doesn't work because patch(1) will use the first instance of the -p switch.

To fix this I would ask for patch.args to support a replacement of the overall Portfile patch.args switch. But this could be extended to be more sane.

What I am asking for is a -replace logic to arguments passed on. For all arguments. configure.args- replace for instance.

This would allow us to have a sane way of having more complexe Portfiles that could incase +stable and +devel variants within one "dport".

What do you think?

C.

Attachments (1)

Portfile (3.2 KB) - added by yeled@… 19 years ago.
the Portfile that I'm having issues with.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 19 years ago by yeled@…

* Bug 4314 has been marked as a duplicate of this bug. *

comment:2 Changed 19 years ago by yeled@…

Cc: pguyot@… added

this is a sample Portfile for how I imagine it working.

PortSystem 1.0 name foo <etc>.. use_bzip2 yes patch.args -p1

variant another_patch { patch_sites-append http://foo.bar/ patchfiles-append patch.1 patch.args -p0 checksums-append patch.1 md5 a37a990057444edaef0bba57d8b7c0f1 }

currently simply adding another patch.args will append the args to the command - ending up with this:

"patch -p1 -p0 < patch.1"

Talking to Paul Guyot and he agrees that the latter is a bug..

the rest is more likely a feature request..

Changed 19 years ago by yeled@…

Attachment: Portfile added

the Portfile that I'm having issues with.

comment:3 Changed 18 years ago by pguyot (Paul Guyot)

Resolution: fixed
Status: newclosed

I figured it out. The -p argument is a pre_arg, not an arg. You need to do: patch.pre_args -p1

Does the documentation mention otherwise?

Note: See TracTickets for help on using tickets.