rpmteDBOffset() is perfectly legal for TR_ADDED too, fix the docs
rpmteDBOffset() simply returns zero for non-installed packages, which is actually useful for determining whether a TR_ADDED package has already been installed or not, rpm even relies on this. Remove a couple of other questionable TR_REMOVED comments too.
This commit is contained in:
parent
62b6ec76e4
commit
c54581ce18
|
@ -167,23 +167,23 @@ void rpmteCleanProblems(rpmte te);
|
|||
void rpmteCleanDS(rpmte te);
|
||||
|
||||
/** \ingroup rpmte
|
||||
* Set dependent element of TR_REMOVED transaction element.
|
||||
* Set dependent element of transaction element.
|
||||
* @param te transaction element
|
||||
* @param depends dependent transaction element
|
||||
*/
|
||||
void rpmteSetDependsOn(rpmte te, rpmte depends);
|
||||
|
||||
/** \ingroup rpmte
|
||||
* Retrieve dependent element of TR_REMOVED transaction element.
|
||||
* Retrieve dependent element of transaction element.
|
||||
* @param te transaction element
|
||||
* @return dependent transaction element
|
||||
*/
|
||||
rpmte rpmteDependsOn(rpmte te);
|
||||
|
||||
/** \ingroup rpmte
|
||||
* Retrieve rpmdb instance of TR_REMOVED transaction element.
|
||||
* Retrieve rpmdb instance of transaction element.
|
||||
* @param te transaction element
|
||||
* @return rpmdb instance
|
||||
* @return rpmdb instance (0 if not installed))
|
||||
*/
|
||||
int rpmteDBOffset(rpmte te);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* - te.PkgFileSize() Return no. of bytes in package file (approx).
|
||||
* - te.Parent() Return the parent element index.
|
||||
* - te.Problems() Return problems associated with this element.
|
||||
* - te.DBOffset() Return the Packages database instance number (TR_REMOVED)
|
||||
* - te.DBOffset() Return the Packages database instance number
|
||||
* - te.Key() Return the associated opaque key, i.e. 2nd arg ts.addInstall().
|
||||
* - te.DS(tag) Return package dependency set.
|
||||
* @param tag 'Providename', 'Requirename', 'Obsoletename', 'Conflictname'
|
||||
|
@ -220,7 +220,7 @@ static struct PyMethodDef rpmte_methods[] = {
|
|||
{"Problems",(PyCFunction)rpmte_Problems, METH_NOARGS,
|
||||
"te.Problems() -- Return problems associated with this element."},
|
||||
{"DBOffset",(PyCFunction)rpmte_DBOffset, METH_NOARGS,
|
||||
"te.DBOffset() -- Return the Package's database instance number.\n\nTR_REMOVED only"},
|
||||
"te.DBOffset() -- Return the Package's database instance number.\n"},
|
||||
{"Failed", (PyCFunction)rpmte_Failed, METH_NOARGS,
|
||||
"te.Failed() -- Return if there are any related errors."},
|
||||
{"Key", (PyCFunction)rpmte_Key, METH_NOARGS,
|
||||
|
|
Loading…
Reference in New Issue