Score:0

Automatically update dependencies of a metapackage?

lv flag

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.

user535733 avatar
cn flag
If package upgrades are available from a known source, apt will try to upgrade those packages. That's been one of apt's defining features for 20 years. Neither a metapackage nor "force" nor scripts should be necessary. Perhaps we don't know enough about your specific problem.
White_Elefant avatar
lv flag
Not sure, if I defined my problem well enough. The only "problem" I have is that the trigger of upgrading the dependencies only to that metapackage shall be, when I upgrade that metapackage and not, when I'm upgrading the whole system...
ChanganAuto avatar
us flag
If the comment was intended as a clarification it failed spectacularly.
White_Elefant avatar
lv flag
Sorry for that. I'll try again. Suppose you have a package "my-package" with dependencies A,B,C installed on your ubuntu system. Now, in the meantime, there is a dependency, say A, updated on the repository. If I now reinstall "my-package", then A is not going to be upgraded on your ubuntu system. How can I tell apt to check the dependencies of "my-package" for updates, when I reinstall "my-package"?
user535733 avatar
cn flag
In a debian-based system, like Ubuntu, that problem seems backwards: You should be building your application or meta-package to use the existing versions that are standard for that release. Changing versions may cause a version conflict and break that system (which makes users angry at you). Your Meta-Foo 1.3 should be built to use the existing Baz 2.5, not trying to pull in Baz 2.8. Something else that's installed needs Baz 2.5, and the change breaks that. Stick to the standard.
Score:0
cn flag

It depends on how dependencies are set for the meta package. If there are fixed versions, or minimal versions, then dependencies should be pulled in accordance with that.

If not, there is no reason for apt to upgrade dependencies.

You can do it manually by sudo apt upgrade.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.