aptitude safe-upgrade

285 views
Skip to first unread message

Lorin Hochstein

unread,
Mar 30, 2013, 5:20:01 PM3/30/13
to ansible...@googlegroups.com
I'd like to add support for the "aptitude safe-upgrade" command in an ansible module. I was thinking of one of two options for implementing it:

Option 1:  Modifying the apt module so that the "upgrade" parameter can take a new argument, e.g. "safe": (apt: upgrade=safe). In this case, it would do "aptitude safe-upgrade -y"

Option 2: Adding a new "aptitude" module.

I'd prefer option #1, but I wanted to hear if others felt differently.

Note that the difference between "apt-get upgrade" (apt: upgrade=yes) and "aptitude safe-upgrade" is that "aptitude safe-upgrade" will install missing dependencies.

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.

Serge van Ginderachter

unread,
Mar 31, 2013, 5:53:28 AM3/31/13
to ansible...@googlegroups.com

On 30 March 2013 22:20, Lorin Hochstein <lo...@nimbisservices.com> wrote:

​Shouldn't this 

Note that the difference between "apt-get upgrade" (apt: upgrade=yes) and "aptitude safe-upgrade" is that "aptitude safe-upgrade" will install missing dependencies.

be "​.. will not install new dependencies"​?


  Serge



Michael DeHaan

unread,
Mar 31, 2013, 10:13:10 AM3/31/13
to ansible...@googlegroups.com
Why would you ever not want to install new dependencies added by a
package upgrade?

Seems like if you wanted to, you could just use the command module for
this, but it also seems very strange.

If a package goes from v1 to v2 and now requires X, it seems not
installing X is not safe in the least :)
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Serge van Ginderachter

unread,
Mar 31, 2013, 1:41:47 PM3/31/13
to ansible...@googlegroups.com

On 31 March 2013 16:13, Michael DeHaan <mic...@ansibleworks.com> wrote:
Seems like if you wanted to, you could just use the command module for
this, but it also seems very strange.

If a package goes from v1 to v2 and now requires X, it seems not
installing X is not safe in the least :)


​safe-upgrade should be the default. regular upgrade is more of what is used for distribution upgrades.


The apt-get command closer to aptitude safe-upgrade is upgrade, but there is a difference.

aptitude safe-upgrade upgrades currently installed packages and can install new packages to resolve new dependencies, but never removes packages.

apt-get upgrade upgrades currently installed packages, but never installs or removes packages.

So apt-get upgrade is comparable to aptitude --no-new-installs safe-upgrade.

Michael DeHaan

unread,
Mar 31, 2013, 5:05:46 PM3/31/13
to ansible...@googlegroups.com
Ok, make it so please!

Lorin Hochstein

unread,
Mar 31, 2013, 5:08:55 PM3/31/13
to ansible...@googlegroups.com
OK, I will modify the behavior of "apt: upgrade=yes" to use "aptitude safe-upgrade" instead of "apt-get upgrade"

Lorin

Lorin Hochstein

unread,
Mar 31, 2013, 8:54:03 PM3/31/13
to ansible...@googlegroups.com
No, it's correct. "aptitude safe-upgrade" installs missing dependencies, and "apt-get upgrade" doesn't. You pretty much always want to install missing dependencies if an updated package requires a new dependency, so "aptitude safe-upgrade" is the common case.

Lorin
 

  Serge



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Michael DeHaan

unread,
Apr 1, 2013, 8:50:56 AM4/1/13
to ansible...@googlegroups.com
This is merged now.

As we are scheduled to release 1.1 tomorrow, if everyone can test the
app module today that would be greatly appreciated!

TextEditor

unread,
Apr 2, 2013, 3:34:29 AM4/2/13
to ansible...@googlegroups.com
How would this run for systems which only have apt-get installed and not aptitude?

Op maandag 1 april 2013 02:54:03 UTC+2 schreef Lorin Hochstein het volgende:

Michael DeHaan

unread,
Apr 2, 2013, 7:51:33 AM4/2/13
to ansible...@googlegroups.com
(A) You could of course install aptitude.

(B) I think the real question you meant to ask was 'can we do this
with apt instead', which is my question.

Though it will need to wait until 1.2.
Reply all
Reply to author
Forward
0 new messages