Determining archive / suite from `deb` line

Is there an easy way to determine the "Archive", "Suite", "origin" (or whatever else APT uses) just from the deb line?

For example, someone (trusted, of course) gives me this deb line:

deb wheezy main contrib non-free whatever

I add it to sources.list, resolve GPG issue, update, install the packages and I'm almost good to go. Almost, because I'd like to achieve unattended upgrades as well. So I open /etc/apt/apt.conf.d/50unattended-upgrades, and behold:

// Automatically upgrade packages from these origin patterns
Unattended-Upgrade::Origins-Pattern {
        // Archive or Suite based matching:
        // Note that this will silently match a different release after
        // migration to the specified archive (e.g. testing becomes the
        // new stable).
//      "o=Debian,a=stable";
//      "o=Debian,a=stable-updates";
//      "o=Debian,a=proposed-updates";

they want me to use "Archive or Suite based matching".


  • how can I compose/retrieve the necessary information for the pattern?

  • And can I do it prior to adding the line to sources.list (just out of curiosity)?

  • What about deb ftp:// (not sure if it's used) or deb-src?

  • Is there a "plumbing" utility for that?

Note that I'm looking for general explanation of repo structure and the way deb line is read, rather than just URI for current official Debian repo.

2022-07-25 20:46:25
Source Share
Answers: 0