[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

List all available packages



Dear all,

is it possible to search for all available packages from debian backports with version numbers? I wasn't able to do so on backports.org because I couldn't enter neither nothing nor "*" in the package search field.

As a workaround I have written a python script. I attach it as maybe you might find it useful. Run it with "apt-cache dumpavail | python <NameOfScript>.py". Of course this works only if you enabled backports on your system and called "apt-get update" before.

However I'd be glad to have a simpler - and preferably online - solution.

Best regards,

Hans-Peter

--- Begin of Script ---

#/usr/bin/python
# "Run with apt-cache dumpavail | python <Name of you script>.py"

import sys

lines = sys.stdin.readlines()

packageline = ""
newparagraph = True

for line in lines:

   if newparagraph:
      packageline = line.strip()
      newparagraph = False
      continue

   if line.strip() == "":
      newparagraph = True
      continue

   if line.startswith("Version:") and "~bpo" in line:
      sys.stdout.write(packageline + ''.join([' ' for i in range(0,45-len(packageline))]) + line)

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

Reply to: