Re: [pacman-dev] [PATCH] makepkg: fix --verifysource (FS#35057)

2013-05-01 Thread Jan Alexander Steffens
On Thu, May 2, 2013 at 5:56 AM, Allan McRae wrote: > On 02/05/13 13:44, William Giokas wrote: >> -if (( ! PKGVERFUNC )); then >> +if (( ! PKGVERFUNC && ! VERIFYSOURCE )); then >> check_build_status >> fi > > Fine. I think this should probably be done in the check_build_status function just

Re: [pacman-dev] [PATCH] makepkg: fix --verifysource (FS#35057)

2013-05-01 Thread Jan Alexander Steffens
On Thu, May 2, 2013 at 7:29 AM, William Giokas <1007...@gmail.com> wrote: > This is another issue. When --verifysource is run, download_sources > should take the `fast` option to skip vcs sources. I'll work on that > now, actually. Egads. If you do that, please give me a way to ensure all sources

Re: [pacman-dev] Improving locking - Was: [PATCH] Use file locks (flock) to stop multiple pacman instances from running concurrently. This improves the current model by automatically removing locks he

2013-08-18 Thread Jan Alexander Steffens
On Mon, Aug 19, 2013 at 5:39 AM, Allan McRae wrote: > I stored the process ID in the lock file during creation many years ago. > Is there a portable way for us to determine if that process ID is still > running and remove the lock file automatically if it is not? Try to kill the PID with signal

Re: [pacman-dev] Improving locking - Was: [PATCH] Use file locks (flock) to stop multiple pacman instances from running concurrently. This improves the current model by automatically removing locks he

2013-08-19 Thread Jan Alexander Steffens
On Mon, Aug 19, 2013 at 10:58 AM, Martin Panter wrote: > On 19 August 2013 08:48, Martin Panter wrote: >> Pardon me if I don’t know enough details of Pacman’s locking, but this >> sounds like a race condition, defeating the purpose of a lock. Even on >> a single machine, what happens if two insta

Re: [pacman-dev] Improving locking - Was: [PATCH] Use file locks (flock) to stop multiple pacman instances from running concurrently. This improves the current model by automatically removing locks he

2013-08-19 Thread Jan Alexander Steffens
On Mon, Aug 19, 2013 at 11:38 AM, Jan Alexander Steffens wrote: > How about this? > > * Open lock file with O_RDWR | O_APPEND | O_CREAT and read. > -> If file is empty, we can run. > -> If file contains a non-existing PID and the current hostname on its > last line, we ca

Re: [pacman-dev] [PATCH] pkgdelta: use highest compression ratio when creating deltas with xdelta3

2014-03-05 Thread Jan Alexander Steffens
On Thu, Mar 6, 2014 at 1:35 AM, Allan McRae wrote: > I'm assuming that is because that most of the time/memory is used > applying the diff rather than decompressing it given it is quite small. > > I know memory usage and speed were issues when it was considered adding > -9 to package compression.

Re: [pacman-dev] [PATCH] Add AM_MAINTAINER_MODE to configure.ac and disable by default

2015-02-08 Thread Jan Alexander Steffens
On Mon, Feb 9, 2015 at 2:45 AM, Allan McRae wrote: > Are there objections to applying this patch - at least until a proper > solution is found? A few years ago there was a bit of drama in GNOME about projects disabling maintainer mode. Might be worth reading and looking further. http://blogs.gno

Re: [pacman-dev] [PATCH] libmakepkg: Support file 5.33's application/x-pie-executable

2018-04-22 Thread Jan Alexander Steffens
On Sun, Apr 22, 2018, 18:22 Gabriel C wrote: > I don't think that's enough .. since everything , .so , > .a ( possible glibc2.7+gcc8 ) and any binary is > now marked application/x-pie-executable in PIE builds. > > So probably something like this is what you wish : > > > https://github.com/abuco

Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Jan Alexander Steffens
t 9:59 AM Allan McRae wrote: > On 01/06/18 02:24, Jan Alexander Steffens (heftig) wrote: > > $restoretrap is empty if the trap was not set. This caused the trap > > handler to remain and override later exit codes. > > How is this ever unset? We set the error trap early

Re: [pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-06-04 Thread Jan Alexander Steffens
On Mon, Jun 4, 2018 at 1:05 PM Allan McRae wrote: > On 04/06/18 18:47, Jan Alexander Steffens wrote: > > The ERR trap is not inherited by functions unless the "errtrace" option > > is set. So in the current situation, makepkg's internal functions are > > suppo

Re: [pacman-dev] [PATCH] repo-remove: Fix infinite loop when given a pkgname ending in '*'

2019-04-26 Thread Jan Alexander Steffens
On Fri, Apr 26, 2019 at 10:04 PM Rafael Ascensão wrote: > This happens because find_pkgentry() fails to account the case where > globbing fails and the expression is taken literally. Maybe we should use failglob instead to provoke an error?

Re: [pacman-dev] [PATCH] pacman: new config to highlight testing packages

2019-09-10 Thread Jan Alexander Steffens
On Tue, Sep 10, 2019, 12:17 Morten Linderud wrote: > If you turn it around and add a list instead? > > HilightRepositories = testing community-testing > You could give each [repo] a Color= setting. >

[pacman-dev] [PATCH] Allow cleaning only some cachedirs

2012-06-15 Thread Jan Alexander Steffens (heftig)
From: "Jan Alexander Steffens (heftig)" When cleaning the cache, ask for each cachedir separately. Signed-off-by: Jan Alexander Steffens (heftig) --- src/pacman/sync.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/pacma

[pacman-dev] [PATCH 2/3] makepkg: Correctly layer distcc and ccache

2015-09-15 Thread Jan Alexander Steffens (heftig)
ccache expects further compiler wrappers to be specified via CCACHE_PREFIX. Otherwise, ccache will hash the wrapper executable instead of the real one. Signed-off-by: Jan Alexander Steffens (heftig) --- scripts/makepkg.sh.in | 21 ++--- 1 file changed, 14 insertions(+), 7

[pacman-dev] [PATCH 3/3] makepkg: Set CCACHE_BASEDIR to make paths in $srcdir relative

2015-09-15 Thread Jan Alexander Steffens (heftig)
--- scripts/makepkg.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 076d315..7c3cc4b 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -868,6 +868,7 @@ run_build() { if check_buildoption "distcc" "y"; then

[pacman-dev] [PATCH 1/3] libmakepkg: Add check_buildoption for distcc and ccache

2015-09-15 Thread Jan Alexander Steffens (heftig)
This reduces code duplication a bit. It also highlights how these options are checked. Signed-off-by: Jan Alexander Steffens (heftig) --- scripts/libmakepkg/util/option.sh | 22 ++ scripts/makepkg.sh.in | 8 2 files changed, 26 insertions(+), 4

[pacman-dev] [PATCH] libmakepkg: Add check_buildoption for distcc and ccache

2015-09-19 Thread Jan Alexander Steffens (heftig)
This reduces code duplication a bit. It also highlights how these options are checked. v2: makepkg used to check OPTIONS too, which could override BUILDENV. Fix the implementation to avoid this. Signed-off-by: Jan Alexander Steffens (heftig) --- scripts/libmakepkg/util/option.sh | 30

[pacman-dev] [PATCH] libmakepkg: Add check_buildoption for distcc and ccache

2015-10-18 Thread Jan Alexander Steffens (heftig)
makepkg used to check OPTIONS too, which could override BUILDENV. Implement a new function that handles these options more like OPTIONS. This also reduces code duplication a bit. Signed-off-by: Jan Alexander Steffens (heftig) --- scripts/libmakepkg/util/option.sh | 34

[pacman-dev] [PATCH] libmakepkg: Support file 5.33's application/x-pie-executable

2018-04-20 Thread Jan Alexander Steffens (heftig)
rip-unneeded to keep relocation information should be the correct thing to do. file 5.33 also misidentifies actual libraries as PIE executables, so we didn't strip any shared libraries, either. We now work around this bug. Signed-off-by: Jan Alexander Steffens (heftig) --- scripts/libmakepkg/t

[pacman-dev] [PATCH 01/10] libmakepkg/util/option: Refactor checking to reduce code duplication

2018-05-31 Thread Jan Alexander Steffens (heftig)
Pull out the expected=y/n check into a separate function and make use of the fact we can just concatenate the fallback arrays to get the same result. --- scripts/libmakepkg/util/option.sh.in | 85 +--- 1 file changed, 28 insertions(+), 57 deletions(-) diff --git a/scripts/

[pacman-dev] [PATCH 04/10] makepkg: Pull out single-package packaging

2018-05-31 Thread Jan Alexander Steffens (heftig)
Put this into a new function close to run_split_packaging so similar code is nearby. --- scripts/makepkg.sh.in | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4684e444..f8f43540 100644 --- a/scripts/mak

[pacman-dev] [PATCH 07/10] makepkg: Make pkgdir a local

2018-05-31 Thread Jan Alexander Steffens (heftig)
Causes it to be reset (to $pkgdirbase/$pkgbase) between subpackages. This shouldn't be visible. --- scripts/makepkg.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 84ae08db..27f627ac 100644 --- a/scripts/makepkg.sh

[pacman-dev] [PATCH 06/10] makepkg: Only backup package variables once

2018-05-31 Thread Jan Alexander Steffens (heftig)
We don't need to re-backup the variables we restored on the previous iteration. --- scripts/makepkg.sh.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 86af4675..84ae08db 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/ma

[pacman-dev] [PATCH 03/10] makepkg: Simplify run_package

2018-05-31 Thread Jan Alexander Steffens (heftig)
--- scripts/makepkg.sh.in | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 748481e4..4684e444 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -495,14 +495,7 @@ run_check() { } run_package() { -

[pacman-dev] [PATCH 05/10] makepkg: Refactor split packaging to reduce code duplication

2018-05-31 Thread Jan Alexander Steffens (heftig)
--- scripts/makepkg.sh.in | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f8f43540..86af4675 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1124,30 +1124,23 @@ backup_package_variables() {

[pacman-dev] [PATCH 02/10] makepkg: Simplify SPLITPKG check

2018-05-31 Thread Jan Alexander Steffens (heftig)
This causes package_$pkgname() to be preferred over package() in the non-split case, but the behavior if both functions exist was undocumented anyway. --- scripts/makepkg.sh.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in inde

[pacman-dev] [PATCH 08/10] makepkg: Remove trailing semicolons

2018-05-31 Thread Jan Alexander Steffens (heftig)
--- scripts/makepkg.sh.in | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 27f627ac..ed0ceaec 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -499,23 +499,23 @@ run_package() { } find_libd

[pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

2018-05-31 Thread Jan Alexander Steffens (heftig)
$restoretrap is empty if the trap was not set. This caused the trap handler to remain and override later exit codes. --- scripts/makepkg.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ed0ceaec..3a3f4c30 100644 --- a/scripts/makepkg.sh.

[pacman-dev] [PATCH 10/10] makepkg: Don't use parameterless return

2018-05-31 Thread Jan Alexander Steffens (heftig)
It's especially dangerous in trap handlers since the return value of the function becomes the return value of the last command before the trap, not the last command in the current function. This applies to any function executed in a trap handler, nested functions included. In one case, install_pac

[pacman-dev] [PATCH 4/6] makepkg: Only backup package variables once

2018-06-19 Thread Jan Alexander Steffens (heftig)
We don't need to re-backup the variables we restored on the previous iteration. --- scripts/makepkg.sh.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 331249ea..bf228202 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/ma

[pacman-dev] [PATCH 5/6] makepkg: Create a single-package packaging function

2018-06-19 Thread Jan Alexander Steffens (heftig)
Merge the similar code handling unsplit PKGBUILDs and individual packages in a split PKGBUILD and make it a new function. --- scripts/makepkg.sh.in | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in in

[pacman-dev] [PATCH 6/6] makepkg: Make pkgdir a local

2018-06-19 Thread Jan Alexander Steffens (heftig)
Causes it to be reset (to $pkgdirbase/$pkgbase) between subpackages. This shouldn't be visible. --- scripts/makepkg.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 70a83a40..ceca55dd 100644 --- a/scripts/makepkg.sh

[pacman-dev] [PATCH 2/6] scripts: Remove trailing semicolons

2018-06-19 Thread Jan Alexander Steffens (heftig)
--- scripts/completion/bash_completion.in | 2 +- scripts/completion/zsh_completion.in | 8 .../libmakepkg/integrity/verify_signature.sh.in| 2 +- scripts/libmakepkg/util/util.sh.in | 2 +- scripts/makepkg.sh.in

[pacman-dev] [PATCH 3/6] makepkg: Simplify run_package

2018-06-19 Thread Jan Alexander Steffens (heftig)
--- scripts/makepkg.sh.in | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 053e6569..331249ea 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -496,14 +496,7 @@ run_check() { } run_package() { -

[pacman-dev] [PATCH 1/6] libmakepkg/util/option: Refactor checking to reduce code duplication

2018-06-19 Thread Jan Alexander Steffens (heftig)
Pull out the expected=y/n check into a separate function and make use of the fact we can just prepend the fallback arrays to get the same result. --- scripts/libmakepkg/util/option.sh.in | 85 +--- 1 file changed, 28 insertions(+), 57 deletions(-) diff --git a/scripts/libm