Table of Contents
quilt(1)
quilt
is an excellent patch management utility. Especially upgrading a stack of many patches is often a pain in the ass.
Using quilt
all that matters are the right commands at the right time. :)
Refreshing External Patches
Not every project is using quilt
, but that's not a problem, one can use it nevertheless.
Assuming the patches are to be applied in alphabetical order and residing in ${PATCHES_DIR},
after unpacking the source package and cd
'ing into the root directory, you can use the following
script to import all patches in one run:
for i in ${PATCHES_DIR}/*.patch; do quilt import -P `basename $i` $i quilt push `basename $i` done
Go back to the initial state:
quilt pop -a
To actually update the patches, run:
while quilt push; do quilt refresh -p 1 -u --no-index --backup done
you will find the updated patches inside patches/ along with their original version suffixed with tilde.
To get a total diff, use this script:
for i in patches/*.patch; do diff ${i}~ $i done >quilt_check.log
sometimes some grep
'ing is helpful, e.g.:
cat quilt_check.log| grep -v -- '---' | grep -v '@@' | grep -v '+++' | grep -v 'diff ' | grep -ve '[0-9]*c'