Re: alwaysprompt isn't helpful and assumeyes is dangerous
Matthew Miller <[email protected]>
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Feb 19, 2008 at 10:17:16AM +1100, Mikel Ward wrote: > What I want is: > 1) if I do an install and it only installs the packages I asked for, go > ahead and do it > 2) if I do an erase and it only removes the packages I asked for, go > ahead and do it > 3) prompt for anything else This was what my little patch implementing alwaysprompt originally did but Seth nixed #2, and I failed to convince him otherwise. Attached is the (trivial) patch to add that behavior back. Together with the yum-protect-packages plugin, I feel pretty good about this behavior. > 1 and 2 are important because it's really annoying to get asked > questions for trivial operations. More importantly than "it's annoying", it gets you in the habit of hitting y no matter what, or more dangerously using -y. I think it really should only prompt when something surprising (i.e., more or less than it was told) happens. -- Matthew Miller [email protected] <http://mattdm.org/> Boston University Linux ------> <http://linux.bu.edu/> _______________________________________________ Yum mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum
yum-2.3.1-dont_prompt_for_nonsurprising_removals_either.patch
(text/plain, 1.4 KB)
diff -ur yum-2.3.1.orig/cli.py yum-2.3.1/cli.py
--- yum-2.3.1.orig/cli.py 2005-03-24 14:02:51.775951000 -0500
+++ yum-2.3.1/cli.py 2005-03-24 14:03:25.374412231 -0500
@@ -1447,11 +1447,9 @@
# prompt if:
# package was added to fill a dependency
- # package is being removed
# package wasn't explictly given on the command line
for txmbr in self.tsInfo.getMembers():
if txmbr.isDep or \
- txmbr.ts_state == 'e' or \
txmbr.name not in self.extcmds:
return True
diff -ur yum-2.3.1.orig/docs/yum.conf.5 yum-2.3.1/docs/yum.conf.5
--- yum-2.3.1.orig/docs/yum.conf.5 2005-03-24 14:02:51.775951000 -0500
+++ yum-2.3.1/docs/yum.conf.5 2005-03-24 14:04:13.555468764 -0500
@@ -57,9 +57,9 @@
.IP \fBalwaysprompt\fR
Either `1' or `0'. Without this option, yum will not prompt for confirmation
-when the list of packages to be installed exactly matches those given on the
-command line. Unless \fBassumeyes\fR is enabled, it will still prompt for
-package removal, or when additional packages need to be installed to fulfill
+when the list of packages to be installed or removed exactly matches those
+given on the command line. Unless \fBassumeyes\fR is enabled, it will still
+prompt when additional packages need to be installed or removed to fulfill
dependencies. Default is `1'.
.br