summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-10-29 18:00:52 -0400
committerMike Frysinger <vapier@gentoo.org>2015-10-29 18:01:36 -0400
commitcc958c3d516d66978ecb1b8835518fedf4cce950 (patch)
tree4edf7124003544b91b69632e3f6bbb63c66d8718 /sys-fs
parentapp-admin/entr: Clean up old. (diff)
downloadgentoo-cc958c3d516d66978ecb1b8835518fedf4cce950.tar.gz
gentoo-cc958c3d516d66978ecb1b8835518fedf4cce950.tar.bz2
gentoo-cc958c3d516d66978ecb1b8835518fedf4cce950.zip
sys-fs/static-dev: update to EAPI=5 for pkg_pretend #469620
With newer EAPIs we can run the checks sooner when we know we'll be doing a merge of the package.
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/static-dev/static-dev-0.1.ebuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys-fs/static-dev/static-dev-0.1.ebuild b/sys-fs/static-dev/static-dev-0.1.ebuild
index cdafd459eeec..099adc31aa16 100644
--- a/sys-fs/static-dev/static-dev-0.1.ebuild
+++ b/sys-fs/static-dev/static-dev-0.1.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+EAPI="5"
+
DESCRIPTION="A skeleton, statically managed /dev"
HOMEPAGE="https://bugs.gentoo.org/107875"
SRC_URI=""
@@ -12,6 +14,7 @@ KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
IUSE=""
RDEPEND="sys-apps/makedev"
+DEPEND="${RDEPEND}"
abort() {
echo
@@ -20,10 +23,17 @@ abort() {
die "Cannot install on udev/devfs tmpfs."
}
-pkg_preinst() {
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} == "buildonly" ]] ; then
+ # User is just compiling which is fine -- all our checks are merge-time.
+ return
+ fi
+
+ # We want to not clobber udev (tmpfs) or older devfs setups.
if [[ -d ${ROOT}/dev/.udev || -c ${ROOT}/dev/.devfs ]] ; then
abort
fi
+ # We also want to not clobber newer devtmpfs setups.
if [[ ${ROOT} == "/" ]] && \
! awk '$2 == "/dev" && $3 == "devtmpfs" { exit 1 }' /proc/mounts ; then
abort