comparison bin/listcachedb.py @ 425:b0179962ce26 treepkg-status

add helper tool to list content of a cache db
author Bjoern Ricks <bricks@intevation.de>
date Wed, 28 Jul 2010 07:35:54 +0000
parents
children
comparison
equal deleted inserted replaced
424:a2ba58ffbfbe 425:b0179962ce26
1 #! /usr/bin/python
2 # Copyright (C) 2010 by Intevation GmbH
3 # Authors:
4 # Bjoern Ricks <bjoern.ricks@intevation.de>
5 #
6 # This program is free software under the GPL (>=v2)
7 # Read the file COPYING coming with the software for details.
8
9 from optparse import OptionParser
10
11 import treepkgcmd
12 from treepkg.info.data import CacheDb
13
14 def main():
15 parser = OptionParser()
16 parser.add_option("--db", help=("path to the CacheDb"))
17 options, args = parser.parse_args()
18
19 cachedb = CacheDb(options.db)
20 packages = cachedb.get_packages()
21 for package in packages:
22 print "============================="
23 print "name: %s" % package.name
24 print "============================="
25 print "binary: %s" % package.filename
26 print "source: %s" % package.sourcepath
27 print "arch: %s" % package.arch
28 print "md5sum: %s" % package.md5sum
29
30 if __name__ == "__main__":
31 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)