diff options
Diffstat (limited to 'python/depcache.cc')
| -rw-r--r-- | python/depcache.cc | 57 |
1 files changed, 49 insertions, 8 deletions
diff --git a/python/depcache.cc b/python/depcache.cc index ef2240ce..f3b16211 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -528,21 +528,47 @@ static PyObject *PkgDepCacheMarkedReinstall(PyObject *Self,PyObject *Args) static PyMethodDef PkgDepCacheMethods[] = { + {"init",PkgDepCacheInit,METH_VARARGS,"Init the depcache (done on construct automatically)"}, + {"get_candidate",PkgDepCacheGetCandidateVer,METH_VARARGS,"Get candidate version"}, + {"set_candidate",PkgDepCacheSetCandidateVer,METH_VARARGS,"Set candidate version"}, + + // global cache operations + {"upgrade",PkgDepCacheUpgrade,METH_VARARGS,"Perform Upgrade (optional boolean argument if dist-upgrade should be performed)"}, + {"fix_broken",PkgDepCacheFixBroken,METH_VARARGS,"Fix broken packages"}, + {"read_pinfile",PkgDepCacheReadPinFile,METH_VARARGS,"Read the pin policy"}, + {"minimize_upgrade",PkgDepCacheMinimizeUpgrade, METH_VARARGS,"Go over the entire set of packages and try to keep each package marked for upgrade. If a conflict is generated then the package is restored."}, + // Manipulators + {"mark_keep",PkgDepCacheMarkKeep,METH_VARARGS,"Mark package for keep"}, + {"mark_delete",PkgDepCacheMarkDelete,METH_VARARGS,"Mark package for delete (optional boolean argument if it should be purged)"}, + {"mark_install",PkgDepCacheMarkInstall,METH_VARARGS,"Mark package for Install"}, + {"set_reinstall",PkgDepCacheSetReInstall,METH_VARARGS,"Set if the package should be reinstalled"}, + // state information + {"is_upgradable",PkgDepCacheIsUpgradable,METH_VARARGS,"Is pkg upgradable"}, + {"is_now_broken",PkgDepCacheIsNowBroken,METH_VARARGS,"Is pkg is now broken"}, + {"is_inst_broken",PkgDepCacheIsInstBroken,METH_VARARGS,"Is pkg broken on the current install"}, + {"is_garbage",PkgDepCacheIsGarbage,METH_VARARGS,"Is pkg garbage (mark-n-sweep)"}, + {"is_auto_installed",PkgDepCacheIsAutoInstalled,METH_VARARGS,"Is pkg marked as auto installed"}, + {"marked_install",PkgDepCacheMarkedInstall,METH_VARARGS,"Is pkg marked for install"}, + {"marked_upgrade",PkgDepCacheMarkedUpgrade,METH_VARARGS,"Is pkg marked for upgrade"}, + {"marked_delete",PkgDepCacheMarkedDelete,METH_VARARGS,"Is pkg marked for delete"}, + {"marked_keep",PkgDepCacheMarkedKeep,METH_VARARGS,"Is pkg marked for keep"}, + {"marked_reinstall",PkgDepCacheMarkedReinstall,METH_VARARGS,"Is pkg marked for reinstall"}, + {"marked_downgrade",PkgDepCacheMarkedDowngrade,METH_VARARGS,"Is pkg marked for downgrade"}, + + // Action + {"commit", PkgDepCacheCommit, METH_VARARGS, "Commit pending changes"}, +#ifdef COMPAT_0_7 {"Init",PkgDepCacheInit,METH_VARARGS,"Init the depcache (done on construct automatically)"}, {"GetCandidateVer",PkgDepCacheGetCandidateVer,METH_VARARGS,"Get candidate version"}, {"SetCandidateVer",PkgDepCacheSetCandidateVer,METH_VARARGS,"Set candidate version"}, - - // global cache operations {"Upgrade",PkgDepCacheUpgrade,METH_VARARGS,"Perform Upgrade (optional boolean argument if dist-upgrade should be performed)"}, {"FixBroken",PkgDepCacheFixBroken,METH_VARARGS,"Fix broken packages"}, {"ReadPinFile",PkgDepCacheReadPinFile,METH_VARARGS,"Read the pin policy"}, {"MinimizeUpgrade",PkgDepCacheMinimizeUpgrade, METH_VARARGS,"Go over the entire set of packages and try to keep each package marked for upgrade. If a conflict is generated then the package is restored."}, - // Manipulators {"MarkKeep",PkgDepCacheMarkKeep,METH_VARARGS,"Mark package for keep"}, {"MarkDelete",PkgDepCacheMarkDelete,METH_VARARGS,"Mark package for delete (optional boolean argument if it should be purged)"}, {"MarkInstall",PkgDepCacheMarkInstall,METH_VARARGS,"Mark package for Install"}, {"SetReInstall",PkgDepCacheSetReInstall,METH_VARARGS,"Set if the package should be reinstalled"}, - // state information {"IsUpgradable",PkgDepCacheIsUpgradable,METH_VARARGS,"Is pkg upgradable"}, {"IsNowBroken",PkgDepCacheIsNowBroken,METH_VARARGS,"Is pkg is now broken"}, {"IsInstBroken",PkgDepCacheIsInstBroken,METH_VARARGS,"Is pkg broken on the current install"}, @@ -554,9 +580,8 @@ static PyMethodDef PkgDepCacheMethods[] = {"MarkedKeep",PkgDepCacheMarkedKeep,METH_VARARGS,"Is pkg marked for keep"}, {"MarkedReinstall",PkgDepCacheMarkedReinstall,METH_VARARGS,"Is pkg marked for reinstall"}, {"MarkedDowngrade",PkgDepCacheMarkedDowngrade,METH_VARARGS,"Is pkg marked for downgrade"}, - - // Action {"Commit", PkgDepCacheCommit, METH_VARARGS, "Commit pending changes"}, +#endif {} }; @@ -582,12 +607,20 @@ static PyObject *PkgDepCacheGetDebSize(PyObject *Self,void*) { #undef depcache static PyGetSetDef PkgDepCacheGetSet[] = { + {"brokencount",PkgDepCacheGetBrokenCount}, + {"debsize",PkgDepCacheGetDebSize}, + {"delcount",PkgDepCacheGetDelCount}, + {"instcount",PkgDepCacheGetInstCount}, + {"keepcount",PkgDepCacheGetKeepCount}, + {"usrsize",PkgDepCacheGetUsrSize}, + #ifdef COMPAT_0_7 {"BrokenCount",PkgDepCacheGetBrokenCount}, {"DebSize",PkgDepCacheGetDebSize}, {"DelCount",PkgDepCacheGetDelCount}, {"InstCount",PkgDepCacheGetInstCount}, {"KeepCount",PkgDepCacheGetKeepCount}, {"UsrSize",PkgDepCacheGetUsrSize}, + #endif {} }; @@ -779,14 +812,22 @@ static PyObject *PkgProblemResolverInstallProtect(PyObject *Self,PyObject *Args) static PyMethodDef PkgProblemResolverMethods[] = { // config + {"protect", PkgProblemResolverProtect, METH_VARARGS, "protect(PkgIterator)"}, + {"remove", PkgProblemResolverRemove, METH_VARARGS, "remove(PkgIterator)"}, + {"clear", PkgProblemResolverClear, METH_VARARGS, "clear(PkgIterator)"}, + {"install_protect", PkgProblemResolverInstallProtect, METH_VARARGS, "install_protect()"}, + + // Actions + {"resolve", PkgProblemResolverResolve, METH_VARARGS, "Try to intelligently resolve problems by installing and removing packages"}, + {"resolve_by_keep", PkgProblemResolverResolveByKeep, METH_VARARGS, "Try to resolv problems only by using keep"}, + #ifdef COMPAT_0_7 {"Protect", PkgProblemResolverProtect, METH_VARARGS, "Protect(PkgIterator)"}, {"Remove", PkgProblemResolverRemove, METH_VARARGS, "Remove(PkgIterator)"}, {"Clear", PkgProblemResolverClear, METH_VARARGS, "Clear(PkgIterator)"}, {"InstallProtect", PkgProblemResolverInstallProtect, METH_VARARGS, "ProtectInstalled()"}, - - // Actions {"Resolve", PkgProblemResolverResolve, METH_VARARGS, "Try to intelligently resolve problems by installing and removing packages"}, {"ResolveByKeep", PkgProblemResolverResolveByKeep, METH_VARARGS, "Try to resolv problems only by using keep"}, + #endif {} }; |
