diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2006-02-01 11:33:43 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2006-02-01 11:33:43 +0000 |
commit | 2f9728a96276570abdcf3420f27ce03af0feddea (patch) | |
tree | 57229f93e1ad365a56d7966e9b9ab884f1ce179f | |
parent | 9e306d4307fe27734be14cc1830c797465d153c6 (diff) | |
download | quilt-2f9728a96276570abdcf3420f27ce03af0feddea.tar.gz |
- bin/guards: Update to latest version (supports --with-guards
option).
- doc/README.in: Update the description of the helper scripts.
Add Typical Usages section from Randy Dunlap
<rdunlap@xenotime.net>.
- contrib/import.diff: Remove obsolete file.
-rw-r--r-- | contrib/import.diff | 251 | ||||
-rw-r--r-- | doc/README.in | 109 | ||||
-rw-r--r-- | quilt.changes | 15 |
3 files changed, 107 insertions, 268 deletions
diff --git a/contrib/import.diff b/contrib/import.diff deleted file mode 100644 index 712e8fc..0000000 --- a/contrib/import.diff +++ /dev/null @@ -1,251 +0,0 @@ -diff -Nur quilt-2003-02-01/quilt/import.in quilt-2003-02-02/quilt/import.in ---- quilt-2003-02-01/quilt/import.in 2003-01-31 17:25:06.000000000 +0100 -+++ quilt-2003-02-02/quilt/import.in 2003-02-02 01:47:59.000000000 +0100 -@@ -35,6 +35,10 @@ - -n patch - File name relative to patches/ to use. - -+-d {o|a|n} -+ Keep the old (o), all (a), or new (n) description. This option -+ must be specified if both patches include a description. -+ - -f Overwite/update existing patches. - - EOF -@@ -44,7 +48,7 @@ - fi - } - --options=`getopt -o fn:p:h -- "$@"` -+options=`getopt -o d:fn:p:h -- "$@"` - - if [ $? -ne 0 ] - then -@@ -58,8 +62,7 @@ - case "$1" in - -n) - opt_patch=$(echo "$2" | -- sed -e 's/^'"$(quote_bre $P)"'patches\///' \ -- -e 's/^\.pc\///') -+ sed -e 's/^'"$(quote_bre $P)"'patches\///') - shift 2 ;; - -p) - opt_strip=$2 -@@ -67,6 +70,9 @@ - -f) - opt_force=1 - shift ;; -+ -d) -+ opt_desc=$2 -+ shift 2 ;; - -h) - usage -h ;; - --) -@@ -83,122 +89,119 @@ - usage - fi - --[ -n "$opt_strip" ] && patch_args="-p$opt_strip" -+[ -n "$opt_strip" -a "$opt_strip" -ne 1 ] && patch_args="-p$opt_strip" -+ -+case "$opt_desc" in -+o) -+ keep_old_desc=1 -+ keep_new_desc=0 ;; -+a) -+ keep_old_desc=1 -+ keep_new_desc=1 ;; -+n) -+ keep_old_desc=0 -+ keep_new_desc=1 ;; -+'') -+ true ;; -+*) -+ echo "Invalid option -d$opt_desc" -+ exit 1 -+esac - --if [ -n "$opt_patch" ] -+if ! [ -r "$input_file" ] - then -- patch=$(stripit "$opt_patch") -- patch_file="${P}patches/$opt_patch" --else -- patch="$(stripit "$input_file")" -- if [ -n "$patch" ] -- then -- opt_patch="$patch.patch" -- else -- echo "Please use -n to specify a patch file name." -- exit 1 -- fi -- patch_file="${P}patches/$opt_patch" -+ echo "Cannot read from file $input_file" -+ exit 1 - fi - --if echo "$patch_file" | grep -q -e $'[ \t]' -+if [ -z "$opt_patch" ] - then -- echo "Patch file name \"$patch_file\" contains whitespace." -+ opt_patch="$(stripit "$input_file")" -+fi -+ -+patch=$(stripit "$opt_patch") -+if [ -z "$patch" ] -+then -+ echo "Please use -n to specify a patch file name." - exit 1 - fi - -+patch_file="${P}patches/$opt_patch" -+case "$patch_file" in -+*' '*) -+ echo "Patch file name \"$patch_file\" contains whitespace." -+ exit 1 ;; -+esac -+ -+# If the specified is topmost, pop? - if is_applied $patch - then - echo "Patch $patch is applied." - exit 1 - fi - --case "$input_file" in --'') -- tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) -- if ! cat > $tmpfile -- then -- echo "Cannot read from standard input." -- rm -f $tmpfile -- exit 1 -- fi -- input_file=$tmpfile ;; --*.gz) -- tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) -- if ! gzip -cd "$input_file" > $tmpfile -- then -- echo "Cannot decompress file $input_file" -- rm -f $tmpfile -- exit 1 -- fi -- input_file=$tmpfile ;; --*.bz2) -- tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) -- if ! bzip2 -cd "$input_file" > $tmpfile -- then -- echo "Cannot decompress file $input_file" -- rm -f $tmpfile -- exit -- fi -- input_file=$tmpfile ;; --*) -- if ! [ -r "$input_file" ] -- then -- echo "Cannot read from file $input_file" -- exit 1 -- fi --esac -+if [ -n "$patch_file" -a -z "$opt_force" ] -+then -+ echo "Patch $patch exists. Replace with -f." -+ exit 1 -+fi - --if [ -e "$patch_file" ] -+if [ -e "$patch_file" -a "$keep_old_desc" != 0 ] - then -- if [ -z "$opt_force" ] -- then -- echo "Patch $patch exists. Replace with -f." -- exit 1 -- fi -+ old_desc=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) -+ cat_file "$patch_file" \ -+ | patch_description > $old_doc -+fi -+ -+if [ "$keep_new_desc" != 0 ] -+then -+ new_desc=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) -+ cat_file "$input_file" \ -+ | patch_description > $new_desc -+fi - -- if grep -q '^%patch$' "$patch_file" && -- ! grep -q '^%patch$' "$input_file" -+if [ -s $old_doc -a -s $new_desc -a -z "$opt_desc" ] && \ -+ ! diff -q $old_doc $new_desc >/dev/null -+then -+ echo "Documentation difference:" -+ diff -u $old_doc $new_desc -+ echo "Please use -d {o|a|n} to specify which documentation to keep." -+ exit 1 -+elif [ -z "$opt_desc" ] -+then -+ [ -s $old_doc ] ; keep_old_files=$? -+ [ -s $new_doc ] ; keep_new_files=$? -+fi -+ -+if [ $keep_old_desc = 1 ] -+then -+ mkdir -p $(dirname "$patch_file") -+ temp_patch=$(@MKTEMP@ "$patch_file.XXXXXX") -+ cat $old_doc >> $temp_patch -+ if [ $keep_new_desc = 1 ] - then -- echo "Updating %patch section of patch $patch" -- if ! @SCRIPTS@/parse-patch -u patch $patch_file < "$input_file" -- then -- echo "Failed to update %patch section of patch $patch" -- exit 1 -- fi -+ echo "---" >> $temp_patch -+ cat_file "$input_file" >> $temp_patch - else -- echo "Replacing patch $patch with new version" -- if ! cat "$input_file" > "$patch_file" -- then -- echo "Failed to replace patch $patch" -- exit 1 -- fi -+ # FIX: cat only the non-description part! -+ cat "$input_file" >> $temp_patch - fi -+ cat_to_file "$patch_file" < $temp_patch -+ rm -f $temp_patch - else -- echo "Importing patch $patch (stored as $patch_file)" -- if ! grep -q '^%patch$' "$input_file" -- then -- echo "%patch" >> "$patch_file" -- fi -- if ! cat "$input_file" >> "$patch_file" -- then -- echo "Failed to import patch $patch" -- exit 1 -- fi -+ # FIX: Make sure the file extensions (.gz|.bz2|) match, and use cp -+ # if possible... -+ cat_file "$input_file" \ -+ | cat_to_file "$patch_file" - fi - - rm -rf .pc/$patch - --if ! patch_in_series $patch && -- ! insert_in_series $opt_patch "$patch_args" -+remove_from_series $patch -+if ! insert_in_series $opt_patch "$patch_args" - then - echo "Failed to insert $patch in file series." - fi -- --if [ -n "$tmpfile" ] --then -- rm -f $tmpfile --fi - ### Local Variables: - ### mode: shell-script - ### End: diff --git a/doc/README.in b/doc/README.in index 412610c..cc01cfa 100644 --- a/doc/README.in +++ b/doc/README.in @@ -9,27 +9,112 @@ Command reference ================= @REFERENCE@ -guards [--prefix=dir] [--path=dir1:dir2:...] [--default=0|1] - [--check] [--config=file] symbol ... - Convert a series file with conditional statements into a series - file as expected; see the guards(1) manual page. +Typical Usages: New patches; Importing patches; Patch management +====================================================================== + +Add new patches: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. create a new patch: quilt new {patchname, e.g., sysctl_fix.patch} + +2. add/edit file(s): quilt edit filepath +or: +2a. add file(s) to patch: quilt add {filepath} +2b. manual edit file(s) use your $editor + +3. update the patch: quilt refresh +3b. list the patch description: quilt header [patch] +3c. update the patch description: quilt header -e [patch] + +4. list files in the patch: quilt files + +5. show current patch contents: quilt diff + +6. apply current, ready for next: quilt push + +7. remove file(s) from patch: quilt remove {filepath} + +Importing patches: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. import a patch: quilt import patchfile + +2. apply it: quilt push + +3. update the patch: quilt refresh +3b. list the patch description: quilt header [patch] +3c. update the patch description: quilt header -e [patch] + +4. list files in the patch: quilt files + +5. show current patch contents: quilt diff + +Import/Apply a series file + patches to a tree: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. cp(1) the patches directory ('series' file + all patch files) to + the expected patches location (as specified in your .quiltrc file) + +2. apply all of series: quilt push -a + +Other patch management: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. remove files from a patch: quilt remove {filepath} + +2. remove unapplied patch: quilt delete {patchname} + +3. list all patch names: quilt series + +4. list all applied/unapplied: quilt applied | unapplied + +5. list top/previous/next patch name: quilt top | previous | next + +6. list patches modifying file: quilt patches {filepath} + +7. rename a patch: quilt rename {patchname} + +8. duplicate a patch: quilt fork {patchname} + +9. prepare or send mails: quilt mail ... + +10. search in source files: quilt grep ... + +11. create snapshot: quilt snapshot + +12. init from RPM spec or series file: quilt setup + +13. distribution of patches: quilt diff --combine + and distribute the combined diff file, + or distribute the patches/ directory content Helper files/scripts ==================== -patchfns - A collection of functions. +backup-files + A simple utility that creates / restores / removes + backup files. + +dependency-graph + A utility to compute patch dependencies from the QUILT_PC + metadata. + +edmail + A utility to manipulate the headers of an Internet mail message. + +guards + Convert a series file with conditional statements into a series + file as expected; see the guards(1) manual page. + +inspect + A script to create a series file from an rpm spec file (including + a list of tar files). parse-patch {-s|-u} section file [< replacement] Select a %section from a patch (-s) or replace a %section with the text from standard input (-u). -touched-by-patch filename - Print a list of files modified by a patch file. - -backup-files - A simple utility that creates / restores / removes - backup files. +patchfns + A collection of functions. +remove-trailing-ws + A utility to report trailing whitespace, and remove trailing + whitespace from files. diff --git a/quilt.changes b/quilt.changes index 63b223a..fc29377 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,13 +1,18 @@ ------------------------------------------------------------------- -Wed Feb 1 08:19:36 CET 2006 - khali@linux-fr.org +Wed Feb 1 11:40:58 CET 2006 - agruen@suse.de -- po/fr.po: Add missing translation of quilt mail's --sender - option help. Thanks to Andreas Gruenbacher for pointing out. +- bin/guards: Update to latest version (supports --with-guards + option). +- doc/README.in: Update the description of the helper scripts. + Add Typical Usages section from Randy Dunlap + <rdunlap@xenotime.net>. +- contrib/import.diff: Remove obsolete file. ------------------------------------------------------------------- -Wed Feb 1 05:37:00 CET 2006 - agruen@suse.de +Wed Feb 1 08:19:36 CET 2006 - khali@linux-fr.org -- +- po/fr.po: Add missing translation of quilt mail's --sender + option help. Thanks to Andreas Gruenbacher for pointing out. ------------------------------------------------------------------- Wed Feb 1 05:17:05 CET 2006 - jayvdb@gmail.com |