Skip to content

Commit

Permalink
Save and restore original transaction flags in wrapper test() method
Browse files Browse the repository at this point in the history
...and here lies the key to the mystery of yum needing to repopulate
the transaction after a test-run, doh :)
  • Loading branch information
pmatila committed Feb 10, 2011
1 parent b433c4c commit 72143a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpmUtils/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ def test(self, cb, conf={}):
"""tests the ts we've setup, takes a callback function and a conf dict
for flags and what not"""

origflags = self.getTsFlags()
self.addTsFlag(rpm.RPMTRANS_FLAG_TEST)
# FIXME GARBAGE - remove once this is reimplemented elsehwere
# KEEPING FOR API COMPLIANCE ONLY
if conf.get('diskspacecheck') == 0:
self.ts.setProbFilter(rpm.RPMPROB_FILTER_DISKSPACE)
tserrors = self.ts.run(cb.callback, '')
self.ts.setFlags(origflags)

reserrors = []
if tserrors:
Expand Down

0 comments on commit 72143a2

Please sign in to comment.