summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22Switch python bindings to use rpm(Dbi)TagVal as appropriatePanu Matilainen9-24/+24
- None of these are true enum uses as the value typically originates from python integers etc.
2010-10-21Fix Python bindings and raise KeyError when there is no index for the given tagFlorian Festi1-2/+7
2010-10-21Fix typo / erroneously deleted lineFlorian Festi1-1/+2
2010-10-21rpmdbKeyIterator: loop over keys in the database indexesFlorian Festi5-0/+185
2010-10-19Python dbMatch() doesn't take (or need) len argument, fix the docsPanu Matilainen1-1/+1
2010-10-13Add python bindings for librpmsignPanu Matilainen3-1/+114
- Similarly to the build-bindings, permit import failures as librpmsign might not be installed and we dont want to force the dependencies into every single installation
2010-10-12Add a python accessor for the source headerEric W. Biederman1-0/+6
Make the source header visible to python code.
2010-10-01And now python bindings are really free of librpmbuild internalsPanu Matilainen1-2/+1
- Just one leftover offender in the form of forgotten type rename from commit 675bfca5cc300105f7859f028cc00ea036e72966
2010-10-01Kill spec.buildRoot from pythonPanu Matilainen1-11/+0
- We /could/ of course add a getter for this but ... sorry folks, what rpm happens to use as buildroot internally isn't anybody elses business.
2010-10-01Use the new spec section getter in python bindingsPanu Matilainen1-20/+13
- Whee, for a change more lines removed than added...
2010-10-01Use the new spec src/pkg API in python instead of direct access to specPanu Matilainen1-9/+12
2010-10-01Use namespaced names for spec pkg and source opaque typedefsPanu Matilainen2-4/+4
- Leaving the painful and somewhat pointless exercise of changing all the Package and Source references for another rainy day
2010-10-01Finish off our librpmbuild API mass-murder by turning everything opaquePanu Matilainen1-0/+1
- These huge structs have no business being visible to the public. Just brute-force split all remaining spec internal structures into another internal header, including where needed. - The only thing accessing these structs outside of librpmbuild is the python spec bindings. Temporarily permit direct access to rpmspec_internal.h until we have the necessary API in place.
2010-10-01Force shared build of python extensionPanu Matilainen1-2/+2
- Other than seeing "does it compile", statically linked python extensions make no sense as they're unusable to python.
2010-10-01Handle enable/disable python to configure.ac more sanelyPanu Matilainen1-2/+0
- Conditionalize the python subdir on toplevel make instead of python subdir makefile.
2010-09-22Use HEADER_MAGIC_FOO enums instead of 0/1 in python header codePanu Matilainen1-2/+2
2010-09-21Avoid stepping on toes of relatives, part 2Panu Matilainen2-10/+10
- Eliminate uses of "class" which is a reserved keyword in C++
2010-09-21Use the new tag type/return type getters everywherePanu Matilainen2-8/+6
- Instead of masking and bitfiddling all over the place, use the new getters to get the exact (enum) type directly. rpmTagGetType() is now unused within rpm but leaving around for backwards compatibility
2010-09-02Permit passing spec parse flags in python tooPanu Matilainen1-4/+4
- The preferred flags default would be RPMSPEC_NONE, but it would break compatibility with older rpm versions where rpm.spec() doesn't accept flags.
2010-09-02Add an experimental low-level build method to python specPanu Matilainen1-1/+18
- This is mostly just a toy for now, but serves as a kind of yardstick for what is missing in librpmbuild to be generally useful for building stuff.
2010-09-02Add the various spec + build flags to pythonPanu Matilainen1-0/+21
2010-09-01Rename freeSpec() -> rpmSpecFree() for namespacingPanu Matilainen1-1/+1
- librpmbuild actually now has what remotely resembles an API, after we broke every single thing there was ;)
2010-09-01Update callers to use the new rpmSpecParse() interfacePanu Matilainen1-20/+8
2010-09-01Spec rootDir is only relevant for building, eliminate from parseSpec()Panu Matilainen1-1/+1
- The whole rootDir seems dubious for build purposes, but in any case its only relevant during the actual build process, not for spec parsing. Set spec->rootDir from buildSpec() for the duration of the build to avoid having to refactor doScript() and all right now.
2010-06-22Fix python ts.check() dependency tuple mungingPanu Matilainen1-1/+1
- braindamage from commit fab2debfe440d677dbd072c3cd73d2c99876e7a5, causing list index out of range for any non-versioned dependency and bogus garbage for the rest, doh...
2010-05-19Handle non-existent dependency sets in python (RhBug:593553)Panu Matilainen1-2/+3
- rpmdsNew() returns NULL if the requested dependency type doesn't exist in the header. The C-side API can handle NULL to all rpmds "methods" and this is how librpm deals with non-existent sets rather than waste memory on for empty ds structures. However the python side wasn't expecting NULL for legal requests (but not setting error either) and thus blowing up with SystemError exception. - Raise TypeError on illegal arguments to rpm.ds constructor, and present non-existent dependency sets as empty rpm.ds objects to python. This lets python callers use iteration over ds items regardless of whether the dependency actually exists or not. The alternative of returning None (or raising exceptions) would break existing code for no particularly good reason.
2010-05-04Rename python module version symbol to __version__, add __version_info__Panu Matilainen2-1/+4
- This seems to be a de-facto standard in python land, as rpm.version hasn't been in any released version we can still change this easily. Suggestion from James Antill.
2010-03-29Remove unused dependency set file reference countPanu Matilainen1-8/+0
- this has never been used for anything at all, there are better things to use our memory for than unused arrays
2010-03-29Remove unused and non-sensible depedency set build-timePanu Matilainen1-8/+0
- Buildtime was never part of rpm version comparison nor should it be, on rpm level the only sensible differentiator between two identical dependencies is the dependency color if any. Other than that, random() just as "appropriate" as build time.
2010-03-29Lose unused RPMSENSE_PATCHESPanu Matilainen1-1/+0
- this was never used by upstream at least, and the "patch rpms" this refers to was abandoned by Suse in favor of deltarpm a long time ago...
2010-03-29Drop "support" for per-scriptlet build-requiresPanu Matilainen1-4/+0
- Rpm has never done anything useful with "BuildRequires(prep): foo" style dependencies other than recorded them in src.rpms, nor is there much point in properly supporting this in the future either - Frees up four more bits from rpmsenseFlags for better uses
2010-03-26Add ds.Instance() method to python bindingsPanu Matilainen1-0/+7
- the naming between header/rpmte/rpmds "instance" is wonderfully inconsistent... oh well
2010-03-26Take advantage of rpmdsCurrent() in python bindingsPanu Matilainen1-6/+1
2010-03-26Change the problem data arrangement for dependency problemsPanu Matilainen1-2/+2
- pkgNEVR in problems is now always the NEVR of the transaction element triggering the problem, and altNEVR is the other affected package, dependency string is stored in the problem string attribute - no user visible changed, except for somebody crazy enough to try to do something other than print the problem message strings - we wouldn't really need to strdup() the pkgNEVR in problems now, but leaving that alone for the moment...
2010-03-26Use the new problem set iterator where it makes more sensePanu Matilainen1-4/+6
2010-03-24Document deprecation of mi.count() and ds.Count().Ville Skyttä2-2/+2
2010-03-24Add RPMBUILD_ISFOO constants to python rpmb module (ticket #123)Panu Matilainen1-0/+6
2010-03-24Add __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)Panu Matilainen1-1/+20
- Objects supporting __len__() use (len > 0) for boolean representation, which normally makes sense but as the match iterator count is often zero despite the iterator actually existing and returning something, and breaks existing code (rpmlint at least) - Adding a __bool__() (known as __nonzero__() in Python < 3) method returning true for non-NULL iterator fixes this and gives more meaningful answers than pre 4.8.0 which simply always returned True
2010-03-22Lose the useless rpmds refcounting debug junk + switchesPanu Matilainen1-1/+1
- get the debug messages out of API, this is what should've been in commit dbdbe8010cd944f026a5a4e5d071eb31d29d81c4
2010-03-22Lose the useless rpmfi refcounting etc debug messages + debug switchesPanu Matilainen1-1/+1
- get the debug messages out of API, this is what should've been in commit dbdbe8010cd944f026a5a4e5d071eb31d29d81c4
2010-03-18Add a new problem type for obsoletesPanu Matilainen1-0/+1
2010-03-15Tell python about RPMTRANS_FLAG_NOCONTEXTSPanu Matilainen1-0/+1
2010-03-13Add Problems() method to python transaction element classPanu Matilainen1-0/+12
2010-03-13Add a helper function for turning rpm problem set into python listPanu Matilainen3-8/+15
2010-02-04Make rpm version available to pythonPanu Matilainen1-0/+2
2009-12-21Eliminate the rpmte tsort info manipulation public APIPanu Matilainen1-35/+0
- its not useful outside the ordering internals and API users have no business messing with it
2009-12-17Move python ts element key refcounting back to C-side of thingsPanu Matilainen2-3/+6
- it's really the C-side that needs this, doing it in C avoids nasty surprises when subclassing rpm.ts - partial revert of commit 92d18d1d7139b37065ea742cfe0e8cee5e9c3500
2009-12-09Fix memleak in python ts.hdrFromFdno()Panu Matilainen1-0/+1
- the python object holds reference to header here, decref the header so it gets freed eventually
2009-12-09Fix a few list-related memleaks in python bindingsPanu Matilainen4-2/+9
- PyList_Append() bumps the object reference count, callers need to explicitly decref them... oops :)
2009-12-07ts.check() is supposed to return empty list when no problemsPanu Matilainen1-5/+1