At Tue, 7 Jul 2026 22:05:19 +0000 Andy Smith <[email protected]> wrote:

>
> On Tue, Jul 07, 2026 at 04:05:22PM -0400, Eben King wrote:
> > On 7/7/26 15:21, Robert Heller wrote:
> > > At Tue, 7 Jul 2026 14:18:25 -0400 Eben King <[email protected]> wrote:
> > >
> > > >
> > > > I have a need to find the upgradable package with the most dependencies.
> > > Why do you need to do this?  And why does speed matter?
> >
> > Generally, I dislike it when lots of things change at the same time
>
> Unless you are on testing or unstable surely almost all updates are
> security updates and you want them all pretty much as soon as possible?
>
> > I got to thinking it might be bad to update some parts of a package
> > and not others, so I want to upgrade those at the top of their tree of
> > dependencies.
>
> As packages are not divisible entities for upgrade purposes, I assume
> you mean the situation where package foo depends upon package bar and
> both of them are due an upgrade, you are saying that you would prefer to
> upgrade foo so as to not get a version of bar that is unexpected by the
> non-upgraded foo.
>
> The thing is, this is unnecessary and won't work as you would want
> anyway. If foo just lists a dependency on bar then any version of bar will
> be good enough for foo. So there should be no harm in upgrading bar and
> doing so won't force an upgrade of foo unless there is also a dependency the 
> other way that lists a specific version requirement.
>
> Normally you'd just do "apt full-upgrade" or whatever and let everything
> be upgraded but in this instance there should be no harm in upgrading
> only bar with something like "apt install --only-upgrade bar". Apart
> from that there is a security update pending for foo that you've decided
> not to apply.
>
> I am not sure what would happen if you told apt to upgrade only foo, and
> the incoming foo package had a versioned dependency on an upgraded bar
> package but you had not allowed the upgrade of any other package.

"apt install foo"

where foo is an upgrade candidate will upgrade foo and if any of its
depenencies have upgrades, those depenencies will get upgraded too.

If foo depends on bar and if both are updatable and you upgrade bar, foo will
get upgraded.  There is little to be gained by pre-checking dependencies as
the OP wants to do.  "Randomly" upgrading a single package will likely upgrade
some set of other packages.  apt is very clever and it is pretty much
impossible to screw anything up by trying to upgrade single packages in any
partitular order.  If you do "apt full-upgrade, say once a week, the upgrade
most weeks will take less than 30 minutes.  The only possible time it will
take longer is when a new point release comes out.

What the OP wants to do is not going to really gain anything useful in terms
of time, etc.

The kind of thing the OP is looking to do only really makes sense in two
cases:

Case 1: A machine that has been "neglacted" (not had "apt update" and "apt
full-upgrade" run in a very long time.

Case 2: A machine that has no "good" connection to the Internet -- eg a
machine that is "air gapped" or only has a slow and unreliable (dialup?)
connection to the Internet, and thus needs to be updated in "stages", possibly
using something like limited removable media (media too small to hold a full
mirror of the repositories). (Given the sizes of usb flash drives currently
available, this probably not a real issue.)

>
> Thanks,
> Andy
>

--
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
[email protected]       -- Webhosting Services


Reply via email to