add new api call for changing repo activity
This commit is contained in:
+14
@@ -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():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user