quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] mishandled error case in quilt import


From: Jean Delvare
Subject: [Quilt-dev] mishandled error case in quilt import
Date: Tue, 9 Aug 2005 20:04:29 +0200

Hi all,

I noticed that quilt import will not behave correctly if run on a
non-existent patch. It will print something along these lines:

Importing patch something.diff (stored as something.diff)
cp: cannot stat `something.diff': No such file or directory
Failed to import patch something.diff

So far so good, except that a patch named something.diff has been added
to the series file, regardless of the error. So we are in the
inconsistent state where a patch referenced in the series file doesn't
actually exist in the patches subdirectory.

I traced the problem down to revision 1.22 of quilt/import.in, in July
2004. The main goal of this revision was to replace all calls to echo by
calls to printf. However, it also introduced the "status" variable,
setting it to 1 when the error I just decribed occurs, rather than
bailing out immediately as was the case originally. This is why the
script will now still add the patch to the series file when the error
occurs.

It looks to me like the correct fix is to simply revert the introduction
of the status variable (see attached patch) but I'd like to know the
motivations that led to the introduction of the "status" variable in the
first place. Maybe I am missing something?

Andreas?

If the fix looks correct, I'll commit it to CVS.

Thanks,
-- 
Jean Delvare

Attachment: quilt-CVS-mishandled-import-error-fix.diff
Description: Text document


reply via email to

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