tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgquilt



Recent talk about LLM patches and in particular the possibility of
using LLM agents to help with the process of making patches, merging
existing patches, etc. (which seems like a bad idea under current
circs, but also like something that would be useful if it were
reliable) reminded me:

Long ago I proposed something called pkgquilt, which was basically to
be quilt (aka patch queues) integrated into pkgsrc patches. The idea
would be that you can apply one patch at a time while doing
maintenance work, which would both ease updates considerably and also
let us carry per-topic instead of per-file patches and save on patch
administrative overhead.

The scheme would basically be that the patch store is patches/ and the
rest of the state lives in work/, so that if you resync a patch it
gets saved immediately but all the rest of the state is transient.(1)
This avoids potential bad interactions with other pkgsrc operations
and expensive consequences from accidental cleans.

Then when working one would do "pkgquilt push" to apply the next
patch, "pkgquilt pop" to unapply the current patch, "pkgquilt sync" to
update the current patch, etc. Ordinary builds wouldn't use the queue
mechanism, just apply the patches as usual.

One could (I think) reasonably use any of git, hg, quilt, or raw
pkgdiff/nbpatch as the backend.

I started working on this at one point, but there's essentially zero
chance I will get back to it in any useful timeframe. Nonetheless, I
think it would be useful to have, both in general (I think per-topic
patches would be a good improvement) and in particular for handling
packages with nontrivial patches (speaking from the POV of having done
a lot of work in the past on packages with dead upstreams and such).

Would anyone be interested in taking it up?

(Note that I'm not sure where the code I wrote before is and even if I
can find it, there's a good chance it's not really worth salvaging, so
assume you'd be starting over)


(1) For updates it would be nice to be able to do "make extract" with
the old version, initialize pkgquilt, checkpoint somewhere, clean the
old version, unpack the new version, and reinitialize pkgquilt using
the checkpoint. This would allow it access to both the old and new
versions of the unpatched code and to merge the patches rather than
merely try to apply them. However, pkgquilt would still be useful
without this ability...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index