2

For example i have this apt ubuntu (21.10) repository for postgres in my sources.list.d:

deb http://apt.postgresql.org/pub/repos/apt/ impish-pgdg main 13

Which results in apt-get update to fetch:

Hit:4 http://apt.postgresql.org/pub/repos/apt impish-pgdg InRelease
Get:5 http://apt.postgresql.org/pub/repos/apt impish-pgdg/main amd64 Packages [247 kB]

By default the shown packages for example via apt-cache policy postgresql-plpython3-13 only show the latest minor version of that package (= 13.5):

postgresql-plpython3-13:
  Installed: (none)
  Candidate: 13.5-1.pgdg100+1
  Version table:
     13.5-1.pgdg100+1 500
        500 http://apt.postgresql.org/pub/repos/apt impish-pgdg/main amd64 Packages

I took a deep look inside the repository structure and found various older minor versions for those packages located in: http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-13/

A part of the directory structure is like:

dists/
  impish-pgdg/
  (...)
    13/
    main/
    InRelease
    Release
    (...)
pool/
  main/
    p/
    (...)
      postgresql-13/
      (...)
        postgresql-plpython3-13_13.5-1.pgdg100%2B1_amd64.deb
        (...)
  • Question: How is the algorithm where apt searches for packages? How can i tell apt or configure my source list entry to show/remember all minor versions of a package available on the repository?

For example the package above in version 13.1, not 13.5?

1 Answer 1

1

Really APT first scans dists folder. In your case it is http://apt.postgresql.org/pub/repos/apt/dists/impish-pgdg/ .

It fetches InRelease to determine available components:

Components: main 9.6 10 11 12 13 14

So you will get the packages defined in Packages file of the main, 9.6, 10, 11, 12, 13, 14 versions.

The Packages file for 13 exactly contain fields:

Version: 13.5-1.pgdg21.10+1

so this is why 13.5 is available from main 13 sources.list line.

2
  • So this means there is no way to get the other (older) versions from the subdirectory inside pool to be listed by apt when these versions are not part of the Packages file(s)? Feb 4 at 9:51
  • Yes, this is how it works. See details at wiki.debian.org/DebianRepository/Format .
    – N0rbert
    Feb 4 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.