Re: Is there an easy way to get the latest version number of a source package that is available?
On Mon, Jun 27, 2022 at 10:44:25PM +0100, Tim Woodall wrote:
> On Mon, 27 Jun 2022, Roberto C. S?nchez wrote:
>
> > On Mon, Jun 27, 2022 at 03:31:01PM +0100, Tim Woodall wrote:
> > > Hi,
> > >
> > > apt-get --only-source --download-only source <package>
> > >
> > > will download the latest version of the source package.
> > >
> > > Is there a one liner that will give me the version of the package
> > > (including the epoch) without downloading the package and parsing the
> > > dsc?
> > >
> > If you are not opposed to installing the devscripts package, then you
> > can do this:
> >
> > $ rmadison -u debian -a source -s unstable firefox-esr
> > firefox-esr | 91.10.0esr-1 | unstable | source
> >
>
> Thanks! And that has given me another hint:
>
> $ apt-cache madison openssh
> openssh | 1:9.0p1-1 | http://aptmirror17.home.woodall.me.uk/local bullseye/main Sources
> openssh | 1:9.0p1-1~tjw11r1 | http://aptmirror17.home.woodall.me.uk/local bullseye/main Sources
> openssh | 1:8.4p1-5 | http://ftp.uk.debian.org/debian bullseye/main Sources
> openssh | 1:7.9p1-10+deb10u1 | http://security.debian.org buster/updates/main Sources
> openssh | 1:7.4p1-10+deb9u7 | http://ftp.uk.debian.org/debian stretch/main Sources
> openssh | 1:7.9p1-10+deb10u2 | http://ftp.uk.debian.org/debian buster/main Sources
> openssh | 1:8.4p1-5 | http://ftp.uk.debian.org/debian stable/main Sources
> openssh | 1:8.4p1-5 | http://ftp.uk.debian.org/debian testing/main Sources
> openssh | 1:9.0p1-1 | http://ftp.uk.debian.org/debian testing/main Sources
> openssh | 1:8.4p1-5 | http://ftp.uk.debian.org/debian sid/main Sources
> openssh | 1:9.0p1-1 | http://ftp.uk.debian.org/debian sid/main Sources
>
> That shouldn't be too hard to parse.
>
> I didn't know what madison was but I recalled seeing it in the manpage.
>
> I'll need to investigate rmadison. Might be just what I need assuming it
> can also support my local repo. Doesn't honour my apt proxy setting so
> doesn't work out of the box for me.
>
The usefulness of 'apt-cache madison' versus 'rmadison' depends on what
you mean by "lastest available version". If you mean "latest available
version from the sources configured on my system", then 'apt-cache
madison' will do just that. If you mean "latest available version in
the Debian archive", then you need 'rmadison'.
Regards,
-Roberto
--
Roberto C. Sánchez
Reply to: