[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: aptitude --mind-your-own-business option?



Florian Kulzer wrote:
On Mon, Dec 11, 2006 at 11:46:03 +0000, Chris Lale wrote:
Florian Kulzer wrote:
[...]

1) Aptitude remembers intended actions, even if you change the package
  states and/or configuration settings which prompted this behavior.
  When in doubt, run "aptitude keep-all".

2) Aptitude tries to react immediately to changes in package states,
  including the "automatically installed" flag. If you want to run
  several successive (un)markauto commands to change/fix your system
  then you have to use "--schedule-only" to keep aptitude from doing
  something unintended halfway through the operation and "keep-all"
  afterwards. Another helpful stop-gap measure in such cases is
  -o aptitude::Keep-Unused-Pattern='~T'

[...]

Looking at point 2 again, I am not sure why you have to run "aptitude keep-all" at the end. "keep-all" removes the "A" (automatically installed) flags, but you have already removed them with "aptitude unmarkauto --schedule-only '~i'". Any "A" flags that you set with "markauto" are removed by "keep-all", so your work is undone. What am I missing?

I was not necessarily supposing that the user had done "aptitude
unmarkauto --schedule-only '~i'". I simply cannot be sure that there
will never be any scheduled actions after whatever complex sequence of
mark/unmark commands a given user might want to run. Since so many
people seem to be a bit freaked out by the behavior of aptitude I wanted
to be on the safe side. "keep-all" never hurts[*] and it helps in many
cases, so why not just run it once more in the end? (Considering
carefully if it is really necessary in each specific case takes much
longer than just running the command.)

Maybe it is better to rewrite that part of point 2 as:

If you want to be on the safe side you can always run "aptitude install
-fsD" to check if any of your previous commands has caused aptitude to
schedule unwanted actions. If that should turn out to be the case then
you can run "aptitude keep-all" (again) to revoke all scheduled actions.

[*] Actually keep-all can do "damage" because it will also remove all
    your carefully placed "hold" and "forbid-version" specifications.
    However, anyone who uses those to fine-tune aptitude's behavior is
    probably not the target audience of this discussion.

Thanks for that, Florian. I think that this amounts to:

Magic bullet: use "aptitude keep-all". (This has been the most important lesson for me.)

More surgical approach: use "aptitude unmarkauto --schedule-only '~i'". This may solve the problem, but check to make sure with "aptitude install -sfD". If you are happy, proceed. If there are still obvious problems or you are not sure, use the magic bullet "aptitude keep-all".

More sophisticated approach: read the documentation in the aptitude-doc-?? package.

If I have understood all this correctly, the NewbieDOC page should now be OK! (http://newbiedoc.berlios.de/wiki/Aptitude_-_using_together_with_Synaptic_and_Apt-get)

Thanks for your help.

--
Chris.



Reply to: