Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: [PATCH] pigz: Add update-altneratives support since this otherwise conflicts with busybox/gzip
Date: Wed, 21 Mar 2012 14:29:49 +0000	[thread overview]
Message-ID: <1332340189.9740.161.camel@ted> (raw)
In-Reply-To: <1FB40B91-CFCB-4E72-9159-00BD674EE3A9@dominion.thruhere.net>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
index 5fda8ca..e1cbc8b 100644
--- a/meta/recipes-extended/pigz/pigz.inc
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -15,7 +15,18 @@ PROVIDES_virtclass-native += "gzip-native"
 DEPENDS = "zlib"
 
 do_install () {
-        install -d ${D}${bindir}
-        install ${B}/pigz ${D}${bindir}/gzip
-        install ${B}/unpigz ${D}${bindir}/gunzip
+	if [ "${PN}" = "${BPN}" ] ; then
+		# Install files into /bin (FHS), which is typical place for gzip
+	        install -d ${D}${base_bindir}	        
+		install ${B}/pigz ${D}${base_bindir}/gzip
+	        install ${B}/unpigz ${D}${base_bindir}/gunzip
+	else
+	        install -d ${D}${bindir}
+	        install ${B}/pigz ${D}${bindir}/gzip
+	        install ${B}/unpigz ${D}${bindir}/gunzip
+	fi
 }
+
+ALTERNATIVE_LINKS = "${base_bindir}/gzip ${base_bindir}/gunzip"
+ALTERNATIVE_PRIORITY = "80"
+
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb b/meta/recipes-extended/pigz/pigz_2.2.4.bb
index eaf00c6..e76c49c 100644
--- a/meta/recipes-extended/pigz/pigz_2.2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -1,6 +1,6 @@
 require pigz.inc
 
-PR = "r1"
+PR = "r2"
 
 NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
 





  reply	other threads:[~2012-03-21 14:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 14:52 [PATCH] Add pigz as gzip-native alternative Björn Stenberg
2012-03-13 15:05 ` Paul Eggleton
2012-03-14 15:59   ` Björn Stenberg
2012-03-14 16:27     ` Paul Eggleton
2012-03-15  8:25       ` Björn Stenberg
2012-03-19 14:46         ` Koen Kooi
2012-03-19 15:58           ` Björn Stenberg
2012-03-19 17:56             ` Koen Kooi
2012-03-20 14:12               ` Björn Stenberg
2012-03-20 14:16                 ` Koen Kooi
2012-03-21 14:29                   ` Richard Purdie [this message]
2012-03-19 16:32 ` Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332340189.9740.161.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox