Commit Graph

20 Commits

Author SHA1 Message Date
Pavlina Moravcova Varekova 34b61a1f82 Fix number of references on spec_Type (#114)
After creating a specPkg from a spec file we must increase spec file
reference counter. Otherwise spec file may be accidentally deallocated
and usage of SpecPkg can cause an error.
2017-02-23 14:03:10 +02:00
Panu Matilainen a71a7981cc Revert the ds, ts, fi and spec python object creation commits
- Hasty push-finger syndrom, while its not exactly plain wrong to
  do things this way, it doesn't really make sense for these types
  either. Python's own file object permits reinitialization though,
  so leaving rpm.fd() the way it is now.
- This reverts the following commits:
  d056df28c3
  3f77c3146d
  7214b2e0a2
  dc50fb2863
2011-07-06 08:16:12 +03:00
Panu Matilainen dc50fb2863 Fix/sanitize rpm.spec python object creation
- Specs are not really immutable, move the initialization work into
  tp_init and use PyType_GenericNew for tp_new since we're not
  doing anything special there.
- Eliminate the stupid spec_Wrap() thing and hide specPkg_Wrap()
  out of side (TODO later...)
2011-07-01 12:55:53 +03:00
Panu Matilainen 675bfca5cc Use namespaced names for spec pkg and source opaque typedefs
- Leaving the painful and somewhat pointless exercise of changing
  all the Package and Source references for another rainy day
2010-10-01 13:33:08 +03:00
Panu Matilainen 71eeeb8d5e Add spec package type with access to headers to python rpmb module
- permits python to access parsed headers from spec files
- ticket #14, RhBug:462726
2009-11-19 10:51:23 +02:00
Panu Matilainen 2ba9153bfa Lose the silly specFromSpec()
- its our own private data structure we're accessing here, no need
  for extra wrappers and nothing outside spec-py.c needs this
2009-11-18 17:41:39 +02:00
Panu Matilainen cbad134dd4 Kill off _rpmb.error exception type
- import of _rpmb messes up rpm.error to point to _rpmb.error which we
  do not want
- use ValueError for unparsable spec for now, need to figure something
  saner there still
2009-10-09 09:35:42 +03:00
Panu Matilainen 8169bbde69 Split rpmbuild dependencies to separate _rpmb module
- 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-02 18:31:32 +03:00
Panu Matilainen 36ada6c116 Make object allocation type agnostic
- pass (sub)type down to wrappers
- call subtype tp_alloc() instead of PyObject_New()
- preliminaries for allowing subtyping
2009-09-24 11:42:17 +03:00
Panu Matilainen 2a8da8606f Add type checking macros for all rpm python type objects 2009-09-23 00:06:13 +03:00
Panu Matilainen 14d5aaedcb Lose the empty doxygen markers
- nothing wrong with comments but empty comment placeholders
  are not exactly useful
2009-09-22 22:42:06 +03:00
Panu Matilainen ed557bbcf0 Make all python object creation wrappers return PyObject pointers
- this way the only place where casts are needed are in the wrapper itself
2009-09-22 21:24:55 +03:00
Panu Matilainen ae1fd3fa47 Make the python object structures opaque 2009-09-22 16:47:07 +03:00
Panu Matilainen 9ce13e09ef Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
2007-12-08 14:02:32 +02:00
Ralf Corsépius abeea80a38 Use #include <x.h> syntax to include public headers. 2007-11-23 06:46:19 +01:00
Ralf Corsépius 14d434925b Include "rpmbuild.h" instead of <rpmbuild.h>. 2007-10-28 06:49:54 +01:00
Panu Matilainen 2c2538d726 Rename Spec -> rpmSpec for namespacing 2007-09-21 15:23:02 +03:00
Ralf Corsépius 3aad15624e Remove split tags. 2007-09-11 15:28:26 +02:00
pauln da9a1be04c Begin lint fixes for spec-py
CVS patchset: 7165
CVS date: 2004/03/11 07:03:40
2004-03-11 07:03:40 +00:00
pauln aeab205719 Initial rpm.spec implementation
CVS patchset: 7160
CVS date: 2004/03/10 22:44:29
2004-03-10 22:44:29 +00:00