0

I did a reperformance. With clean boot of liveISO. It showed that removing entry from file in /etc/apt/preferences.d:

Package: *
Pin: release o=linuxmint,c=upstream
Pin-Priority: 700

changes the result. So something additional effected my initial result when even after removing preferences files from /etc/apt/preferences.d result persisted. I want to dig more, but not sure where to.

TL;DR

The package in question has no dependencies (as per contents of file in /lib/apt/lists for deb scheme and from dpkg -I for local file scheme deb file). Architecture is same, source is same, section is same for both.

As of now I've found pin preferences in /etc/apt/preferences.d / /etc/apt/preferences can "make" apt to choose older version to install, however I've removed those files (also there was no /etc/apt/apt.conf), run apt-get update just in case, still same fetching of older version. What else to try? Maybe there is some APT command to re-read prerefences?

APT::Default-Release empty (should be as no /etc/apt/apt.conf, correct?).

Local archive does NOT have Release file (I have not used apt-secure, file scheme is marked as trusted)

As of my current progress with man apt_preferences results of apt-get install are still puzzling.

OP:

Of links web search helped me to get only relevant was Is there some searching order between the added repositories?, which states info about order of same versions.

I'm learning to set up Debian archive, I've skimmed through man pages apt, apt-get, apt.conf, sources.list. Not seen info about order more than mentioned in the above QA link.

My steps. I've done apt-get update then apt-get install -d package1, package2, etc. I've copied deb files from apt cache to liveISO booted PC, set up Debian archive and has been doing apt-get install package1, etc on second one.

When I've completely removed sources and wrote only local file scheme line to /etc/apt/sources.list (following by apt-get update), all of more than a dozen of packages got successfully installed from local.

But when I added same line with local file scheme in /etc/apt/sources.list while original deb schemes remained in /etc/apt/sources.list.d, for one package (one of those mentioned in paragraph above) I’ve noted apt tried to download and install version from deb scheme even though it was of smaller number. As I’ve recently downloaded deb files from same deb archives as in liveISO sources I assume lesser number indeed means older version.

What could be the reason for apt-get prioritizing older version?

2
  • What does apt policy questionable say (replacing questionable with the name of your questionable package)? Commented Oct 14, 2023 at 16:04
  • @StephenKitt, clean reperformance showed result as per docs (preferences). Something else effected additionally in my initial case, maybe I'll dig more later and post more info. Thanks. Commented Oct 14, 2023 at 18:02

1 Answer 1

0

In general, many packages are inter-dependent (meaning they depend on other separate packages), for example package "A" depends on "B" and "C". Sometimes a package (e.g. "B") gets updated in a way that might break one of the packages that depends on it (e.g. "A"). Until all the depending packages are updated themselves to accomodate the changes in their dependencies, you may not want to update the dependency.

In this example, if "A" depends on "B" and "C", but "B" get updated in a way that breaks "A" (for example if one of the methods is changed to require an extra parameter), then until "A" is updated to work with the new version of "B", then B needs to be frozen to the older version to avoid breaking "A".

These dependency chains can get very complicated, and are the main reason why fancy dependency management systems like apt are needed, as well as virtual environments like Anaconda what allow whole mutually incompatible dependency subsets to co-exist.

1
  • 1
    Good point, I've overloooked that my case is simple, no dependencies (coincidence?), I've updated the question to reflect that. Thanks, your answer pushed me in the right direction I hope! Commented Oct 14, 2023 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .