app-portage/cpuid2cpuflags: Add postinst about the new output
authorMichał Górny <mgorny@gentoo.org>
Sat, 1 Apr 2017 06:14:12 +0000 (08:14 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sat, 1 Apr 2017 06:15:04 +0000 (08:15 +0200)
app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild
app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild

index 9d5be8483d549f6f1387b4326a378a52c091a0b8..7aec3c15788be052a3ca8460453abca607cbcc0b 100644 (file)
@@ -11,3 +11,18 @@ LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 IUSE=""
+
+pkg_postinst() {
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if [[ ${v%-r*} -lt 2 ]]; then
+                       elog 'Please note that the output has changed in v2. The new format is suitable'
+                       elog 'both for Portage and Paludis. To use it, e.g.:'
+                       elog
+                       elog '  $ echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpuflags'
+                       elog
+                       elog '(you may need to convert package.use into a directory if you want to use'
+                       elog ' separate file as presented here)'
+               fi
+       done
+}
index 9d5be8483d549f6f1387b4326a378a52c091a0b8..7aec3c15788be052a3ca8460453abca607cbcc0b 100644 (file)
@@ -11,3 +11,18 @@ LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 IUSE=""
+
+pkg_postinst() {
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if [[ ${v%-r*} -lt 2 ]]; then
+                       elog 'Please note that the output has changed in v2. The new format is suitable'
+                       elog 'both for Portage and Paludis. To use it, e.g.:'
+                       elog
+                       elog '  $ echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpuflags'
+                       elog
+                       elog '(you may need to convert package.use into a directory if you want to use'
+                       elog ' separate file as presented here)'
+               fi
+       done
+}