add new api call for changing repo activity

This commit is contained in:
Faik Uygur
2009-06-08 11:24:30 +00:00
parent ab734361ca
commit 9bd4dd06bd
+14
View File
@@ -426,6 +426,20 @@ def get_takeback_plan(operation):
beinstalled, beremoved, configs = pisi.operations.history.plan_takeback(operation)
return beinstalled, beremoved
@locked
def set_repo_activity(name, active):
"""
Changes the activity status of a repository. Inactive repositories will have no effect on
upgrades and installs.
@param name: name of the repository
@param active: the new repository status
"""
repodb = pisi.db.repodb.RepoDB()
if active:
repodb.activate_repo(name)
else:
repodb.deactivate_repo(name)
@locked
def delete_cache():
"""