core/pacman to 4.0.3-5

This commit is contained in:
Kevin Mihelich 2012-11-18 07:56:29 +00:00
parent e9201faecb
commit 6e6a9f22a8
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,29 @@
From 1bf05e706b5edac92e9c913a69ca8686c6440f8b Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Fri, 04 May 2012 16:41:40 +0000
Subject: Ensure pre_upgrade scriptlet gets old package version
This was accidentally broken in the refactor done in commit 73139ccb.
Fixes FS#29371.
Signed-off-by: Dan McGee <dan@archlinux.org>
---
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 6c2f0cb..c49d99b 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -488,8 +488,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(alpm_pkg_has_scriptlet(newpkg) &&
!(trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
const char *scriptlet_name = is_upgrade ? "pre_upgrade" : "pre_install";
- _alpm_runscriptlet(handle, pkgfile,
- scriptlet_name, newpkg->version, NULL, 1);
+
+ _alpm_runscriptlet(handle, pkgfile, scriptlet_name,
+ newpkg->version, oldpkg ? oldpkg->version : NULL, 1);
}
/* we override any pre-set reason if we have alldeps or allexplicit set */
--
cgit v0.9.0.2-13-g2bd3

View file

@ -12,7 +12,7 @@ noautobuild=1
pkgname=pacman
pkgver=4.0.3
pkgrel=3.1
pkgrel=5
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
@ -28,12 +28,14 @@ options=(!libtool)
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
0001-Add-conflict-for-replacing-owned-empty-directory.patch
0002-Check-empty-subdirectory-ownership.patch
0003-Ensure-pre_upgrade-scriptlet-gets-old-package-version.patch
pacman.conf
makepkg.conf)
md5sums=('387965c7125e60e5f0b9ff3b427fe0f9'
'1a70392526c8768470da678b31905a6e'
'0c1d326d0ca48c9a9819ea8060ea3bba'
'02db451be806335ce189ffadb5cf84b9'
'2e8cbf55a94b1954b167c5dee6b62317'
'9a7d914def620cc4dd1a94ed53892175'
'e6d44e71b847d2c98bb38087e33cd76b')
@ -45,6 +47,7 @@ build() {
patch -p1 -i $srcdir/0001-Add-conflict-for-replacing-owned-empty-directory.patch
patch -p1 -i $srcdir/0002-Check-empty-subdirectory-ownership.patch
patch -p1 -i $srcdir/0003-Ensure-pre_upgrade-scriptlet-gets-old-package-version.patch
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --enable-doc