pacman: Update to 5.1.1

This commit is contained in:
Alexey Pavlov 2018-07-27 08:36:12 +03:00
parent 0fa33012a3
commit 6e4a9d7621
4 changed files with 6 additions and 122 deletions

View File

@ -647,7 +647,7 @@ diff -Naur pacman-5.1.0-orig/scripts/makepkg.sh.in pacman-5.1.0/scripts/makepkg.
- if (( INFAKEROOT )); then
- # Don't clean up when leaving fakeroot, we're not done yet.
- return
- return 0
- fi
-
if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && CLEANUP )); then
@ -810,7 +810,7 @@ diff -Naur pacman-5.1.0-orig/scripts/makepkg.sh.in pacman-5.1.0/scripts/makepkg.
# check if we have any debug symbols to package
- if dir_is_empty "$pkgdir/usr/lib/debug"; then
+ if dir_is_empty "$pkgdir"; then
return
return 0
fi
@@ -989,21 +976,6 @@

View File

@ -1,26 +0,0 @@
From 842bdfbb622db0673d4952812a490e10f61fa3bd Mon Sep 17 00:00:00 2001
Message-Id: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 31 May 2018 17:01:16 +0200
Subject: [PATCH 1/2] makepkg: Clear ERR trap before trying to restore it
$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 e9080a70..d67fd853 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -432,6 +432,7 @@ run_function_safe() {
run_function "$1"
+ trap - ERR
eval "$restoretrap"
eval "$restoreset"
eval "$restoreshopt"
--
2.17.0

View File

@ -1,83 +0,0 @@
From bd164585f1a815a9f57b0c5bd2365d251500bc9f Mon Sep 17 00:00:00 2001
Message-Id: <bd164585f1a815a9f57b0c5bd2365d251500bc9f.1527784094.git.jan.steffens@gmail.com>
In-Reply-To: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
References: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 31 May 2018 17:46:51 +0200
Subject: [PATCH 2/2] makepkg: Don't use parameterless return
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_packages failed (via return 14), which was inside a
conditional that then ran exit 14, which triggered the EXIT handler,
which called clean_up, which called remove_deps, which had !RMDEPS and
thus returned. The return value of remove_deps became the return value
of install_packages, triggering the ERR handler, which (due to another
problem) was still the user function handler, which then printed a
misleading error message and overrode the exit code with 4.
---
scripts/makepkg.sh.in | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d67fd853..15524dc0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -313,7 +313,7 @@ resolve_deps() {
}
remove_deps() {
- (( ! RMDEPS )) && return
+ (( ! RMDEPS )) && return 0
# check for packages removed during dependency install (e.g. due to conflicts)
# removing all installed packages is risky in this case
@@ -519,7 +519,7 @@ find_libdepends() {
if (( sodepends == 0 )); then
(( ${#depends[@]} )) && printf '%s\n' "${depends[@]}"
- return;
+ return 0;
fi
local libdeps filename soarch sofile soname soversion;
@@ -721,7 +721,7 @@ list_package_files() {
}
create_package() {
- (( NOARCHIVE )) && return
+ (( NOARCHIVE )) && return 0
if [[ ! -d $pkgdir ]]; then
error "$(gettext "Missing %s directory.")" "\$pkgdir/"
@@ -784,14 +784,14 @@ create_package() {
create_debug_package() {
# check if a debug package was requested
if ! check_option "debug" "y" || ! check_option "strip" "y"; then
- return
+ return 0
fi
pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
# check if we have any debug symbols to package
if dir_is_empty "$pkgdir"; then
- return
+ return 0
fi
unset groups depends optdepends provides conflicts replaces backup install changelog
@@ -875,7 +875,7 @@ create_srcpackage() {
}
install_package() {
- (( ! INSTALL )) && return
+ (( ! INSTALL )) && return 0
if (( ! SPLITPKG )); then
msg "$(gettext "Installing package %s with %s...")" "$pkgname" "$PACMAN -U"
--
2.17.0

View File

@ -3,8 +3,8 @@
# Contributor: Ray Donnelly <mingw.android@gmail.com>
pkgname=pacman
pkgver=5.1.0
pkgrel=4
pkgver=5.1.1
pkgrel=1
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
arch=('i686' 'x86_64')
url="https://www.archlinux.org/pacman/"
@ -64,10 +64,8 @@ source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,
"0007-exe-interp-ignore-file-conflict.patch"
"0008-answer-yes-by-default.patch"
"0009-msys-use-pipe-instead-socket.patch"
"0020-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch"
"0021-makepkg-Don-t-use-parameterless-return.patch"
"0100-contrib.patch")
sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
sha256sums=('be04b9162d62d2567e21402dcbabb5bedfdb03909fa5ec6e8568e02ab325bd8d'
'SKIP'
'd47240396476eaf126b2f2a3f6ac77d5b397f5cc80b1c3700ba4fa355c4786c8'
'6024bbf50cc92236b7b437430cb9e4180da91925cdc19a5a7910fe172931cfb6'
@ -75,7 +73,7 @@ sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'364552567f4d436e12f5b19634dd06ed0a9ae92a72d3e3f08ccbfaa8b69f48a5'
'c0e4f55fa0c4b7b9f772f59f0f3d5e61cabc81cad770ed84171e833f73b7d034'
'40109ac4f4e200ae9f76864231527f5f1049c27800e78d04656fcf5844ed789d'
'7be386467abd974429fbba978bfa4578fd07ef18c5f3d16907c00feaa3fbfee2'
'8595c574e8b475591107e553832e4fbc93373769d9d193007d4512454e47a9ea'
'24ea2c8dca37847e04894ebfd05d1cf5df49dc0c8089f5581c99caa19b77a7ef'
'870b197b7d6379a9c1ebb5c449c902b21d75ec21e966a2e54af82501465180f7'
'23132552a388b238acf8bf650b5c2aa08cf3de63c647e84ad551807c4edfeb1e'
@ -85,8 +83,6 @@ sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'52343bbf99da6408950e34dd84319e34724040f866c497c25e36b4ee54030e82'
'e4f6e17af19e17e745a9f1c6b8402f5896229062c82167cb61f8e7d29eda716c'
'9e8fe5ee78192b0407e80ad2e52cb27569c35974b6c26e465e3d55e19c03d108'
'83f23061cc897a2829326e5c3a1d625b5b13152232242ce8dce1dcc6a3fd42c2'
'662169d7155146bcf6f0c48f5262299fd38dd4748769dd33e5c36251f9ba3d1e'
'3bd0cd48d608b31d7df564c50e8d31df58dd38cfaaea9ec0fcceb42936486549')
prepare() {
@ -101,9 +97,6 @@ prepare() {
patch -p1 -i ${srcdir}/0007-exe-interp-ignore-file-conflict.patch
patch -p1 -i ${srcdir}/0008-answer-yes-by-default.patch
patch -p1 -i ${srcdir}/0009-msys-use-pipe-instead-socket.patch
patch -p1 -i ${srcdir}/0020-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch
patch -p1 -i ${srcdir}/0021-makepkg-Don-t-use-parameterless-return.patch
autoreconf -fi