From: Alex Alexander <wired@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] openrc portage news item
Date: Fri, 29 Apr 2011 20:18:25 +0300 [thread overview]
Message-ID: <20110429171825.GA5451@lust> (raw)
In-Reply-To: <20110429122803.0ecc8060@googlemail.com>
[-- Attachment #1.1: Type: text/plain, Size: 874 bytes --]
On Fri, Apr 29, 2011 at 12:28:03PM +0100, Ciaran McCreesh wrote:
> On Fri, 29 Apr 2011 07:21:23 -0400
> Rich Freeman <rich0@gentoo.org> wrote:
> > Perhaps a future/in-progress EAPI could define a mechanism where an
> > ebuild can indicate that a particular update or set of circumstances
> > is a system-critical change, and that the package manager should
> > consequently alert the user and ensure that they have confirmed the
> > action.
>
> pkg_pretend can do that...
indeed. it works quite well too. please have a look at the attached
patch. it forces the user to acknowledge and verify that he has read the
printed message by prepending a variable to the emerge command.
I know it is a bit nasty, but it accomplishes our goal by making sure
the users read the message.
--
Alex Alexander | wired
+ Gentoo Linux Developer
++ www.linuxized.com
[-- Attachment #1.2: openrc-0.8.2-r1.ebuild.require.verification.patch --]
[-- Type: text/plain, Size: 1362 bytes --]
Index: openrc-0.8.2-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.8.2-r1.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 openrc-0.8.2-r1.ebuild
--- openrc-0.8.2-r1.ebuild 28 Apr 2011 19:50:51 -0000 1.1
+++ openrc-0.8.2-r1.ebuild 29 Apr 2011 17:10:34 -0000
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.8.2-r1.ebuild,v 1.1 2011/04/28 19:50:51 williamh Exp $
-EAPI="1"
+EAPI="4"
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -34,6 +34,22 @@
DEPEND="${RDEPEND}
virtual/os-headers"
+pkg_pretend() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && [[ ${WARNING_OPENRC} != 1 ]]; then
+ eerror
+ eerror "You're upgrading your system to openrc. After emerge is"
+ eerror "complete, you MUST follow the guide located here:"
+ ewarn " http://www.gentoo.org/doc/en/openrc-migration.xml"
+ eerror "FAILING TO DO SO WILL PROBABLY RESULT IN AN *NON-BOOTABLE* SYSTEM."
+ eerror
+ eerror "To verify you read and understood this message, please prepend"
+ ewarn " WARNING_OPENRC=1"
+ eerror "to your emerge command."
+ eerror
+ die "We need user verification to proceed."
+ fi
+}
+
make_args() {
unset LIBDIR #266688
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-04-29 17:17 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 18:15 [gentoo-dev] openrc portage news item William Hubbs
2011-04-13 18:27 ` Thomas Beierlein
2011-04-13 18:32 ` justin
2011-04-13 18:41 ` "Paweł Hajdan, Jr."
2011-04-13 19:58 ` William Hubbs
2011-04-14 8:09 ` [gentoo-dev] " Duncan
2011-04-14 11:44 ` Rich Freeman
2011-04-15 14:04 ` Peter Hjalmarsson
2011-04-15 19:01 ` Duncan
2011-04-13 19:56 ` [gentoo-dev] " William Hubbs
2011-04-14 5:30 ` justin
2011-04-14 7:21 ` Dirkjan Ochtman
2011-04-14 8:19 ` justin
2011-04-14 8:40 ` [gentoo-dev] " Duncan
2011-04-14 14:44 ` Dale
2011-04-14 15:41 ` Matthew Summers
2011-04-14 16:12 ` Dale
2011-04-14 18:48 ` William Hubbs
2011-04-14 10:32 ` [gentoo-dev] " Kfir Lavi
2011-04-14 10:32 ` Kfir Lavi
2011-04-14 10:51 ` Tomá? Chvátal
2011-04-14 11:03 ` Pacho Ramos
2011-04-14 11:21 ` Thomas Beierlein
2011-04-14 11:27 ` Sylvain Alain
2011-04-21 1:12 ` Donnie Berkholz
2011-04-21 2:23 ` Jeroen Roovers
2011-04-21 2:34 ` Jeroen Roovers
2011-04-22 10:39 ` Lars Wendler
2011-04-29 18:41 ` Brian Harring
2011-04-30 2:19 ` William Hubbs
2011-04-30 4:59 ` Brian Harring
2011-04-30 7:13 ` [gentoo-dev] " Duncan
2011-04-30 11:46 ` Brian Harring
2011-04-30 12:03 ` Rich Freeman
2011-04-30 12:58 ` Brian Harring
2011-04-30 13:06 ` Jeremy Olexa
2011-04-30 13:40 ` Brian Harring
2011-04-29 7:08 ` [gentoo-dev] " William Hubbs
2011-04-29 11:21 ` Rich Freeman
2011-04-29 11:28 ` Ciaran McCreesh
2011-04-29 17:18 ` Alex Alexander [this message]
2011-04-29 17:25 ` Ulrich Mueller
2011-04-29 17:32 ` Alex Alexander
2011-04-29 17:52 ` Rich Freeman
2011-04-29 17:58 ` Alex Alexander
2011-04-30 0:34 ` William Hubbs
2011-04-30 9:04 ` Sergei Trofimovich
2011-04-30 12:41 ` Roy Bamford
2011-04-29 14:27 ` [gentoo-dev] " Duncan
2011-05-01 19:12 ` [gentoo-dev] " William Hubbs
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=20110429171825.GA5451@lust \
--to=wired@gentoo.org \
--cc=gentoo-dev@lists.gentoo.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