[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] Debian Bug#358875: quilt should fail if the series file
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] Debian Bug#358875: quilt should fail if the series file references a non existent patch |
Date: |
Tue, 28 Mar 2006 11:19:02 +0200 |
Hi Martin,
> I got this from the Debian BTS. It sounds like a good idea to me, and the
> patch sounds good also.
>
> What do you guys think of it?
Looks good to me, modulo the suggestions below.
> diff -rauN ../work2/quilt-0.44/quilt/push.in ./quilt-0.44/quilt/push.in
> --- ../work2/quilt-0.44/quilt/push.in 2006-03-24 21:38:49.000000000 +0100
> +++ ./quilt-0.44/quilt/push.in 2006-03-24 23:12:23.000000000 +0100
> @@ -183,6 +183,13 @@
> no_reject_files="-r $tmp"
> fi
>
> + if ! [ -e $patch_file ] && [ -z "$opt_force" ]
Isn't this more efficiently written that way?
if [ ! -e "$patch_file" -a -z "$opt_force" ]
> + then
> + printf $"Patch %s does not exist\n" \
> + "$(print_patch $patch)"
That's an error message, so it should go to stderr rather than stdout.
Also, it could mention that -f will enforce the push (same we do for
other commands, for example refresh.)
> + exit 1
"return 1" would fit better - although I agree it doesn't actually
change anything at the moment.
> + fi
> +
> apply_patch $patch "$patch_file"
> status=$?
> trap "" SIGINT
> @@ -206,6 +213,7 @@
>
> if ! [ -e $patch_file ]
> then
> + # only if [ -n "$opt_force" ]
> printf $"Patch %s does not exist; applied empty
> patch\n" \
> "$(print_patch $patch)"
> elif [ -z "$(shopt -s nullglob ; echo "$QUILT_PC/$patch/"*)" ]
This comment doesn't look too useful to me.
When you apply this patch, please update and extend test/missing.test
accordingly.
Thanks,
--
Jean Delvare