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 06-20-2011, 07:46 PM
Dave Reisner
 
Default repo-add desc/depends creation cleanup

This is basically what I referred to in my last patch about refactoring
desc/depends writing. I snuck in an extra winner (the first) to get rid
of the insane IFS tweaking and iteration of the .PKGINFO file with a for
loop.

Dan, I'm not sure if I can break this up any further, but I'm happy to refactor
if it would make you more comfortable. I know it's an insanely important code
path so I encourage you (and anyone else reading) to put on your nerd glasses
and nitpick this.

Dave Reisner (3):
repo-add: bashify reading of .PKGINFO file
repo-add: store multi-value fields as arrays
repo-add: use format_entry for all desc/depends fields

scripts/repo-add.sh.in | 105 +++++++++++++++++++++++------------------------
1 files changed, 51 insertions(+), 54 deletions(-)

--
1.7.5.4
 
Old 06-22-2011, 08:05 AM
Allan McRae
 
Default repo-add desc/depends creation cleanup

On 21/06/11 05:46, Dave Reisner wrote:

This is basically what I referred to in my last patch about refactoring
desc/depends writing. I snuck in an extra winner (the first) to get rid
of the insane IFS tweaking and iteration of the .PKGINFO file with a for
loop.

Dan, I'm not sure if I can break this up any further, but I'm happy to refactor
if it would make you more comfortable. I know it's an insanely important code
path so I encourage you (and anyone else reading) to put on your nerd glasses
and nitpick this.

Dave Reisner (3):
repo-add: bashify reading of .PKGINFO file
repo-add: store multi-value fields as arrays
repo-add: use format_entry for all desc/depends fields

scripts/repo-add.sh.in | 105 +++++++++++++++++++++++------------------------
1 files changed, 51 insertions(+), 54 deletions(-)



No ack.

Something here is entirely screwed under bash-3.2. We still have people
using pacman with that version of bash. I think it does not output any
of these fields...


-%CONFLICTS%
-%DEPENDS%
-%GROUPS%
-%LICENSE%
-%OPTDEPENDS%
-%PROVIDES%
-%REPLACES%

That looks like anything in an array...

To test, I created a repo with all packages in Arch starting with "a".
Under bash-4.2, there was only a small difference in the output:


e.g. asymptote-2.11-1

%OPTDEPENDS%
-python2: for the xasy GUI
-python-imaging: for the xasy GUI
-tix: for the xasy GUI
+python2: for the xasy GUI
+python-imaging: for the xasy GUI
+tix: for the xasy GUI

This makes the formatting the same as that used in the PKGBUILD. Not
sure I like that either...


Allan
 
Old 06-22-2011, 01:00 PM
Dave Reisner
 
Default repo-add desc/depends creation cleanup

On Wed, Jun 22, 2011 at 06:05:06PM +1000, Allan McRae wrote:
> On 21/06/11 05:46, Dave Reisner wrote:
> >This is basically what I referred to in my last patch about refactoring
> >desc/depends writing. I snuck in an extra winner (the first) to get rid
> >of the insane IFS tweaking and iteration of the .PKGINFO file with a for
> >loop.
> >
> >Dan, I'm not sure if I can break this up any further, but I'm happy to refactor
> >if it would make you more comfortable. I know it's an insanely important code
> >path so I encourage you (and anyone else reading) to put on your nerd glasses
> >and nitpick this.
> >
> >Dave Reisner (3):
> > repo-add: bashify reading of .PKGINFO file
> > repo-add: store multi-value fields as arrays
> > repo-add: use format_entry for all desc/depends fields
> >
> > scripts/repo-add.sh.in | 105 +++++++++++++++++++++++------------------------
> > 1 files changed, 51 insertions(+), 54 deletions(-)
> >
>
> No ack.
>
> Something here is entirely screwed under bash-3.2. We still have
> people using pacman with that version of bash. I think it does not
> output any of these fields...
>
> -%CONFLICTS%
> -%DEPENDS%
> -%GROUPS%
> -%LICENSE%
> -%OPTDEPENDS%
> -%PROVIDES%
> -%REPLACES%
>
> That looks like anything in an array...

Good catch. I had rebased this at some point and somewhere along the
way, the arrays were no longer declared as arrays. fixed locally.

> To test, I created a repo with all packages in Arch starting with
> "a". Under bash-4.2, there was only a small difference in the
> output:
>
> e.g. asymptote-2.11-1
>
> %OPTDEPENDS%
> -python2: for the xasy GUI
> -python-imaging: for the xasy GUI
> -tix: for the xasy GUI
> +python2: for the xasy GUI
> +python-imaging: for the xasy GUI
> +tix: for the xasy GUI
>
> This makes the formatting the same as that used in the PKGBUILD.
> Not sure I like that either...
>
> Allan
>

I don't like this easier. It looks like I underestimated what the sed
expression did here -- we can normalize whitespace another way though.

Thanks for the test case.

d
 

Thread Tools




All times are GMT. The time now is 05:39 AM.

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