mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: Re: [ptxdist] [PATCH 1/4] doc: document git patch workflow
Date: Mon, 17 Jul 2017 08:49:55 +0200	[thread overview]
Message-ID: <20170717064955.qijhobianpyuqxcw@pengutronix.de> (raw)
In-Reply-To: <20170714105715.27051-1-r.hieber@pengutronix.de>

On Fri, Jul 14, 2017 at 12:57:12PM +0200, Roland Hieber wrote:
> 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

My German feeling for English tells me, this should read:

	After committing your patches call ...

(i.e. s/commit/committing/ s/,//)

> +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.

I don't understand this sentence. Is there an alternative to patches?
The only option I can think of it getting your patches upstream which is
still better than patches in ptxdist.

>  But this way is improper when an autotools based buildsystem itself
>  needs modifications.

Maybe:

Both approaches (git and quilt) are not suitable to modify files that
are autogenerated in autotools based buildsystems.

>  Refer to section :ref:`configure_rebuild` on how PTXdist can
>  handle this special task.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      parent reply	other threads:[~2017-07-17  6:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 10:57 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170717064955.qijhobianpyuqxcw@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=r.hieber@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox