Saturday, February 06, 2016

Creating a Patch File Using Quilt

What is  a patch file?

I quote the wiki here
" A patch file is a text file that consists of a list of differences and is produced by running the related diff program with the original and updated file as arguments"

Here I would explain a simple way to create a patch file using quilt.

1) The first step is to mention the name of the patch. That is done by running the below command.
quilt new <patch_name>

2) Next add the file which you are going to modify.
quilt add <file_name>

3) Make the changes you need to make.

4) Then run the below command to create the patch.
quilt refresh

The patch will be created in the patches directory by default. The patches directory will be created in the directory from which you run the quilt refresh command.

The quilt settings can be modified according to user preference by a quiltrc file. Some of the variables are listed below.
QUILT_DIFF_OPTS                        - options to be passed to gnu diff

QUILT_PATCHES                           - The patch directory which by default is patches.

QUILT_PATCHES_PREFIX           - The prefix to be added to patch name.

QUILT_NO_DIFF_INDEX              - To avoid prepending index.

QUILT_NO_DIFF_TIMESTAMPS -To avod including timestamps.


No comments:

Post a Comment