diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-27 13:32:58 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-27 13:32:58 +0100 |
commit | a8753078367df0c41f2de081f5936b7eb6830d6c (patch) | |
tree | 70cf551e8c4b27110dc364c33235cb2ebc45f0ad /examples/pysolv | |
parent | edcec4ecdf908b5eed1a930a821980e095acd60b (diff) | |
download | libsolv-a8753078367df0c41f2de081f5936b7eb6830d6c.tar.gz libsolv-a8753078367df0c41f2de081f5936b7eb6830d6c.tar.bz2 libsolv-a8753078367df0c41f2de081f5936b7eb6830d6c.zip |
xfileno doesn't exist anymore, use fileno() instead
Diffstat (limited to 'examples/pysolv')
-rwxr-xr-x | examples/pysolv | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/pysolv b/examples/pysolv index 0036dbe..0285e4d 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -646,7 +646,7 @@ if cmd == 'search': sel = pool.Selection() di = pool.Dataiterator(0, solv.SOLVABLE_NAME, args[0], Dataiterator.SEARCH_SUBSTRING|Dataiterator.SEARCH_NOCASE) for d in di: - sel.add_raw(Job.SOLVER_SOLVABLE, d.solvid) + sel.add_raw(Job.SOLVER_SOLVABLE, d.solvid) if repolimiter: sel.limit(repolimiter) for s in sel.solvables(): @@ -916,13 +916,13 @@ if cmd == 'install' or cmd == 'erase' or cmd == 'up' or cmd == 'dup' or cmd == ' ts.addErase(rpmdbid) elif type == Transaction.SOLVER_TRANSACTION_INSTALL: f = newpkgsfp[p.id] - h = ts.hdrFromFdno(solv.xfileno(f)) - os.lseek(solv.xfileno(f), 0, os.SEEK_SET) + h = ts.hdrFromFdno(f.fileno()) + os.lseek(f.fileno(), 0, os.SEEK_SET) ts.addInstall(h, p, 'u') elif type == Transaction.SOLVER_TRANSACTION_MULTIINSTALL: f = newpkgsfp[p.id] - h = ts.hdrFromFdno(solv.xfileno(f)) - os.lseek(solv.xfileno(f), 0, os.SEEK_SET) + h = ts.hdrFromFdno(f.fileno()) + os.lseek(f.fileno(), 0, os.SEEK_SET) ts.addInstall(h, p, 'i') checkproblems = ts.check() if checkproblems: @@ -931,14 +931,14 @@ if cmd == 'install' or cmd == 'erase' or cmd == 'up' or cmd == 'dup' or cmd == ' ts.order() def runCallback(reason, amount, total, p, d): if reason == rpm.RPMCALLBACK_INST_OPEN_FILE: - return solv.xfileno(newpkgsfp[p.id]) + return newpkgsfp[p.id].fileno() if reason == rpm.RPMCALLBACK_INST_START: print "install", p if reason == rpm.RPMCALLBACK_UNINST_START: # argh, p is just the name of the package if p in erasenamehelper: p = erasenamehelper[p] - print "erase", p + print "erase", p runproblems = ts.run(runCallback, '') if runproblems: print runproblems |