Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Who handles better dependencies, apt or apt-get?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
esbrinartot
Posts: 15
Joined: 2012-10-28 11:25

Who handles better dependencies, apt or apt-get?

#1 Post by esbrinartot »

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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#2 Post by pylkko »

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

esbrinartot
Posts: 15
Joined: 2012-10-28 11:25

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

#3 Post by esbrinartot »

pylkko wrote: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
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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#4 Post by Head_on_a_Stick »

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
deadbang

esbrinartot
Posts: 15
Joined: 2012-10-28 11:25

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

#5 Post by esbrinartot »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#6 Post by Head_on_a_Stick »

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 ;)
deadbang

esbrinartot
Posts: 15
Joined: 2012-10-28 11:25

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

#7 Post by esbrinartot »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#8 Post by Head_on_a_Stick »

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?
deadbang

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

#9 Post by GarryRicketson »

Anyone is free to think what they want, or have whatever opinion,..
but facts are facts:
https://debian-handbook.info/browse/sta ... t-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.

Post Reply