1

I am running Debian testing/jessie with a few packages (I can count on my fingers) from unstable/sid and a couple from experimental (browsers).

As asked by Faheem, here's the output of apt-cache policy .

$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://debian.ec.as6453.net/debian/ experimental/main Translation-en
 500 http://debian.ec.as6453.net/debian/ experimental/contrib Translation-en
   1 http://debian.ec.as6453.net/debian/ experimental/contrib amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=contrib
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ experimental/main amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ unstable/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ unstable/main Translation-en
 500 http://debian.ec.as6453.net/debian/ unstable/contrib Translation-en
   1 http://debian.ec.as6453.net/debian/ unstable/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ unstable/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib
     origin debian.ec.as6453.net
   1 http://debian.ec.as6453.net/debian/ unstable/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://security.debian.org/ jessie/updates/main Translation-en
 600 http://security.debian.org/ jessie/updates/main amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 500 http://debian.ec.as6453.net/debian/ jessie-updates/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/main Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/contrib Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie-updates/non-free amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=non-free
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie-updates/contrib amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=contrib
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie-updates/main amd64 Packages
     release o=Debian,a=testing-updates,n=jessie-updates,l=Debian,c=main
     origin debian.ec.as6453.net
 500 http://debian.ec.as6453.net/debian/ jessie/non-free Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie/main Translation-en
 500 http://debian.ec.as6453.net/debian/ jessie/contrib Translation-en
 600 http://debian.ec.as6453.net/debian/ jessie/non-free amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=non-free
     origin debian.ec.as6453.net
 600 http://debian.ec.as6453.net/debian/ jessie/contrib amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=contrib
     origin debian.ec.as6453.net
 600 http://debian.ec.as6453.net/debian/ jessie/main amd64 Packages
     release o=Debian,a=testing,n=jessie,l=Debian,c=main
     origin debian.ec.as6453.net
Pinned packages:

I know three commands to find versions of a package but both these commands take cognizance of the fact of what is there in my /etc/apt/sources.list and then tells/shares it. I am taking wordpress as an example to share and show:

$ aptitude versions wordpress
Package python-wordpresslib:              
p   1.1-1                                      testing,unstable           600 

Package ruby-omniauth-wordpress:
p   0.2.1-1                                    testing,unstable           600 

Package wordpress:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-l10n:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-openid:
p   3.3.4-1                                    testing,unstable           600 

Package wordpress-shibboleth:
p   1.4-2                                      testing,unstable           600 

Package wordpress-theme-twentyfourteen:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-theme-twentythirteen:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-theme-twentytwelve:
p   3.9.2+dfsg-1                               testing                    600 
p   4.0+dfsg-1                                 unstable                   1   

Package wordpress-xrds-simple:
p   1.1-1                         

As can be seen this is not so accurate, so we go to the other command :-

$ apt-show-versions -a wordpress
wordpress not installed (available for: all)

yes it's not installed so it doesn't show me everything. Let me do a stand-in example instead which is installed to show the info. it has :-

$ apt-show-versions -a iceweasel
iceweasel:amd64 31.0-3 install ok installed
iceweasel:amd64 31.0-3      jessie       debian.ec.as6453.net
No testing-updates version
iceweasel:amd64 31.1.0esr-1 unstable     debian.ec.as6453.net
iceweasel:amd64 32.0-1      experimental debian.ec.as6453.net
iceweasel:amd64/jessie 31.0-3 uptodate

and lastly apt-cache policy.

$ apt-cache policy wordpress
wordpress:
  Installed: (none)
  Candidate: 3.9.2+dfsg-1
  Version table:
     4.0+dfsg-1 0
          1 http://debian.ec.as6453.net/debian/ unstable/main amd64 Packages
     3.9.2+dfsg-1 0
        600 http://debian.ec.as6453.net/debian/ jessie/main amd64 Packages

Now this misses out on listing from stable. Does anybody know of a utility which does the same work, takes few seconds to a minute to figure out what versions of a package are listed in the PTS against which release and share that info.

If there is no utility but instead a shell script is needed to do the same, how the shell script would look/be needed. It basically would need to grab the versions info. and which track (stable,testing, unstable, experimental) they follow and give the answer to user.

I tried to find either a utility or a shell script but failed miserably. If anybody has any idea, please let me know.

3

1 Answer 1

0

This is a bit long for a comment, so here goes...

With regard to apt-show-versions, I also do not have wordpress installed, but I get much more information than you do, using the same command. Did you paste the whole output?

root@orwell:/home/faheem# apt-show-versions -a wordpress
Not installed
wordpress 3.6.1+dfsg-1~deb6u4 squeeze  debian.lcs.mit.edu
wordpress 3.6.1+dfsg-1~deb7u3 wheezy   debian.lcs.mit.edu
wordpress 3.6.1+dfsg-1~deb7u4 wheezy   security.debian.org
No stable-updates version
wordpress 3.9.2+dfsg-1        testing  debian.lcs.mit.edu
wordpress 3.9.2+dfsg-1        unstable debian.lcs.mit.edu
No experimental version
wordpress not installed

You write with regard to apt-cache policy

Now this misses out on listing from stable.

No, it doesn't. If it misses something, you don't have that information available. I have

root@orwell:/home/faheem# apt-cache policy wordpress
wordpress:
  Installed: (none)
  Candidate: 3.6.1+dfsg-1~deb7u4
  Version table:
     3.9.2+dfsg-1 0
         50 http://debian.lcs.mit.edu/debian/ testing/main amd64 Packages
         50 http://debian.lcs.mit.edu/debian/ unstable/main amd64 Packages
     3.6.1+dfsg-1~deb7u4 0
        500 http://security.debian.org/ wheezy/updates/main amd64 Packages
     3.6.1+dfsg-1~deb7u3 0
        500 http://debian.lcs.mit.edu/debian/ wheezy/main amd64 Packages
     3.6.1+dfsg-1~deb6u4 0
        500 http://debian.lcs.mit.edu/debian/ squeeze/main amd64 Packages

What version of Debian are you running? Also, paste the contents of apt-cache policy into your question.

5
  • as far as apt-show-versions goes, this is the way output is at my end. It's possible that my package may be using some old configuration and hence not showing apt-show-versions functionality that yours is showing. I am running apt-show-versions version 0.22.4
    – shirish
    Sep 11, 2014 at 3:32
  • I purged and re-installed apt-show-versions with no different result. It's possible you are getting those values from somewhere else.
    – shirish
    Sep 11, 2014 at 5:08
  • ah, got it. It's a bug in 0.24 due to multi-arch. See bugs.debian.org/cgi-bin/bugreport.cgi?bug=725107
    – shirish
    Sep 11, 2014 at 6:42
  • There is no version 0.24. Do you mean 0.22.4? It seems you are running unstable. This is not recommended for non-experts. I personally run stable. My version of apt-show-versions is 0.20. Sep 11, 2014 at 8:40
  • yup, sorry it is 0.22.4 .
    – shirish
    Sep 11, 2014 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .