mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/4] doc: document git patch workflow
@ 2017-07-14 10:57 Roland Hieber
  2017-07-14 10:57 ` [ptxdist] [PATCH 2/4] doc: promote faq to own section Roland Hieber
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Roland Hieber @ 2017-07-14 10:57 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 doc/dev_manual.rst | 40 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a54888b43..3fe64a343 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -1223,7 +1223,6 @@ Creating Patches for a Package
 PTXdist uses the utilities *git*, *patch* or *quilt* to work with
 patches or patch series. We recommend *git*, as it can manage patch
 series in a very easy way.
-For this manual and the example we use *quilt* instead.
 
 Creating a Patch Series for a Package
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1248,6 +1247,9 @@ and an empty ``patch`` file.
     $ touch patches/foo-1.1.0/dummy
     $ echo dummy > patches/foo-1.1.0/series
 
+Using quilt
+"""""""""""
+
 Next is to extract the package (if already done, we must remove it
 first):
 
@@ -1263,11 +1265,43 @@ present in ``patches/foo-1.1.0`` and can be used the next time we
 extract the package again.
 
 All we have to do now is to do the modification we need to make the
-package work. We change into the build directory and use *quilt* to
+package work. We change into the build directory and use quilt_ to
 create new patches, add files to respective patches, modify these files
 and refresh the patches to save our changes.
+See the *quilt* documentation for more information.
+
+.. _quilt: http://savannah.nongnu.org/projects/quilt
+
+Using Git
+"""""""""
+
+After touching the series file like above, apply an additional command line
+switch to extract the package into a Git repository:
+
+::
+
+    $ ptxdist --git extract foo
+
+.. note:: Optionally, you can enable the setting *Developer Options → use git to
+  apply patches* in `ptxdist setup` to enable this permanently.
+  However, note that this setting is still experimental.
+
+Then, change into the package build directory, patch the required files, and
+make Git commits on the way.
+The Git history should now look something like this:
+
+::
+
+    $ git log --oneline --decorate
+    * df343e821851 (HEAD -> master) Makefile: don't build the tests
+    * 65a360c2bd60 strfry.c: frobnicate the excusator
+    * fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
+
+After commit your patches, call ``git ptx-patches`` to regenerate the patches
+and the series file in the ``patches/foo-0.1`` folder, so they don't get lost
+when cleaning the package.
 
-We recommend this way when modifying source files. But this way is
+We recommend working with patches when modifying source files. But this way is
 improper when an autotools based buildsystem itself needs modifications.
 Refer to section :ref:`configure_rebuild` on how PTXdist can
 handle this special task.
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-17  6:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14 10:57 [ptxdist] [PATCH 1/4] doc: document git patch workflow Roland Hieber
2017-07-14 10:57 ` [ptxdist] [PATCH 2/4] doc: promote faq to own section Roland Hieber
2017-07-14 10:57 ` [ptxdist] [PATCH 3/4] doc: faq: apply more structure Roland Hieber
2017-07-14 12:35   ` Michael Olbrich
2017-07-14 10:57 ` [ptxdist] [PATCH 4/4] doc: faq: copy editing, small rewrites for more clarity Roland Hieber
2017-07-14 12:34   ` Michael Olbrich
2017-07-14 12:21 ` [ptxdist] [PATCH 1/4] doc: document git patch workflow Bastian Stender
2017-07-14 12:28   ` Roland Hieber
2017-07-14 12:42 ` Michael Olbrich
2017-07-17  6:49 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox