Re: [pacman-dev] [PATCH 1/3] paccache: allow strictly integer for -k option

2011-09-29 Thread Dave Reisner
On Thu, Sep 29, 2011 at 10:58:14AM +0800, lolilolicon wrote: > On Thu, Sep 29, 2011 at 10:45 AM, lolilolicon wrote: > > Verify the argument to -k is a non-negative integer.  Leading zeros > > are simply tripped. > > > > Oops, sorry s/tripped/stripped/ there. > Dave, will you correct this typo for

[pacman-dev] [PATCH] Remove redundant "removal" output in pure remove operation

2011-09-29 Thread Allan McRae
Printing "[removal]" beside all package names is redundant when all packages are being removed (i.e. when using -R). Signed-off-by: Allan McRae --- src/pacman/util.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index 748c0e9..34

[pacman-dev] [PATCH] Remove redundant transaction size output

2011-09-29 Thread Allan McRae
Printing all of "Installed", "Removed" and "Net Upgrade" sizes is redundant as the difference of the first two is the last. Instead, only print "Net Upgrade Size" when both the installed and removed are non-zero. This results in the following output in the following cases: - package installation

Re: [pacman-dev] [PATCH] Remove redundant transaction size output

2011-09-29 Thread Allan McRae
On 29/09/11 21:18, Allan McRae wrote: Printing all of "Installed", "Removed" and "Net Upgrade" sizes is redundant as the difference of the first two is the last. Instead, only print "Net Upgrade Size" when both the installed and removed are non-zero. This results in the following output in the f

[pacman-dev] [PATCH 1/6] bacman: get local package db path the correct way

2011-09-29 Thread lolilolicon
Use globbing and store the expansion results in an array. The [epoch:]pkgver part can start without an integer, e.g. lshw is currently at version B.02.15. extglob is just good enough to match pkgname-[epoch:]pkgver-pkgrel. Set nullglob globally. Signed-off-by: lolilolicon --- contrib/bacman.in |

[pacman-dev] [PATCH 2/6] Don't do eval

2011-09-29 Thread lolilolicon
Simply `eval'ing configurations from pacman.conf is really bad practice. Use proper string parsing instead. The parser implemented here aborts as soon as it gets the first assignment, being consistent with pacman. Signed-off-by: lolilolicon --- contrib/bacman.in | 14 +++

[pacman-dev] [PATCH 3/6] bacman: fix missing quotes

2011-09-29 Thread lolilolicon
Signed-off-by: lolilolicon --- contrib/bacman.in | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/bacman.in b/contrib/bacman.in index 0069d1e..d43bf78 100755 --- a/contrib/bacman.in +++ b/contrib/bacman.in @@ -58,7 +58,7 @@ if [ $EUID -gt 0 ]; then i

[pacman-dev] [PATCH 4/6] bacman: use globbing in place of regex

2011-09-29 Thread lolilolicon
The original regex is also not accurate (should be ^[A-Z]+$). Signed-off-by: lolilolicon --- contrib/bacman.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/bacman.in b/contrib/bacman.in index d43bf78..c69ab6f 100755 --- a/contrib/bacman.in +++ b/contrib/bac

[pacman-dev] [PATCH 5/6] bacman: use block redirection

2011-09-29 Thread lolilolicon
Doing so is certainly better, but we really should consider reusing write_pkginfo() from makepkg. Splitting common functions from makepkg into a library would be nice. Signed-off-by: lolilolicon --- contrib/bacman.in | 34 +- 1 files changed, 17 insertions(+),

[pacman-dev] [PATCH 6/6] bacman: code and indentation cleanup

2011-09-29 Thread lolilolicon
$EXT is never used, don't set it. The redundant code came from makepkg, which could probably use this fix too. Also fixed is the vim mode line. bacman uses four space indentation, which is against the project guidelines, but consistency in the same file is more important, IMHO. Signed-off-by: lo

Re: [pacman-dev] [PATCH 2/6] Don't do eval

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 1:14 AM, lolilolicon wrote: > +# parse value of simple, non-repeating variable assignment > +conf_var_val() { > +       local var=${1//\//\\/} > +       awk ' > +       /^[ \t]*'"${var}"'[ \t]*=/ { > +               sub(/[^=]+=[ \t]*/, "") > +               sub(/[ \t]*$/, "

[pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread lolilolicon
Introduce ext_to_tar_opt() to unify package and source package tarball creation. This requires bsdtar to support the compression options -z, -j, -J and -Z. Note also the 'compress' command is not available in Arch (FS#25908), so 'bsdtar -Z' seems to be the only way to support .tar.Z archive creat

Re: [pacman-dev] [PATCH 2/6] Don't do eval

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:02AM +0800, lolilolicon wrote: > Simply `eval'ing configurations from pacman.conf is really bad practice. > Use proper string parsing instead. The parser implemented here aborts > as soon as it gets the first assignment, being consistent with pacman. I'm not really a

Re: [pacman-dev] [PATCH 3/6] bacman: fix missing quotes

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:03AM +0800, lolilolicon wrote: > > Signed-off-by: lolilolicon > --- > contrib/bacman.in | 10 +- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/contrib/bacman.in b/contrib/bacman.in > index 0069d1e..d43bf78 100755 > --- a/contrib/bacm

Re: [pacman-dev] [PATCH 3/6] bacman: fix missing quotes

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 1:27 AM, Dave Reisner wrote: > On Fri, Sep 30, 2011 at 01:14:03AM +0800, lolilolicon wrote: >> >> Signed-off-by: lolilolicon >> --- >>  contrib/bacman.in |   10 +- >>  1 files changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/contrib/bacman.in b/contrib/b

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:23:37AM +0800, lolilolicon wrote: > Introduce ext_to_tar_opt() to unify package and source package tarball > creation. This requires bsdtar to support the compression options -z, > -j, -J and -Z. Note also the 'compress' command is not available in > Arch (FS#25908), so

Re: [pacman-dev] [PATCH 4/6] bacman: use globbing in place of regex

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:04AM +0800, lolilolicon wrote: > The original regex is also not accurate (should be ^[A-Z]+$). > > Signed-off-by: lolilolicon > --- > contrib/bacman.in |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/contrib/bacman.in b/contrib/bacm

Re: [pacman-dev] [PATCH 5/6] bacman: use block redirection

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:05AM +0800, lolilolicon wrote: > Doing so is certainly better, but we really should consider reusing > write_pkginfo() from makepkg. Splitting common functions from makepkg > into a library would be nice. So let's do that instead. There's similar work in repo-add. On

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 12:23 PM, lolilolicon wrote: > Introduce ext_to_tar_opt() to unify package and source package tarball > creation.  This requires bsdtar to support the compression options -z, > -j, -J and -Z.  Note also the 'compress' command is not available in > Arch (FS#25908), so 'bsdta

[pacman-dev] [PATCH] move prevprogress onto payload handle

2011-09-29 Thread Dave Reisner
This is a poor place for it, and it will likely move again in the future, but it's better to have it here than as a static variable. Initialization of this variable is now no longer necessary as its zeroed on creation of the payload struct. Signed-off-by: Dave Reisner --- lib/libalpm/dload.c |

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 1:40 AM, Dave Reisner wrote: > On Fri, Sep 30, 2011 at 01:23:37AM +0800, lolilolicon wrote: >> Introduce ext_to_tar_opt() to unify package and source package tarball >> creation.  This requires bsdtar to support the compression options -z, >> -j, -J and -Z.  Note also the '

Re: [pacman-dev] [PATCH 6/6] bacman: code and indentation cleanup

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 12:14 PM, lolilolicon wrote: > Also fixed is the vim mode line.  bacman uses four space indentation, which > is against the project guidelines, but consistency in the same file is more > important, IMHO. I don't want to bikeshed this, but we should really fix the script, g

Re: [pacman-dev] [PATCH 2/6] Don't do eval

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 12:24 PM, Dave Reisner wrote: > On Fri, Sep 30, 2011 at 01:14:02AM +0800, lolilolicon wrote: >> Simply `eval'ing configurations from pacman.conf is really bad practice. >> Use proper string parsing instead.  The parser implemented here aborts >> as soon as it gets the first

Re: [pacman-dev] [PATCH 3/6] bacman: fix missing quotes

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 12:37 PM, lolilolicon wrote: > On Fri, Sep 30, 2011 at 1:27 AM, Dave Reisner wrote: >> On Fri, Sep 30, 2011 at 01:14:03AM +0800, lolilolicon wrote: >>> >>> Signed-off-by: lolilolicon >>> --- >>>  contrib/bacman.in |   10 +- >>>  1 files changed, 5 insertions(+), 5

Re: [pacman-dev] [PATCH 4/6] bacman: use globbing in place of regex

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 12:46 PM, Dave Reisner wrote: > On Fri, Sep 30, 2011 at 01:14:04AM +0800, lolilolicon wrote: >> The original regex is also not accurate (should be ^[A-Z]+$). >> >> Signed-off-by: lolilolicon >> --- >>  contrib/bacman.in |    4 ++-- >>  1 files changed, 2 insertions(+), 2 d

Re: [pacman-dev] [PATCH] Remove redundant transaction size output

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 6:18 AM, Allan McRae wrote: > Printing all of "Installed", "Removed" and "Net Upgrade" sizes is > redundant as the difference of the first two is the last. Instead, > only print "Net Upgrade Size" when both the installed and removed > are non-zero. > > This results in the f

[pacman-dev] [GIT] The official pacman repository branch, master, updated. v4.0.0rc2-42-g83c05e7

2011-09-29 Thread Dan McGee
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The official pacman repository". The branch, master has been updated via 83c05e71bc6e614f6f3d190d5e752a0c5239a2d1 (commit) vi

Re: [pacman-dev] Pacman 4.0.0rc2

2011-09-29 Thread Denis A . Altoé Falqueto
On Thu, Sep 22, 2011 at 2:27 PM, Dan McGee wrote: > Please report any issues you may find with this package, as it is > getting very close to being an actual releasable version. These are > debug builds with symbols, so getting stack traces and helpful logging > should be relatively straight forwa

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 1:52 AM, Dan McGee wrote: > > Until you teach bsdtar to not store a new gzip timestamp each time it > creates a package (and thus makes packaging actually produce the same > package every time), this patch totally breaks lessons we learned 2 > and a half years ago. > > -Dan

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 1:37 PM, lolilolicon wrote: > On Fri, Sep 30, 2011 at 1:52 AM, Dan McGee wrote: >> >> Until you teach bsdtar to not store a new gzip timestamp each time it >> creates a package (and thus makes packaging actually produce the same >> package every time), this patch totally b

Re: [pacman-dev] Pacman 4.0.0rc2

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 1:37 PM, Denis A. Altoé Falqueto wrote: > On Thu, Sep 22, 2011 at 2:27 PM, Dan McGee wrote: >> Please report any issues you may find with this package, as it is >> getting very close to being an actual releasable version. These are >> debug builds with symbols, so getting

Re: [pacman-dev] [PATCH] Remove redundant transaction size output

2011-09-29 Thread Allan McRae
On 30/09/11 04:25, Dan McGee wrote: On Thu, Sep 29, 2011 at 6:18 AM, Allan McRae wrote: Printing all of "Installed", "Removed" and "Net Upgrade" sizes is redundant as the difference of the first two is the last. Instead, only print "Net Upgrade Size" when both the installed and removed are non-

Re: [pacman-dev] Pacman 4.0.0rc2

2011-09-29 Thread Denis A . Altoé Falqueto
On Thu, Sep 29, 2011 at 6:39 PM, Dan McGee wrote: > On Thu, Sep 29, 2011 at 1:37 PM, Denis A. Altoé Falqueto > wrote: >> On Thu, Sep 22, 2011 at 2:27 PM, Dan McGee wrote: >>> Please report any issues you may find with this package, as it is >>> getting very close to being an actual releasable ve

Re: [pacman-dev] Pacman 4.0.0rc2

2011-09-29 Thread Dan McGee
On Thu, Sep 29, 2011 at 9:23 PM, Denis A. Altoé Falqueto wrote: > On Thu, Sep 29, 2011 at 6:39 PM, Dan McGee wrote: >> On Thu, Sep 29, 2011 at 1:37 PM, Denis A. Altoé Falqueto >> wrote: >>> On Thu, Sep 22, 2011 at 2:27 PM, Dan McGee wrote: Please report any issues you may find with this pa

Re: [pacman-dev] Pacman 4.0.0rc2

2011-09-29 Thread Denis A . Altoé Falqueto
On Thu, Sep 29, 2011 at 11:34 PM, Dan McGee wrote: > I added this operation as a helpful shortcut; I'd like it to stay > helpful (to me at least) by not wasting my time, and also being > generally useful in a script where I can't have interactivity. > > If the user wants to slow down, use --edit-k

[pacman-dev] [PATCH] pacman-key: return 0 from get_from if default value used

2011-09-29 Thread Allan McRae
This prevents the error trap being set off when GPGDir is commented in pacman.conf. Bug introduced in 507b01b9. Signed-off-by: Allan McRae --- scripts/pacman-key.sh.in |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.i

[pacman-dev] [PATCH] makepkg: create tar file for bogus PKGEXT

2011-09-29 Thread lolilolicon
If PKGEXT is not one of the recognized tar*'s, create_package() would create an empty package file and fail, since bsdtar on the left side of the pipe returns 141 on SIGPIPE (broken pipe). This patch changes the behavior for an invalid PKGEXT. A warning is printed on stderr, and a tar file is crea

[pacman-dev] [PATCH] makepkg: support .tar.Z source packages creation

2011-09-29 Thread lolilolicon
Also address an uninitialized use of $ret. --- scripts/makepkg.sh.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d426661..8f76656 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1332,6 +1332,7

Re: [pacman-dev] [PATCH] makepkg: support .tar.Z source packages creation

2011-09-29 Thread Allan McRae
On 30/09/11 15:30, lolilolicon wrote: Also address an uninitialized use of $ret. --- scripts/makepkg.sh.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d426661..8f76656 100644 --- a/scripts/makepkg.sh.in +++ b

Re: [pacman-dev] [PATCH] makepkg: create tar file for bogus PKGEXT

2011-09-29 Thread Allan McRae
On 30/09/11 15:23, lolilolicon wrote: If PKGEXT is not one of the recognized tar*'s, create_package() would create an empty package file and fail, since bsdtar on the left side of the pipe returns 141 on SIGPIPE (broken pipe). This patch changes the behavior for an invalid PKGEXT. A warning is p

Re: [pacman-dev] [PATCH] makepkg: create tar file for bogus PKGEXT

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 2:20 PM, Allan McRae wrote: > On 30/09/11 15:23, lolilolicon wrote: >>        bsdtar -cf - $comp_files * | >>        case "$PKGEXT" in >> -           *tar.gz)  gzip -c -f -n ;; >> -           *tar.bz2) bzip2 -c -f ;; >> -           *tar.xz)  xz -c -z - ;; >> -           *ta

Re: [pacman-dev] [PATCH] makepkg: support .tar.Z source packages creation

2011-09-29 Thread lolilolicon
On Fri, Sep 30, 2011 at 2:18 PM, Allan McRae wrote: > On 30/09/11 15:30, lolilolicon wrote: >> >> Also address an uninitialized use of $ret. >> --- >>  scripts/makepkg.sh.in |    6 +- >>  1 files changed, 5 insertions(+), 1 deletions(-) >> >> diff --git a/scripts/makepkg.sh.in b/scripts/makepk