Opened 9 years ago

Last modified 3 years ago

#46927 accepted enhancement

record successfully applied patches in the statefile

Reported by: RJVB (René Bertin) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone: MacPorts Future
Component: base Version:
Keywords: haspatch Cc: neverpanic (Clemens Lang), raimue (Rainer Müller)
Port:

Description

This patch records successfully applied patches in the state file, so that they can be skipped when repeating the patch phase. The feature is mostly geared towards port developers working on a new version of a port. When multiple patch files require changes it can be gain of time when one can refrain from having to do port clean repeatedly.

My suggestion on macports-dev to implement something like this didn't elicit any reaction so I whipped up something myself. The base implementation was simple enough; it would be nice if a patch were reverse-applied at once upon failure though.

Attachments (2)

record-patchfiles-in-state.diff (1.6 KB) - added by RJVB (René Bertin) 9 years ago.
patch-record-patches-in-statefile.diff (2.2 KB) - added by RJVB (René Bertin) 6 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by RJVB (René Bertin)

comment:1 Changed 9 years ago by raimue (Rainer Müller)

Cc: raimue@… added

Cc Me!

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #48361.

comment:3 Changed 9 years ago by RJVB (René Bertin)

Now why didn't I find this ticket when I looked for it...

Anyway, how would one best improve this to remove the need to revert a failed patch manually? The patch command has a --dry-run option which allows to test a patch without actually applying it. I guess it'd make sense to do such a dry run initially by prepending the option to the pre_args, but I've failed to achieve that until now :-/

comment:4 Changed 7 years ago by RJVB (René Bertin)

Bump: the patch still applies cleanly to MacPort-base master/head and continues to be very useful for me when adapting and/or adding patches to an upgraded source tree for instance.

Or to verify which patches are actually applied and in what order, something that can be less than trivial for more complex ports with multiple variants and/or subports.

comment:5 Changed 6 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts 2.5.0
Owner: changed from macports-tickets@… to neverpanic
Status: newaccepted

comment:6 Changed 6 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts 2.5.0MacPorts 2.6.0

Changed 6 years ago by RJVB (René Bertin)

comment:7 Changed 5 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.6.0MacPorts 2.7.0

Ticket retargeted after milestone closed

comment:8 Changed 3 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.7.0MacPorts Future

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.