On Tue, Oct 25, 2016 at 1:49 PM, Michael Lange <klappn...@freenet.de> wrote: > > Nice. After these suggestions I hastily put together a small python > script, that might come close to what Raju wants: > > #!/usr/bin/python > > from commands import getoutput > > allpkgs = getoutput('apt-show-versions -b').splitlines() > > jessie = [p for p in allpkgs if 'jessie' in p] > stretch = [p for p in allpkgs if 'stretch' in p] > sid = [p for p in allpkgs if 'sid' in p] > > onlyjessie = [p for p in jessie if not p in (stretch+sid)] > for p in onlyjessie: > print(p.split(':')[0]) >
Thanks for the script. But I do not think it does what I want. For example, currently there is a python3.4 package installed on my system. % dpkg -l python3.4 | cut -c 1-72 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Tri |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-=========================== ii python3.4 3.4.2-1 amd64 Interactive high-level obje The output of apt-show-versions does not contain the word jessie. So it will not get picked up in the "jessie" variable of your script. % apt-show-versions -b | grep "\<python3.4\>" python3.4:amd64 3.4.2-1 installed: No available version in archive python3.4-minimal:amd64 3.4.2-1 installed: No available version in archive I think what I need is something that looks against the repository itself. For example % rmadison python3.4 debian: python3.4 | 3.4.2-1 | jessie-kfreebsd | source, kfreebsd-amd64, kfreebsd-i386 python3.4 | 3.4.2-1 | jessie | source, amd64, arm64, armel, armhf, i386, mips, mipsel, powerpc, ppc64el, s390x new: which shows that this package is available only in Jessie but no corresponding version in Stretch or Sid. But rmadison itself is slow. So I need something that caches this information on the local computer for all the packages. raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog