APT/Repo: identifying what package a deb file belongs to?

If none of the more specific forums is the right place to ask

APT/Repo: identifying what package a deb file belongs to?

Postby Argus » 2018-02-07 05:37

Hi guys. I've searched the man pages for apt, as well as searched online in vain: I'd like to identify what package a particular deb file belongs to in the repo, preferably in some kind of scriptable way, or else download specific deb files (not packages) using apt.

The specific use-case that I have is that I want to use apt to download-only into my cache common packages that I might need / want to install offline, using the data from the debian package popularity contest. There are lists of what .deb files are contained on the official DVD's here: https://cdimage.debian.org/debian-cd/cu ... /list-dvd/ but unfortunately they list the names of all the individual deb files, and not the packages themselves.

Is there an alternative list that lists package names, or a way to lookup the corresponding package for a particular deb file?
Alternatively, if there is a way to download specific deb files (not packages) using apt or some similar tool able to process a long list of .deb files I want to download, I'm open to this as well.
Argus
 
Posts: 20
Joined: 2017-12-03 01:19

Re: APT/Repo: identifying what package a deb file belongs to

Postby bw123 » 2018-02-07 06:17

Not sure exactly what you're looking for, this?

Code: Select all

$ dpkg-deb -f accountwizard_4%3a16.04.3-4~deb9u1_amd64.deb Package
accountwizard




hmmm, no that won't work if the file isn't available... sounds like you want all the pkgs one or more installation cds, so why not just download the .iso and copy them?
Last edited by bw123 on 2018-02-07 06:36, edited 1 time in total.
User avatar
bw123
 
Posts: 3184
Joined: 2011-05-09 06:02
Location: TN_USA

Re: APT/Repo: identifying what package a deb file belongs to

Postby Argus » 2018-02-07 06:29

Ah! That looks like what I want, but I just noticed that I'd have to have the deb file downloaded already, which kind of defeats the point: I'd like to download all of the deb files contained within that dvd-list manually, whether by downloading the containing package with apt, or just somehow searching for and downloading the individual debs in the repos directly (in an automated way, of course).

I was thinking of something like "apt search-deb <deb file>" and "apt download-only-deb <.deb file>"
Argus
 
Posts: 20
Joined: 2017-12-03 01:19

Re: APT/Repo: identifying what package a deb file belongs to

Postby bw123 » 2018-02-07 06:38

Why download them manually? just download the installer iso, mount it and look in /pool and they should all be there alphabetically.
User avatar
bw123
 
Posts: 3184
Joined: 2011-05-09 06:02
Location: TN_USA

Re: APT/Repo: identifying what package a deb file belongs to

Postby Argus » 2018-02-07 07:07

bw123 wrote:Why download them manually? just download the installer iso, mount it and look in /pool and they should all be there alphabetically.


Ah! I suppose that's a good approach too!

I was able to answer my own question though-- I found a better list of the statistics here, which uses package names: https://popcon.debian.org/main/by_inst
Argus
 
Posts: 20
Joined: 2017-12-03 01:19

Re: APT/Repo: identifying what package a deb file belongs to

Postby Thorny » 2018-02-07 09:53

Unless you are meaning meta packages, the .deb file, as you call it, is the package.

After you have downloaded all those packages, you will have a static (single point in time) cache and as soon as any of the packages have been upgraded, your cache will only have the old version. You would still have to connect to the repositories to keep your system up to date, in other words, upgraded for security.

But, I don't understand why the popcorn list you mention is any more useful than what bw123 suggested which has them in alphabetical order.

Perhaps I misunderstand what you are trying to accomplish but generally it is better to keep a system updated and upgraded and let the package manager you choose to use handle that for you.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40


Return to General Questions

Who is online

Users browsing this forum: vejnovic and 5 guests

fashionable