3e6f877282
The `QueryResult` class ended up being too awkward; having NEVRA strings meant for example that clients would have to parse them. It would be harder to present something like the current `rpm-ostree upgrade` package diff output. Now...I debated quite a while before doing this patch. The thing that's really awful about creating this library is there are *SO MANY* layers. rpm-ostree → libhif → hawkey → libsolv → librpm. It's enough to make one question whether one is actually accomplishing anything or just contributing to a collective insanity... Let's pretend for now it's the former. Closes: https://github.com/projectatomic/rpm-ostree/pull/136
15 lines
286 B
Python
15 lines
286 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)
|
|
qr = RpmOstree.db_query(r, ref, None, None)
|
|
print "Package list: "
|
|
for p in qr:
|
|
print p.get_nevra()
|
|
|