[pacman-dev] [PATCH 0/3] repo-add desc/depends creation cleanup

Allan McRae allan at archlinux.org
Wed Jun 22 04:05:06 EDT 2011


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


More information about the pacman-dev mailing list