FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 04-02-2011, 10:31 AM
Rémy Oudompheng
 
Default makepkg: fix a GNU-ism in awk usage

A non-GNU version of awk may not support the (|...) syntax for
an optional group and require '()' to match an empty string.
The (...)? syntax is more appropriate for this usage.

Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
---
Problem arises when trying to use makepkg with FreeBSD's awk.

scripts/makepkg.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 193a185..6d78887 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1275,7 +1275,7 @@ check_sanity() {
done

local optdepends_list=()
- eval $(awk '/^[[:space:]]*optdepends=(/,/)[[:space:]]*(|#.*)$/' "$BUILDFILE" |
+ eval $(awk '/^[[:space:]]*optdepends=(/,/)[[:space:]]*(#.*)?$/' "$BUILDFILE" |
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//")
for i in "${optdepends_list[@]}"; do
local pkg=${i%%:*}
--
1.7.4.2
 
Old 04-02-2011, 06:13 PM
Dan McGee
 
Default makepkg: fix a GNU-ism in awk usage

On Sat, Apr 2, 2011 at 5:31 AM, Rémy Oudompheng
<remyoudompheng@gmail.com> wrote:
> A non-GNU version of awk may not support the (|...) syntax for
> an optional group and require '()' to match an empty string.
> The (...)? syntax is more appropriate for this usage.
>
> Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
> ---
> Problem arises when trying to use makepkg with FreeBSD's awk.
I'll let Allan take a look at this and sign off, eval and awk scare me
too much.

>
> *scripts/makepkg.sh.in | * *2 +-
> *1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 193a185..6d78887 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1275,7 +1275,7 @@ check_sanity() {
> * * * *done
>
> * * * *local optdepends_list=()
> - * * * eval $(awk '/^[[:space:]]*optdepends=(/,/)[[:space:]]*(|#.*)$/' "$BUILDFILE" |
> + * * * eval $(awk '/^[[:space:]]*optdepends=(/,/)[[:space:]]*(#.*)?$/' "$BUILDFILE" |
> * * * * * * * *sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//")
> * * * *for i in "${optdepends_list[@]}"; do
> * * * * * * * *local pkg=${i%%:*}
> --
> 1.7.4.2
>
>
>
 
Old 04-02-2011, 08:22 PM
Allan McRae
 
Default makepkg: fix a GNU-ism in awk usage

On 03/04/11 04:13, Dan McGee wrote:

On Sat, Apr 2, 2011 at 5:31 AM, Rémy Oudompheng
<remyoudompheng@gmail.com> wrote:

A non-GNU version of awk may not support the (|...) syntax for
an optional group and require '()' to match an empty string.
The (...)? syntax is more appropriate for this usage.

Signed-off-by: Rémy Oudompheng<remy@archlinux.org>
---
Problem arises when trying to use makepkg with FreeBSD's awk.

I'll let Allan take a look at this and sign off, eval and awk scare me
too much.



Signoff.

Allan
 

Thread Tools




All times are GMT. The time now is 08:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org