summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2017-02-10 22:05:35 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2017-02-10 22:05:35 +0000
commitf9c367e4109d1a4cea8e8269535b6a8f10b5db48 (patch)
treee529acb580592e1ee32eb12e26620ed08131e4f8 /sys-fs
parentdev-libs/dietlibc: Sync with upstream (diff)
downloadportage-f9c367e4109d1a4cea8e8269535b6a8f10b5db48.tar.xz
sys-fs/static-dev: Sync with upstream
Package-Manager: portage-2.3.3
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/static-dev/static-dev-0.1.ebuild40
1 files changed, 18 insertions, 22 deletions
diff --git a/sys-fs/static-dev/static-dev-0.1.ebuild b/sys-fs/static-dev/static-dev-0.1.ebuild
index 77d49a9b..0ec2c55e 100644
--- a/sys-fs/static-dev/static-dev-0.1.ebuild
+++ b/sys-fs/static-dev/static-dev-0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -6,7 +6,7 @@ EAPI=6
inherit toolchain-funcs
DESCRIPTION="A skeleton, statically managed /dev"
-HOMEPAGE="http://bugs.gentoo.org/107875"
+HOMEPAGE="https://bugs.gentoo.org/107875"
SRC_URI=""
LICENSE="GPL-2"
@@ -14,26 +14,22 @@ SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
IUSE=""
-DEPEND="sys-apps/makedev"
-RDEPEND="${DEPEND}"
-
-pkg_preinst() {
- if [[ -d "${EROOT}/dev/.udev" || -c "${EROOT}/dev/.devfs" ]] ; then
- echo ""
- eerror "We have detected that you currently use udev or devfs"
- eerror "and this ebuild cannot install to the same mount-point."
- eerror "Please reinstall the ebuild (as root) like follows:"
- eerror ""
- eerror "mkdir /tmp/newroot"
- eerror "mount -o bind / /tmp/newroot"
- eerror "EROOT=/tmp/newroot/ emerge sys-fs/static-dev"
- eerror "umount /tmp/newroot"
- die "Cannot install on udev/devfs tmpfs."
- fi
+RDEPEND="sys-apps/makedev"
+DEPEND="${RDEPEND}"
+
+abort() {
+ echo
+ eerror "We have detected that you currently use udev or devfs or devtmpfs"
+ eerror "and this ebuild cannot install to the same mount-point."
+ die "Cannot install on udev/devfs tmpfs."
+}
- einfo ""
- einfo "To add personal devices classes, set env variable EXTRA_CLASSES"
- einfo ""
+pkg_pretend() {
+ # We also want to not clobber newer devtmpfs setups.
+ if [[ ${ROOT} == "/" ]] && \
+ ! awk '$2 == "/dev" && $3 == "devtmpfs" { exit 1 }' /proc/mounts ; then
+ abort
+ fi
}
src_install() {
@@ -44,7 +40,7 @@ src_install() {
einfo "Creating device nodes using classes:"
einfo " ${classes}"
- [ -n "${EXTRA_CLASSES}" ] && einfo " ${EXTRA_CLASSES}"
+ [[ -n "${EXTRA_CLASSES}" ]] && einfo " ${EXTRA_CLASSES}"
MAKEDEV -d "${ED}/dev" \
${classes} \