Best practices for quilt patches

Julian Andres Klode julian.klode at canonical.com
Wed May 25 18:43:28 UTC 2022


On Wed, May 25, 2022 at 03:50:24PM +0100, Robie Basak wrote:
> Today on my SRU shift I spent some effort trying to see past quilt diff
> noise. Most of it seemed unnecessary and was only present because of
> gratuitous refreshes.
> 
> I'm not sure we have best practices are documented anywhere. I'd like to
> define some guidelines that make reviews easier. I think many people
> stick to these already. Can we agree that they're a good thing and try
> to get more people to do them?
> 
> Summary
> 
> 1. Use dep3 headers (https://dep-team.pages.debian.net/deps/dep3/)
> 
> 2. Use "-p ab --no-timestamps --no-index" or equivalent (as documented at
> https://wiki.debian.org/UsingQuilt#Environment_variables).
> 
> 3. Try not to update or refresh any quilt patch unless specifically
> required (ie. a patch doesn't apply, or applies with fuzz). Exception:
> do update dep3 headers.
> 
> Details and rationale:
> 
> 1. Use dep3 headers (https://dep-team.pages.debian.net/deps/dep3/)
> 
> This makes it easy for reviewers to correlate the patch against
> upstream, find any related upstream commentary or subsequent related
> commits, etc.
> 
> 2. Use "-p ab --no-timestamps --no-index" or equivalent (as documented at
> https://wiki.debian.org/UsingQuilt#Environment_variables).
> 
> This reduces diff noise in the future if an update becomes required.
> 
> Exception: if taking the patch from upstream and it applies as-is, then
> using the upstream form of the patch reduces the initial diff further,
> so that's preferable. So this combines with 3: use these settings when a
> refresh is required or generating the patch from scratch, but don't
> refresh to apply the settings to reduce noise unless actually required.
> 
> 3. Try not to update or refresh any quilt patch unless specifically
> required (ie. a patch doesn't apply, or applies with fuzz). Exception:
> do update dep3 headers.
> 
> This reduces the size of any diff taken against any other version of the
> quilt patch. Hopefully to zero.
> 
> If one patch needs refreshing, refresh just that one rather than all of
> them.

Hi Robbie, I understand it's frustrating, but for example, in grub
we use gbp-pq to manage the patch queue as a git branch, the patch
series is exported by that; if we need to change something early
there is noise.

As we have 100s of patches, it is not managable using just quilt.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20220525/9013944e/attachment.sig>


More information about the ubuntu-devel mailing list