Dean Roehrich wrote:
Sorry, looks like there's a bugfix patch I forgot to post. The CVS patches are also dependent on this one. When you create a new patch at the beginning of a series, this patch is inserted at the beginning of the series file, regardless of any directives or comments. If inserted before directives, this can break future "quilt setup" operations on the series file. The attached patch changes insert_in_series to insert the patch just before the first existing patch in the series file. An alternative would be to change to looking for the "next patch", and always insert right before that. -- Joe Green <[EMAIL PROTECTED]> MontaVista Software, Inc. |
Source: MontaVista Software, Inc. <[EMAIL PROTECTED]> Type: Defect Fix Disposition: submit to http://savannah.nongnu.org/projects/quilt Don't insert first patch before any initial directives or comments. Index: quilt-0.42/scripts/patchfns.in =================================================================== --- quilt-0.42.orig/scripts/patchfns.in +++ quilt-0.42/scripts/patchfns.in @@ -200,13 +200,25 @@ insert_in_series() tmpfile=$(gen_tempfile) || return 1 mkdir -p $(dirname $SERIES) - if [ -n "$top" ] + if [ -e "$SERIES" ] then - @AWK@ ' + if [ -n "$top" ] + then + @AWK@ ' { print } - /^'"$(quote_re $top)"'([ \t]|$)/ \ + /^'"$(quote_re $top)"'([ \t]|$)/ \ { print "'"$patch$patch_args"'" } - ' $SERIES > $tmpfile + ' $SERIES > $tmpfile + else + @AWK@ ' + BEGIN { insert = 1 } + /^$/ { print; next } + /^#/ { print; next } + insert { print "'"$patch$patch_args"'"; insert = 0 } + { print } + END { if (insert) print "'"$patch$patch_args"'" } + ' $SERIES > $tmpfile + fi status=$? if [ $status -ne 0 ] then @@ -215,10 +227,6 @@ insert_in_series() fi else echo "$patch$patch_args" > $tmpfile - if [ -e $SERIES ] - then - cat $SERIES >> $tmpfile - fi fi cat $tmpfile > $SERIES rm -f $tmpfile
_______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
