LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Update behaviour of APT (https://www.linuxquestions.org/questions/debian-26/update-behaviour-of-apt-4175717679/)

white_elefant 10-12-2022 07:04 AM

Update behaviour of APT
 
Hi,

I have a metapackage with a few dependencies. When I update the metapackage (apt-get install metapackage), only the metapackage itself is updated and not the corresponding dependencies. I think, this is a reasonable behaviour. However, is there a way to force an update of the dependencies during the "apt-get install"?

I already tried to determine and install the dependencies in the preinst script, but that logically won't work as the installer is locked during installation.

Thanks in advance!
W.E.

pan64 10-12-2022 07:11 AM

apt-get upgrade is used to upgrade packages, not install.

white_elefant 10-12-2022 08:10 AM

Quote:

Originally Posted by pan64 (Post 6385922)
apt-get upgrade is used to upgrade packages, not install.

True, thanks.

I tried this, but that won't upgrade selectively my metapackage with the corresponding dependencies..

michaelk 10-12-2022 08:23 AM

apt update or apt-get update will download package information and get updated version of packages or their dependencies.

apt upgrade or apt-get upgrade will install available updates to all packages from the above information.

Before installing your package you should make sure the system is updated. While apt or apt-get checks for dependencies as far as I know it does not check for the latest packages which is why you need to make sure the system is updated prior to install your package.

white_elefant 10-12-2022 08:37 AM

Quote:

Originally Posted by michaelk (Post 6385931)
apt update or apt-get update will download package information and get updated version of packages or their dependencies.

apt upgrade or apt-get upgrade will install available updates to all packages from the above information.

Before installing your package you should make sure the system is updated. While apt or apt-get checks for dependencies as far as I know it does not check for the latest packages which is why you need to make sure the system is updated prior to install your package.

Makes sense to me.

However, the question is: is it possible to trigger the update of only the dependent packages by updating/upgrading the metapackage?

pan64 10-12-2022 08:57 AM

probably this: https://askubuntu.com/questions/3216...endencies-only


All times are GMT -5. The time now is 07:25 AM.