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.
- 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:
d056df28c33f77c3146d7214b2e0a2dc50fb2863
- 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...)
- 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
- 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