8a5730525e
This will help build release engineering and other types of tools; for example, rather than parsing the output of `db diff`, one should be able to call an API. Initially, this adds the generic infrastructure for a public shared library, with a new function call to do the equivalent of `rpm -qa` on a particular OSTree commit. Closes: https://github.com/projectatomic/rpm-ostree/issues/117 Closes: https://github.com/projectatomic/rpm-ostree/pull/124
15 lines
287 B
Python
15 lines
287 B
Python
#!/usr/bin/env python
|
|
|
|
import sys
|
|
from gi.repository import Gio, OSTree, RpmOstree
|
|
|
|
repopath, ref = sys.argv[1:3]
|
|
|
|
r = OSTree.Repo.new(Gio.File.new_for_path(repopath))
|
|
r.open(None)
|
|
q = RpmOstree.db_query(r, ref, None, None)
|
|
print "Package list: "
|
|
for p in q.get_packages():
|
|
print p
|
|
|