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

Re: Intent to commit craziness - source package unpacking

Hi Ian,
On Mon, Sep 26, 2016 at 03:37:19PM +0100, Ian Jackson wrote:
> * Perhaps the git commits generated by dgit to represent patches can
>   be made to round-trip nicely into tools like git-dpm and
>   git-buildpackage.
>   I have found the information about tags in gbp-dch(1), but that
>   doesn't seem like it's applicable.
>   I have also found the information about tags in gbp-pq(1).  From
>   that it looks like I ought to generate "Gbp-Pq: Name" and "Gbp-Pq:
>   Topic".

When gbp imports the patches from the series file it creates one commit
per patch in the order listed in the series file. The ref the commits
are reachable from is named 'patch-queue/<basebranch>' where
<basebranch> is the branch you invoked 'gbp pq' from. So e.g.

    gbp import-dsc --download libvirt
    gbp pq import
    git log debian/sid..patch-queue/debian/sid

would give you all the patches and show this looks like.

The authorship and subject information is taken from the patch if
available or made up from the filename and committer when not.

If patches in the series file are in subdirs of debian/patches we store
that in "Gbp-Pq: topic" in the commit message. The patch name itself
is stored in "Gbp-Pq: Name" we can reproduce it on "gbp pq export"
independent from the patch's subject.

> * The scheme I describe avoids introducing a dependency from dgit to
>   git-buildpackage.  I might be able to replace the
>   successive-patch-application part with an appropriate invocation of
>   gbp-pq.  Would that be better ?

If you want people to have a tree readily available they can e.g.

"gbp import-orig --uscan && gbp pq rebase"

then yes.

>   Bear in mind that because the output of gbp-pq import doesn't
>   contain debian/patches, I would need to rewrite its output (perhaps
>   with git-filter-branch).

'gbp pq import' does have 'debian/patches' since it just puts the
patches that are in debian/patches on top of the unpatched source
tree. In contrast to your solution it doesn't try to be able to
roundtrip without changes for any given series on "gbp pq export". This
is only true if the series was also created by "gbp pq" (or adheres to
what git-format-patch does).
 -- Guido

> Comments welcome.  Please be quick - this is very close to the top of
> my dgit todo list.
> Thanks,
> Ian.
> -- 
> Ian Jackson <ijackson@chiark.greenend.org.uk>   These opinions are my own.
> If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
> a private address which bypasses my fierce spamfilter.

Reply to: