1 |
commit: cc958c3d516d66978ecb1b8835518fedf4cce950 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 29 22:00:52 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 29 22:01:36 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc958c3d |
7 |
|
8 |
sys-fs/static-dev: update to EAPI=5 for pkg_pretend #469620 |
9 |
|
10 |
With newer EAPIs we can run the checks sooner when we know we'll |
11 |
be doing a merge of the package. |
12 |
|
13 |
sys-fs/static-dev/static-dev-0.1.ebuild | 14 ++++++++++++-- |
14 |
1 file changed, 12 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/sys-fs/static-dev/static-dev-0.1.ebuild b/sys-fs/static-dev/static-dev-0.1.ebuild |
17 |
index cdafd45..099adc3 100644 |
18 |
--- a/sys-fs/static-dev/static-dev-0.1.ebuild |
19 |
+++ b/sys-fs/static-dev/static-dev-0.1.ebuild |
20 |
@@ -1,7 +1,9 @@ |
21 |
-# Copyright 1999-2014 Gentoo Foundation |
22 |
+# Copyright 1999-2015 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
# $Id$ |
25 |
|
26 |
+EAPI="5" |
27 |
+ |
28 |
DESCRIPTION="A skeleton, statically managed /dev" |
29 |
HOMEPAGE="https://bugs.gentoo.org/107875" |
30 |
SRC_URI="" |
31 |
@@ -12,6 +14,7 @@ KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" |
32 |
IUSE="" |
33 |
|
34 |
RDEPEND="sys-apps/makedev" |
35 |
+DEPEND="${RDEPEND}" |
36 |
|
37 |
abort() { |
38 |
echo |
39 |
@@ -20,10 +23,17 @@ abort() { |
40 |
die "Cannot install on udev/devfs tmpfs." |
41 |
} |
42 |
|
43 |
-pkg_preinst() { |
44 |
+pkg_pretend() { |
45 |
+ if [[ ${MERGE_TYPE} == "buildonly" ]] ; then |
46 |
+ # User is just compiling which is fine -- all our checks are merge-time. |
47 |
+ return |
48 |
+ fi |
49 |
+ |
50 |
+ # We want to not clobber udev (tmpfs) or older devfs setups. |
51 |
if [[ -d ${ROOT}/dev/.udev || -c ${ROOT}/dev/.devfs ]] ; then |
52 |
abort |
53 |
fi |
54 |
+ # We also want to not clobber newer devtmpfs setups. |
55 |
if [[ ${ROOT} == "/" ]] && \ |
56 |
! awk '$2 == "/dev" && $3 == "devtmpfs" { exit 1 }' /proc/mounts ; then |
57 |
abort |