[pacman-dev] [RFC] _RESERVED_IDS & enum assignments, take 2

2016-09-03 Thread ivy . foster
I've had another go at the patches from yesterday. The first patch, which eliminates use of #define _RESERVED_IDENTIFIERS, has one problem keeping me from adding -Wreserved-id-macro to configure.ac: the autoconf-generated file config.h.in contains one, _DARWIN_USE_64_BIT_INODE. I'm honestly not su

[pacman-dev] [PATCH v2 1/2] Do not #define _RESERVED_IDENTIFIERS

2016-09-03 Thread ivy . foster
From: Ivy Foster Signed-off-by: Ivy Foster --- lib/libalpm/add.h | 6 +++--- lib/libalpm/alpm.h | 6 +++--- lib/libalpm/alpm_list.h | 6 +++--- lib/libalpm/backup.h| 6 +++--- lib/libalpm/base64.h| 4 ++-- lib/libalpm/conflict.h

[pacman-dev] [PATCH v2 2/2] Make pacman build cleanly with clang's -Wassign-enum

2016-09-03 Thread ivy . foster
From: Ivy Foster In many cases, it was enough to add error or "none" values to enums, to account for cases where functions returned either an enumerated value or 0/-1. A common code pattern in pacman is to use enums to create bitfields representing various option combinations. Since they are not

[pacman-dev] [PATCH v7 12/12] bacman man page: describe the jobs option

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/doc/bacman.8.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/doc/bacman.8.txt b/contrib/doc/bacman.8.txt index a9d7ba9..4738189 100644 --- a/contrib/doc/bacman.8.txt +++ b/contrib/doc/bacman.8.txt @@ -35,6 +35

[pacman-dev] [PATCH v7 10/12] bacman: add option to specify the number of jobs

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index b92b4e4..7ae9058 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bacman.sh.in @@ -57,1

[pacman-dev] [PATCH v7 09/12] bacman: add otpion to alter the output directory

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index 94b09d7..b92b4e4 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bacman.sh.in @@ -57,10 +57,12 @@ usage(

[pacman-dev] [PATCH v7 11/12] bacman: add manual page

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/doc/.gitignore | 1 + contrib/doc/Makefile.am | 5 +++- contrib/doc/bacman.8.txt | 66 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 contrib/doc/bacman.8.txt diff --git a/con

[pacman-dev] [PATCH v7 08/12] bacman: add option to print fewer status updates

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- Move indentation fixes into its own commit. contrib/bacman.sh.in | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index 6f943a1..94b09d7 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bac

[pacman-dev] [PATCH v7 05/12] bacman: rewrite usage function

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- Move indentation fixes into its own commit. contrib/bacman.sh.in | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index 639a538..c853958 100644 --- a/contrib/bacman.sh.in +++ b/c

[pacman-dev] [PATCH v7 06/12] bacman: code structuring

2016-09-03 Thread Gordian Edenhofer
Adding and clarifying comments. Adding and removing some new lines. Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index c853958..d0309b6 100644 -

[pacman-dev] [PATCH v7 07/12] bacman: quote pkg_pkger variable

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index d0309b6..6f943a1 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bacman.sh.in @@ -146,7 +146,7 @@ if [[ -r ~/.makepkg.con

[pacman-dev] [PATCH v7 03/12] bacman: parallel packaging

2016-09-03 Thread Gordian Edenhofer
Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index e7a7f57..0c71541 100644 --- a/contrib/bacman.sh.in +++ b/contrib/bacman.sh.in @@ -354,8 +354,29 @

[pacman-dev] [PATCH v7 02/12] bacman: handle SIGHUP, SIGINT, SIGTERM signals

2016-09-03 Thread Gordian Edenhofer
Trap SIGHUP, SIGINT, SIGTERM and remove working directories accordingly. Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 10 ++ 1 file changed, 10 insertions(+) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in index 5e6fce5..e7a7f57 100644 --- a/contrib/bacman.sh.in

[pacman-dev] [PATCH v7 01/12] bacman: allow for multiple packages as arguments

2016-09-03 Thread Gordian Edenhofer
To enable the creation of multiple packages with one command move the assembly process into its own function. Signed-off-by: Gordian Edenhofer --- Split up first commit into three distinct parts: Moving stuff into function, handle abort signals, write and alter some comments. Merge the altered co

[pacman-dev] [PATCH v7 04/12] bacman: proper option handling

2016-09-03 Thread Gordian Edenhofer
Switch to parseopts instead of merely checking the first argument. Signed-off-by: Gordian Edenhofer --- contrib/bacman.sh.in | 62 +++- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in inde

Re: [pacman-dev] Downloader options - Was: Add configuration options for libcurl's "low speed" timeout

2016-09-03 Thread Olivier Brunel
On Sat, 3 Sep 2016 09:40:52 -0400 Dave Reisner wrote: > On Sat, Sep 03, 2016 at 10:45:42PM +1000, Allan McRae wrote: > > On 30/08/16 22:48, Christian Hesse wrote: > > > Dave Reisner on Tue, 2016/08/30 08:46: > > >> On Tue, Aug 30, 2016 at 02:12:23PM +0200, Christian Hesse > > >> wrote: > >

Re: [pacman-dev] Downloader options - Was: Add configuration options for libcurl's "low speed" timeout

2016-09-03 Thread Dave Reisner
On Sat, Sep 03, 2016 at 10:45:42PM +1000, Allan McRae wrote: > On 30/08/16 22:48, Christian Hesse wrote: > > Dave Reisner on Tue, 2016/08/30 08:46: > >> On Tue, Aug 30, 2016 at 02:12:23PM +0200, Christian Hesse wrote: > >>> From: Christian Hesse > >>> > >>> Add LowSpeedLimit and LowSpeedTime conf

[pacman-dev] Downloader options - Was: Add configuration options for libcurl's "low speed" timeout

2016-09-03 Thread Allan McRae
On 30/08/16 22:48, Christian Hesse wrote: > Dave Reisner on Tue, 2016/08/30 08:46: >> On Tue, Aug 30, 2016 at 02:12:23PM +0200, Christian Hesse wrote: >>> From: Christian Hesse >>> >>> Add LowSpeedLimit and LowSpeedTime configuration options to correspond >>> to libcurl's CURLOPT_LOW_SPEED_LIMIT

Re: [pacman-dev] [PATCH v6 2/9] bacman: parallel packaging

2016-09-03 Thread Allan McRae
On 03/09/16 00:50, Gordian Edenhofer wrote: > Signed-off-by: Gordian Edenhofer > --- To be completely explicit, I am not going to accept parallel packaging patches (2, 7, and 9 in patchset v6). There are many other tools available to handle running scripts in parallel, and the boilerplate overhe

Re: [pacman-dev] [PATCH v6 4/9] bacman: rewrite usage page and version information

2016-09-03 Thread Allan McRae
On 03/09/16 00:50, Gordian Edenhofer wrote: > Signed-off-by: Gordian Edenhofer > --- > contrib/bacman.sh.in | 24 > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in > index 8656c5c..f5807b5 100644 > --- a/contr

Re: [pacman-dev] [PATCH v6 5/9] bacman: add option to print fewer status updates

2016-09-03 Thread Allan McRae
On 03/09/16 00:50, Gordian Edenhofer wrote: > Signed-off-by: Gordian Edenhofer > --- > contrib/bacman.sh.in | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in > index f5807b5..a567e7d 100644 > --- a/contrib/bacman.sh.in >

Re: [pacman-dev] [PATCH] bash-completion: fix leaking "files" array into shell environment

2016-09-03 Thread Allan McRae
On 02/09/16 13:40, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- Thanks, Allan

Re: [pacman-dev] [PATCH v5 4/8] bacman: rewrite usage page and version information

2016-09-03 Thread Allan McRae
On 03/09/16 01:07, Gordian Edenhofer wrote: > On Fri, 2016-09-02 at 23:37 +1000, Allan McRae wrote: >> On 02/09/16 22:51, Gordian Edenhofer wrote: >>> >>> echo 'Copyright (C) 2008 locci >>> ' >>> + echo 'Copyright (C) 2016 Gordian Edenhofer >> f...@gmail.com>' >>> echo 'Copyright (C) 2008

Re: [pacman-dev] [RFC, PATCHES]: Very preliminary work towards clean build with clang -Weverything

2016-09-03 Thread Allan McRae
On 03/09/16 12:08, ivy.fos...@gmail.com wrote: > First of all, don't worry; I'm under no illusion that the > pie-in-the-sky Subject line is anything that will happen in the near > future, nor even necessarily a goal for the project (given just how > finicky -Weverything is). > > Basically, I'm won

[pacman-dev] [PATCH] Fix memory leak in remove_notify_needed_optdepends

2016-09-03 Thread Allan McRae
Also add pactest which captures this leak when run under valgrind. Reported-by: Sergey Petrenko Signed-off-by: Allan McRae --- lib/libalpm/remove.c | 1 + test/pacman/tests/TESTS | 1 + .../pacman/tests/remove-optdepend-of-

Re: [pacman-dev] Memleak

2016-09-03 Thread Allan McRae
On 03/09/16 19:26, Sergey Petrenko via pacman-dev wrote: > libalpm/remove.c: > > in remove_notify_needed_optdepends(): > > char *optstring = alpm_dep_compute_string(optdep); > > isn't freed after being used. > > Ought to thank Valgrind for this one. > Thanks. We did not cover this

[pacman-dev] Memleak

2016-09-03 Thread Sergey Petrenko via pacman-dev
libalpm/remove.c:   in remove_notify_needed_optdepends():   char *optstring = alpm_dep_compute_string(optdep); isn't freed after being used. Ought to thank Valgrind for this one. -- With wish of constant improvement and unstoppable creativity. Sergey Petrenko

Re: [pacman-dev] [RFC, PATCHES]: Very preliminary work towards clean build with clang -Weverything

2016-09-03 Thread Martin Kühne
All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use. All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. (ISO 9899:1999, 7.1.