quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH 22/39] backup-files: Check if backup exists


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH 22/39] backup-files: Check if backup exists
Date: Tue, 22 Mar 2011 17:28:38 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.29-0.3-pae; KDE/4.3.5; i686; ; )

On Saturday 19 March 2011 10:52:52 am Jean Delvare wrote:
> Make sure that a backup exists before attempting any action which
> reads the file list from it.

I will actually have to drop this patch, as it turns out that "quilt 
push" can legitimately call restore with no backup files. Restore is 
called for rollback when a patch fails to apply completely. If the 
failing file is the first one in the patch, the backup directory never 
gets a chance to be created.

> 
> Signed-off-by: Jean Delvare <address@hidden>
> Reviewed-by: Raphael Hertzog <address@hidden>
> ---
>  quilt/scripts/backup-files.in |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> --- a/quilt/scripts/backup-files.in
> +++ b/quilt/scripts/backup-files.in
> @@ -205,6 +205,11 @@ if [ "${OPT_PREFIX:(-1)}" != / ]; then
>       exit 1
>  fi
> 
> +if [ "$1" = - ] && [ ! -d "$OPT_PREFIX" ]; then
> +     echo "Backup is missing" >&2
> +     exit 1
> +fi
> +
>  if [ -n "$OPT_FILE" ]; then
>       cat "$OPT_FILE" \
> 
>       | while read nextfile; do
> 

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]