Commit a8c1585e authored by Natanael Copa's avatar Natanael Copa

main/abuild: another fix for provides in subpackages

(cherry picked from commit 70975c55)
parent 95eec318
From 0e58eeff8089c8c148c20a5e239d618095ec434f Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 11 Jun 2015 11:56:04 +0000
Subject: [PATCH] abuild: fix provides and install_if in subpackages
we need to clear provides set in global scope before splitting the
subpackages so the subpackage does not inherit main packages' provides.
But at the same time, we must not clear the provides/install_if set in
the splitfunction itself.
---
abuild.in | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/abuild.in b/abuild.in
index cb069f2..dc72d79 100644
--- a/abuild.in
+++ b/abuild.in
@@ -683,6 +683,15 @@ postcheck() {
return 0
}
+pre_split() {
+ if [ -z "$subpkgname" ]; then
+ return 0
+ fi
+ # the subpackages should not inherit those form main package
+ provides=""
+ install_if=""
+}
+
prepare_subpackages() {
local i
cd "$startdir"
@@ -692,7 +701,7 @@ prepare_subpackages() {
msg "Running split function $func..."
local dir="$pkgbasedir/${i%:*}" name="${i%:*}"
( subpkgdir="$dir" subpkgname="$name" \
- $0 $func prepare_package \
+ $0 pre_split $func prepare_package \
&& postcheck "$dir" "$name" ) || return 1
done
postcheck "$pkgdir" "$pkgname" || return 1
@@ -947,11 +956,6 @@ archcheck() {
prepare_package() {
msg "Preparing ${subpkgname:+sub}package ${subpkgname:-$pkgname}..."
- if [ -n "$subpkgname" ]; then
- # the subpackages should not inherit those
- provides=""
- install_if=""
- fi
stripbin
prepare_metafiles \
&& prepare_trace_rpaths \
--
2.4.2
......@@ -2,7 +2,7 @@
pkgname=abuild
pkgver=2.22.0
_ver=${pkgver%_git*}
pkgrel=1
pkgrel=2
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
......@@ -21,6 +21,7 @@ options="suid"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch
0001-abuild-fix-provides-and-install_if-in-subpackages.patch
"
_builddir="$srcdir/$pkgname-$_ver"
......@@ -60,8 +61,11 @@ cpan() {
}
md5sums="46184ce2dc86294f3f8de9fe80200a7e abuild-2.22.0.tar.xz
00bdd3304f7d89decc5d4b84e30a10b5 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch"
00bdd3304f7d89decc5d4b84e30a10b5 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch
60460524b974ad082e722b8a5d65460a 0001-abuild-fix-provides-and-install_if-in-subpackages.patch"
sha256sums="0d24dca8fa8acc6a033e73d6cfbc6062e91c14e7b73456bd9a273f570cd91e47 abuild-2.22.0.tar.xz
d8744ecb58d86ecb40ee22edbdbcdba1e93cc8e331a9d98641446c08b307873a 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch"
d8744ecb58d86ecb40ee22edbdbcdba1e93cc8e331a9d98641446c08b307873a 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch
c305ef06ba09e40a886674bc4e36c253e91910ed7818ea6544f82ccf345f580e 0001-abuild-fix-provides-and-install_if-in-subpackages.patch"
sha512sums="c95b8ecba39ba9a76f2de6fc33aae70e040d6d6041b2365066ce2a8cb92a8ae115697f93add1c8e0ae71b1cac1ed43437416dd323fed8959a0610cc204b4a0f1 abuild-2.22.0.tar.xz
bb55aad137f2cf02f36ce57581a1dc00f6f70f5d4df1c3fcf509772757668abfb3e5e862e40f2b62fad707ec44278f33242f8d37a64473bc72423263df939fea 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch"
bb55aad137f2cf02f36ce57581a1dc00f6f70f5d4df1c3fcf509772757668abfb3e5e862e40f2b62fad707ec44278f33242f8d37a64473bc72423263df939fea 0001-abuild-clear-inherit-provides-and-install_if-for-sub.patch
7269481a60a87bf2196c1a10ccfc6226d20c99e45a20e45f10aff2f174aaa2e5f92a88e374c15fbc76f3ffada49841bac3ad2208b78587a185048060aa3e5eb3 0001-abuild-fix-provides-and-install_if-in-subpackages.patch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment