[pacman-dev] Patch makepkg to use more [[ and (( bash syntax

Dan McGee dpmcgee at gmail.com
Mon Oct 26 22:07:17 EDT 2009


On Mon, Oct 26, 2009 at 1:52 AM, Allan McRae <allan at archlinux.org> wrote:
> Isaac Good wrote:
>>
>> See http://bugs.archlinux.org/task/16623 too
>>
>> >From d71c1f120351c0ab7396f5aabbe9cf0497621782 Mon Sep 17 00:00:00 2001
>> From: Isaac Good <arch at isaac.otherinbox.com>
>> Date: Sun, 25 Oct 2009 19:19:18 -0400
>> Subject: [PATCH] Signed-off-by: Isaac Good <arch at isaac.otherinbox.com>
>>
>> Modified makepkg to use more of [[ ]] and (( )) bash constructs
>>
>
> This part should be a separate patch as it appears unrelated to the main
> patch:
>>
>> Added quotes to variables in a few places that were missing them or
>> had {} instead
>>
>
> I have had a brief look through the patch.   It sure is long...    This bit
> highlights a concern:
>
>> @@ -1900,10 +1898,10 @@ else
>>
>>                msg "$(gettext "Entering fakeroot environment...")"
>>
>> -               if [ -n "$newpkgver" ]; then
>> -                       fakeroot -- $0 --forcever $newpkgver -F $ARGLIST
>> || exit $?
>> +               if [[ -n $newpkgver ]]; then
>> +                       fakeroot -- "$0" --forcever "$newpkgver" -F
>> "${ARGLIST[@]}" || exit $?
>>                else
>> -                       fakeroot -- $0 -F $ARGLIST || exit $?
>> +                       fakeroot -- "$0" -F "${ARGLIST[@]}" || exit $?
>>                fi
>>        fi
>>  fi
>>
>
> Part of that is obviously due to a not fully rebased git repo
> ("${ARGLIST[@]}" changes).   As an aside, $newpkgver can never contain a
> space so quotes are unneeded.
>
> Anyway, given this patch touches all parts of the makepkg code base, this
> problem is only going to get worse as applying any other patch will probably
> require adjusting this patch.
> How about we put a freeze on makepkg patches at some point in the near
> future in order to get this finalized and committed?  Given most/all patches
> for makepkg waiting to be pushed are mine, I would not be too put out if
> this freeze was called now, but if Dan was going to pull them soon we could
> wait and save me some work.  :P    When that happens, I will go through the
> (updated) patch line-by-line and check everything is OK.

I can hold off on doing anything to makepkg for the time being. I
wouldn't mind this going in as a patch series either if that makes it
easier (e.g. fix up a few functions at a time).

However, and I should get back to some discussion on these, I'm still
not fond of the following patches:
* makepkg: allow skipping intergrity checks when making source package
* makepkg: rework --skip-integ

But just a warning in case they clash with the patch from this thread.

-Dan


More information about the pacman-dev mailing list