summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-05Push the interpretation of ts.run() result code to python sidePanu Matilainen2-29/+18
- at least this lets sub-typers override the hysterical return values
2009-10-05Add minimal python wrapping for rpmProblem objectsPanu Matilainen3-4/+113
- for now, only expose the basic attributes and return problem string representation on %s - return problem objects on rpmps iteration
2009-10-05Ugh, forgot to add the new _rpmb module to gitPanu Matilainen1-0/+35
- should've been in commit 8169bbde6934637ed7be58e18103330c1d5e4546
2009-10-02Push most work of ts.addErase() over to pythonPanu Matilainen2-30/+24
- minimize the stuff done in C: rpmtsAddEraseElement() only cares about header, so that's what we accept on C-level bindings - on python side, handle db recno's and labels like we've always done, additionally accept match iterators and plain headers too
2009-10-02Return error code from rpmtsAddEraseElement() failurePanu Matilainen2-1/+4
- trying to remove non-installed header counts as an error
2009-10-02Permit file objects and file names to ts.addInstall()Panu Matilainen1-1/+10
- largely removes the need for the klunky ts.hdrFromFdno()
2009-10-02Push most work of ts.addInstall() over to pythonPanu Matilainen2-31/+20
- minimize the stuff done in C: require all arguments in final format and report status back with a boolean, handle everything else including keylist refcounting hack over to python side
2009-10-02Oops, missing self in bunch of calls... been too long since writing Python ;)Panu Matilainen1-5/+5
2009-10-02Push the rpmtsGetKeys() stuff over to python completelyPanu Matilainen4-69/+10
- trivially implemented in python by iterating over transaction element keys, we dont need no stinking extra librpm APIs for this
2009-10-02Add rpmlog() wrapper to python bindingsPanu Matilainen1-0/+14
2009-10-02Teach python about RPMDBI_LABELPanu Matilainen1-0/+1
2009-10-02Split rpmbuild dependencies to separate _rpmb modulePanu Matilainen7-21/+23
- installers and the like dont need the pile of poo called librpmbuild for anything, avoid dragging it in needlessly - import _rpmb into rpm namespace if available but dont complain if its not there - arrange ts.parseSpec() compatibility on python side by dynamically importing _rpmb if possible
2009-10-02Move ts flag & color setting to python sidePanu Matilainen2-61/+24
2009-10-02Add a dummy python-level transaction set class, use it alwaysPanu Matilainen6-14/+12
- move the rpm.ts() vs rpm.TransactionSet() compatibility to python - this will enable doing only the lowest level stuff in C and rest in python
2009-10-01Add python method for retrieving header "instance" (db recno) numberPanu Matilainen1-0/+7
2009-10-01Deprecation tweaksPanu Matilainen5-18/+10
- use PyErr_WarnEx() for better control and leave the tracking up to python - use PendingDeprecationWarning for now - document the replacing functionality in the deprecation messages - make hdr.sprintf() just an alias to hdr.format() without deprecating, at least for now it'd be only a gratuitous incompatible change on python side
2009-10-01Oops, these are mappings, not dicts...Panu Matilainen2-2/+2
2009-10-01Generalize python ts flags and colors set/get fooPanu Matilainen1-59/+93
- make flags, vsflags, color, prefcolor (previously not available) and probFilter appear as internal attributes of ts objects, each with their own setter/getter methods - make the old custom set/get methods access the internal attributes instead - keeping them "internal only" leaves room for adding further sanity checking and nicer interface on python side while giving direct access bits for those who want it - not deprecating the old get/set methods at least yet...
2009-10-01Fix couple of recently introduced compiler warningsPanu Matilainen2-2/+2
2009-10-01Include structmembers.h centrally from rpmsystem-py.hPanu Matilainen3-4/+2
- pretty much everything might need this...
2009-10-01Add API for setting preferred transaction file colorPanu Matilainen2-0/+18
- not strictly needed as it gets its default from a macro but .. shrug
2009-10-01Make python ts rootDir appear as a read-only attributePanu Matilainen1-1/+6
- there's no need to change the rootdir after object creation, better not permit at all
2009-10-01Add python getter for transaction idPanu Matilainen1-0/+6
2009-10-01Eliminate python ts scriptFd kludgeryPanu Matilainen1-31/+24
- make the scriptFd appear as regular attribute by providing a setter method for it, permit any file object to be used and allow disabling too - readonly for now as we dont have rpmfd wrapped yet - remove now unnecessary custom get/setattr functions
2009-09-30Deprecate custom foo.count() methods, support len() insteadPanu Matilainen2-10/+16
2009-09-30Eliminate unused python ts iterator filter stuffPanu Matilainen1-6/+1
- iterators dont take arguments so there's no convenient way to filter while iterating, let python users filter themselves (like they've always been doing)
2009-09-30Take advantage of headerNextTag() in python hdr.keys()Panu Matilainen1-29/+6
- avoids whole lotta unnecessary copying of data, we're only interested in tag numbers here - dont filter out stuff - python consumers can look at i18n data too
2009-09-30Add iterator support to python header objectsPanu Matilainen1-3/+21
2009-09-30Add alternative header iterator methodPanu Matilainen2-10/+26
- we dont always want the actual contents of the tag to be copied on iteration, so add an interface that returns the next tag in the header - this lets callers to decide what to do with the tag and how to retrieve it
2009-09-30Add some flags to rpmtd creationPanu Matilainen1-6/+16
- permit disabling extension retrieval and "raw" (untranslated i18n) tags - always use HEADERGET_ALLOC for data availability sanity
2009-09-30Add beginnings of rpmtd wrappings to pythonPanu Matilainen3-1/+128
- unlike other types, store the C-level td structure directly in the python object, this lets us selectively expose some members directly, avoids having to deal with rpmtd allocation separately and as leaves the reference counting to python as rpmtd's aren't refcounted on C-level
2009-09-30Turn hdrGetHeader() into argument parsing converter interfacePanu Matilainen5-18/+25
2009-09-30Sanitize getattr behavior of header objectsPanu Matilainen1-12/+20
- when generic getattr fails, only try retrieving header tag as attribute if it's a valid tag - clear any python errors if generic getattr failed - split generating a python object from header + tag to an internal helper
2009-09-28Require expected type in PyArg_ParseTupleAndKeywords() alreadyPanu Matilainen1-24/+3
2009-09-28Support numeric expansion in rpm.expandMacro()Panu Matilainen1-5/+11
2009-09-28Push rpm.signalsCaught() to python levelPanu Matilainen2-28/+13
- only implement the bare minimum in C by adding a thin wrapper for rpmsqIsCaught(), the rest can easily be done in python
2009-09-28Implement rpm.readHeaderFromFD() in python instead of CPanu Matilainen3-49/+16
2009-09-28Implement rpm.readHeaderListFromFD() in python instead of CPanu Matilainen4-57/+18
2009-09-28Implement rpmreadHeaderListFromFile() in python instead of CPanu Matilainen3-25/+7
2009-09-28A few cases of Py_RETURN_NONE missed on the first roundPanu Matilainen1-8/+4
2009-09-28Arrange rpm.headerLoad() compatibility on python levelPanu Matilainen3-8/+4
2009-09-28OSGi dependency generator fixes from Alphonse Van Assche (ticket #101)Panu Matilainen1-142/+173
- This patch fix some minor bug, remove unused code and increase drastically the perf by threading execution of tasks and using zip command instead of jar to get meta-data
2009-09-24Enable subtyping on the rest of our type-objectsPanu Matilainen7-7/+8
- not very useful atm as various places return hard-wired built-in types
2009-09-24Eliminate all custom tp_free() type methodsPanu Matilainen4-39/+4
- tp_free()'s purpose is only to free up the memory used by the python object structure, cleaning up our own allocations belongs to tp_dealloc()
2009-09-24Enable subtyping on rpm.ts classPanu Matilainen1-1/+1
2009-09-24Call generic python setattr if not scriptFdPanu Matilainen1-2/+2
- yet more preliminaries for subtyping
2009-09-24tp_setattro() is supposed to return -1 on errorsPanu Matilainen1-1/+1
2009-09-24Call (sub)type tp_free from destructorsPanu Matilainen7-23/+15
- more preliminaries for subtyping - remove pointless NULL checks
2009-09-24Make object allocation type agnosticPanu Matilainen16-43/+43
- pass (sub)type down to wrappers - call subtype tp_alloc() instead of PyObject_New() - preliminaries for allowing subtyping
2009-09-23Remove unnecessary header type checkingPanu Matilainen1-7/+0
- the type is already validated by PyArg_ParseTupleAndKeywords(), no need to doublecheck