[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] quilt push and globbing
From: |
Andreas Gruenbacher |
Subject: |
Re: [Quilt-dev] quilt push and globbing |
Date: |
Wed, 11 May 2005 23:19:46 +0200 |
User-agent: |
KMail/1.7.1 |
On Wednesday 11 May 2005 22:31, Jean Delvare wrote:
> Hi all,
>
> I think I hit a minor bug in quilt push. When I try to push a patch with
> matching square brackets (like "[PATCH]_something.patch"), quilt push
> complains that the patch seems to be empty (but works otherwise).
>
> I have narrowed the problem down to these lines in push:
>
> if [ "$(shopt -s nullglob ; echo $QUILT_PC/$patch/*)" = "" ]
> then
> printf $"Patch %s appears to be empty, applied\n" \
> "$(print_patch $patch)"
> elif...
>
> I think that the nullglob applies to $patch here, while it was really
> only intended for *, and this is the problem. Thus we probably should
> change this line to:
>
> if [ "$(shopt -s nullglob ; echo "$QUILT_PC/$patch"/*)" = "" ]
>
> i.e. protect the variables with double quotes. I'm not exactly sure it's
> syntaxically correct, as we are already inside double quotes, and my
> editor won't colorize it properly. However it seems to work just fine
> for me. Comments?
The fix is correct; unfortunately it doesn't really help much though: patch
names are not fully quoted almost everywhere, so to make this work properly,
the entire code would need to be thoroughly reviewed, fixed, and re-tested.
That's probably one full day of work or more.
Cheers,
--
Andreas Gruenbacher <address@hidden>
SUSE Labs, SUSE LINUX PRODUCTS GMBH