-5

What exactly does apt do for us? More specifically what does it mean when someone says it manages package dependencies? Does this mean that if I am installing PackageA but PackageA requires PackageA1,PackageA2,PackageA3, and PackageA4. Then apt will download these for me?

Also does apt look for errors when downloading a package using the checksum??

I fail to see how this is a duplicate, so if someone can explain why that'd be great. The linked 'duplicate question' asks specifically about apt-get update/upgrade however there is far more to apt then just apt-get update such as apt-get install/remove/purge or apt-cache ...

j-money
  • 2,382
  • Apt/apt-get are front ends for the real dpkg tool that does the install. dpkg however can only used already downloaded files, so yes, apt will download (as long as you have a source for the required pacakage), and yes it does verify the package is correctly signed & matches fingerprint. Apt though has many functions; it can update repo lists (update), perform upgrade (within a set of rules), perform full-upgrade (fewer rules & more 'intelligent' than simple upgrade) etc... refer to the documentation. – guiverc Jul 27 '18 at 08:53
  • Have a look at the package python (assuming 18.04, https://packages.ubuntu.com/bionic/python). You'll note a lot of 'depends', ie. you can't install python until they've already been installed. dpkg requires they be installed at the same time, or already be installed. apt will check they are installed, and if not attempt download & then install... – guiverc Jul 27 '18 at 08:58
  • ps: i didn't down-vote, but I suspect you were down-voted because the question lacked a feel of doing any homework (and not just 'duplicate') – guiverc Jul 27 '18 at 09:08
  • Thanks for the advice, I will admit I probably didn't search around as hard as I could, but I really didn't find any great explanations on dependency management, – j-money Jul 27 '18 at 09:46
  • Here's some reading material: https://debian-handbook.info/browse/stable/sect.apt-get.html – DK Bose Jul 27 '18 at 11:51

1 Answers1

2

Apt/apt-get are front ends for the real tools that do the work. dpkg for example can't download, and requires all dependencies (deps) be already installed, or installed at the same time. Apt/apt-get will look to see if all required dependencies are installed, and if not download them, installing them too.

Yes apt does verify the package is correctly signed & was downloaded correctly.

apt has many functions; it can update repo lists (update), perform upgrade (within a set of rules), perform full-upgrade (fewer rules & more 'intelligent' than simple upgrade) and more. Refer to the documentation (http://manpages.ubuntu.com/manpages/bionic/en/man8/apt.8.html).

With regard dependencies.

As an example, the package python' (https://packages.ubuntu.com/bionic/python).

You'll note a lot of 'depends' including python2.7, python-minimal and more. ie. you can't install (using dpkg) python until all 'depends' are already installed. apt will check for this, then if not already installed it will attempt download (I used attempt as the packages must exist in your repository list sources) & then install, plus your requested package.

guiverc
  • 30,396