[csw-maintainers] mgar makepatch for more than one patch

Ben Walton bwalton at opencsw.org
Fri Sep 9 15:11:01 CEST 2011


Excerpts from Maciej Bliziński's message of Fri Sep 09 04:44:23 -0400 2011:

> Let's say you have made a couple edits to the sources and you want
> to make patches for GAR, but you don't want to make one big patch.
> Instead, you want a series of patches that you could individually
> offer upstream.  How would you do that in GAR+git?  What sequence of
> commands would you use?

The built in stuff is setup to slurp up all changes so that it's a
single easy command.  On pristine sources with no patches, the result
in $(WORKSRC) after the mgar patch run is a master branch that is
equivalent to the end of the mgar extract (typically upstream tarball,
but could be combination of multiple tarballs [eg: docbook]).  We
create a tag here called upstream-$(GARVERSION).  There is then a
branch called csw created and each existing patch is applied to this
branch.  After patches are applied, on the csw branch, we tag the top
of the currently known patch stack as csw-$(GARVERSION).

For a pristine project with no patches you'll have:

o
^
|
\- {master,tag:upstream-$v,csw,tag:csw-$v}

For a project with patches, you'll have:

o
^\--p1--p2--p3--new
|           ^
|           |
|           \-{csw,csw-$v}
|
\-{master,upstream-$v}

If you then modify the $(WORKSRC) and want to generate patches
manually, you can do cd $(WORKSRC); git add -p, etc.  To generate your
new patches, do: git format-patch csw-$(GARVERSION).

I could likely make the makepatch target capable of being run multiple
times and allow people to pass extra flags to git add (git stage) so
that those who want, can set GITPATCH_ADD_ARGS = -p in their .garrc or
something.  I wouldn't want to make this the default though.

Does this help?  Would re-runnable makepatch be worth the effort?

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the maintainers mailing list