Opened 10 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 (3)

record-patchfiles-in-state.diff (1.6 KB) - added by RJVB (René Bertin) 10 years ago.
patch-muniv11PG-record-patches-in-statefile.diff (2.2 KB) - added by RJVB (René Bertin) 3 months ago.
equivalent patch for the muniversal-1.1 PG
patch-record-patches-in-statefile.diff (2.4 KB) - added by RJVB (René Bertin) 3 months ago.
current version of the portpatch:patch_main patch

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by RJVB (René Bertin)

comment:1 Changed 10 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 8 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 7 years ago by neverpanic (Clemens Lang)

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

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

Milestone: MacPorts 2.5.0MacPorts 2.6.0

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

Changed 3 months ago by RJVB (René Bertin)

equivalent patch for the muniversal-1.1 PG

Changed 3 months ago by RJVB (René Bertin)

current version of the portpatch:patch_main patch

Note: See TracTickets for help on using tickets.