Package: dgit
Version: 1.21
Severity: wishlist

I would like dgit clone to be able to give you `the source for the
package I am running'.  (It gives you sid by default.)  This involves
knowing the relevant suite, at the very least.

AFAICT this can be done as follows:

Run `apt-cache madison SOURCEPACKAGE'.  Parse the output, discarding
non-matching entries (since binary package entries may appear too).
Perhaps check that the version number matches the installed version.

Extract the URL.  Look in the apt cache(!) to find the InRelease or
Release file.  Extract the `Suite' field.  Extract the `Origin' field
too, and look it up in the dgit config to map it to a dgit distro.

A problem with this is how to know whether the InRelease file is
accurate.  It probably doesn't matter very much if it's not up to date
(since it was at least up to date enough to get the package installed,
if apt installed it).  But what if it is broken somehow, or the
signature didn't verify ?

Also, going behind apt's back like this to look at the cache is pretty
ugly.  But if dgit downloads the file itself, this would still require
dgit to verify the signature somehow.

Ian.

-- 
Ian Jackson <[email protected]>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to