Who handles better dependencies, apt or apt-get?

If none of the more specific forums is the right place to ask

Who handles better dependencies, apt or apt-get?

Postby esbrinartot » 2017-04-02 07:38

I think that apt and apt-get share most of the code. So both options have similar performance and should have the same behaviour.

However somewhere I read next:

apt was designed to fix some of the fundamental dependency flaws in apt-get. As it is a wrapper, apt is therefore higher level, and also loses some backward compatibility and scripting features.


Is that correct? I think this is not correct.

Thks in advance
esbrinartot
 
Posts: 15
Joined: 2012-10-28 11:25

Re: Who handles better dependencies, apt or apt-get?

Postby pylkko » 2017-04-02 12:47

http://askubuntu.com/questions/829864/i ... deprecated

is where you read that, perhaps. I believe that firstly and foremostly apt is intended to be a nicer and easier tool to apt-get and apt-cache, but there apparently are some other improvements, but I don't know if dependency resolution is different. I know that if you do apt upgrade it is more like apt-get dist-upgrade than apt-get upgrade
User avatar
pylkko
 
Posts: 882
Joined: 2014-11-06 19:02

Re: Who handles better dependencies, apt or apt-get?

Postby esbrinartot » 2017-04-02 12:56

pylkko wrote:http://askubuntu.com/questions/829864/is-apt-get-deprecated

is where you read that, perhaps. I believe that firstly and foremostly apt is intended to be a nicer and easier tool to apt-get and apt-cache, but there apparently are some other improvements, but I don't know if dependency resolution is different. I know that if you do apt upgrade it is more like apt-get dist-upgrade than apt-get upgrade


The post you mentioned is the one that I read. However as you know there are many people that publish things that are not correct. For instance this one:

apt was designed to fix some of the fundamental dependency flaws in apt-get


Frankly speaking I think this is not correct. I agree that apt was designed to be more user friendly, but option has exactly the same performance or at least it's so similar. So I don't believe that apt is better than apt-get. Just one of them is nicer for the end user and the other is more suitable for scripts because we will always have compatibility between different versions.
esbrinartot
 
Posts: 15
Joined: 2012-10-28 11:25

Re: Who handles better dependencies, apt or apt-get?

Postby Head_on_a_Stick » 2017-04-02 14:52

I like `apt` and I use it a lot and I have noticed that it seems to use the same (or at least similar) dependency-resolving algorithms as `aptitude` — for example, when Debian transitioned from Iceweasel to firfox-esr, `apt-get dist-upgrade` was needed to remove the old Iceweasel package and complete the transition but plain old `apt upgrade` (or `aptitude upgrade`) would go through just fine.

As to which is "better", well that depends on the situation.

Debian now recommends not using `aptitude full-upgrade` for a change between release versions and to instead use `apt-get dist-upgrade` because the more complicated algorithms used by `aptitude` (and perhaps `apt` as well) can get "confused" by all of the options available and it can end up simply removing the entire system.
Debian jessie release notes wrote:The upgrade process for some previous releases recommended the use of aptitude for the upgrade. This tool is not recommended for upgrades from wheezy to jessie.

https://www.debian.org/releases/jessie/ ... ading-full

See also https://www.debian.org/doc/manuals/debi ... de_literal
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6488
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Who handles better dependencies, apt or apt-get?

Postby esbrinartot » 2017-04-02 14:57

Head_on_a_Stick wrote:I like `apt` and I use it a lot and I have noticed that it seems to use the same (or at least similar) dependency-resolving algorithms as `aptitude` — for example, when Debian transitioned from Iceweasel to firfox-esr, `apt-get dist-upgrade` was needed to remove the old Iceweasel package and complete the transition but plain old `apt upgrade` (or `aptitude upgrade`) would go through just fine.

As to which is "better", well that depends on the situation.

Debian now recommends not using `aptitude full-upgrade` for a change between release versions and to instead use `apt-get dist-upgrade` because the more complicated algorithms used by `aptitude` (and perhaps `apt` as well) can get "confused" by all of the options available and it can end up simply removing the entire system.
Debian jessie release notes wrote:The upgrade process for some previous releases recommended the use of aptitude for the upgrade. This tool is not recommended for upgrades from wheezy to jessie.

https://www.debian.org/releases/jessie/ ... ading-full

See also https://www.debian.org/doc/manuals/debi ... de_literal


Thks. However my question is not related about aptitude. In fact I want to find out if the way to resolve dependencies, download packages, etc... is the same in apt and apt-get.
esbrinartot
 
Posts: 15
Joined: 2012-10-28 11:25

Re: Who handles better dependencies, apt or apt-get?

Postby Head_on_a_Stick » 2017-04-02 14:59

esbrinartot wrote:I want to find out if the way to resolve dependencies, download packages, etc... is the same in apt and apt-get.

No, it is not.

I think that it is the same in apt and aptitude, that was the point that I was trying to make ;)
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6488
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Who handles better dependencies, apt or apt-get?

Postby esbrinartot » 2017-04-02 17:28

Head_on_a_Stick wrote:
esbrinartot wrote:I want to find out if the way to resolve dependencies, download packages, etc... is the same in apt and apt-get.

No, it is not.

I think that it is the same in apt and aptitude, that was the point that I was trying to make ;)


you think are different. I think are the same.
esbrinartot
 
Posts: 15
Joined: 2012-10-28 11:25

Re: Who handles better dependencies, apt or apt-get?

Postby Head_on_a_Stick » 2017-04-02 17:41

esbrinartot wrote:I think are the same.

Then why did `apt upgrade` change Iceweasel to firefox-esr on my Debian jessie systems but `apt-get upgrade` did not?

This illustrates clearly and unequivocally that the dependency-resolution algorithms are *not* the same in apt as they are in apt-get, surely?
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6488
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Who handles better dependencies, apt or apt-get?

Postby GarryRicketson » 2017-04-02 17:55

Anyone is free to think what they want, or have whatever opinion,..
but facts are facts:
https://debian-handbook.info/browse/stable/sect.apt-get.html

Note however that apt-get and aptitude have a very similar command line syntax. When there are major differences between apt, apt-get and aptitude, these differences will be detailed.

One needs to read the "handbook" page completely, but it is clear , just in the introduction, there are differences, and some are major, but they will be pointed
out, and detailed ------
Here is one:
People might want to know why an automatically installed package is present on the system. To get this information from the command line, you can use aptitude why package (apt and apt-get have no similar feature):
Code: Select all
$ aptitude why python-debian
i   aptitude         Recommends apt-xapian-index         
i A apt-xapian-index Depends    python-debian (>= 0.1.15)

It is important to learn about each tool, they are different, and uderstanding the differences will help the person to be able to select the best tool for that particular situation.
That does not mean any particular tool is better then the other,..it simply means
that it is important to choose the correct tool.
If the point of the thread was to just argue, and when someone suggests one tool , reject the suggestion,... well it is all rather pointless.
Why bother asking if one all ready "thinks" they know ?
In the "quote" above, it says clearly, "apt and apt-get have no similar feature"
So in that case "aptitude" is the better tool,....

by Head_on_a_Stick » As to which is "better", well that depends on the situation

+100
I wish I could learn to put things in such a clear, precise and short statement.
User avatar
GarryRicketson
 
Posts: 3861
Joined: 2015-01-20 22:16
Location: Durango, Mexico


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable