aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2006-01-28 21:01:47 +0000
committerNed Ludd <solar@gentoo.org>2006-01-28 21:01:47 +0000
commitf906d61c87a78c6fc7e4cc733aec20f195feeafa (patch)
tree738ea6a3be6baa1687c7993e7f7e874a67ed50c9
parent- regen manpages (diff)
downloadportage-utils-f906d61c87a78c6fc7e4cc733aec20f195feeafa.tar.gz
portage-utils-f906d61c87a78c6fc7e4cc733aec20f195feeafa.tar.bz2
portage-utils-f906d61c87a78c6fc7e4cc733aec20f195feeafa.zip
- Only force the exporting of the env var for qmerge when ((install || uninstall) && !pretend) is set
-rw-r--r--qmerge.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/qmerge.c b/qmerge.c
index be43f238..76a037a3 100644
--- a/qmerge.c
+++ b/qmerge.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2006 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.26 2006/01/28 20:41:45 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.27 2006/01/28 21:01:47 solar Exp $
*
* Copyright 2005-2006 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org>
@@ -42,7 +42,7 @@ static const char *qmerge_opts_help[] = {
COMMON_OPTS_HELP
};
-static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.26 2006/01/28 20:41:45 solar Exp $";
+static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.27 2006/01/28 21:01:47 solar Exp $";
#define qmerge_usage(ret) usage(ret, QMERGE_FLAGS, qmerge_long_opts, qmerge_opts_help, lookup_applet_idx("qmerge"))
char pretend = 0;
@@ -1349,10 +1349,12 @@ int qmerge_main(int argc, char **argv) {
}
/* Short circut this. */
- if (getenv("QMERGE") == NULL) {
- pretend = 1;
- nomd5 = 1;
- uninstall = 0;
+ if ((install || uninstall) && !pretend) {
+ if (getenv("QMERGE") == NULL) {
+ uninstall = 0;
+ install = 0;
+ warn("Using these options are likely to break your system at this point. export QMERGE=1; if you think you know what your doing.");
+ }
}
if (uninstall)
return unmerge_packages(argc, argv);