From 5b67164a9c1081c85076fada68b5810e8254fba7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 15 Feb 2023 20:13:39 +0100 Subject: [PATCH] Pass --force down to delete_package --- osc/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osc/core.py b/osc/core.py index 0991bd93..5946f082 100644 --- a/osc/core.py +++ b/osc/core.py @@ -1061,7 +1061,7 @@ class Project: if state == 'A': self.commitNewPackage(pac, msg, todo, verbose=verbose, skip_local_service_run=skip_local_service_run) elif state == 'D': - self.commitDelPackage(pac) + self.commitDelPackage(pac, force=force) elif state == ' ': # display the correct dir when sending the changes if os_path_samefile(os.path.join(self.dir, pac), os.getcwd()): @@ -1091,7 +1091,7 @@ class Project: # do a simple commit Package(os.path.join(self.dir, pac)).commit(msg, verbose=verbose, skip_local_service_run=skip_local_service_run) elif state == 'D': - self.commitDelPackage(pac) + self.commitDelPackage(pac, force=force) elif state == 'A': self.commitNewPackage(pac, msg, verbose=verbose, skip_local_service_run=skip_local_service_run) finally: @@ -1123,7 +1123,7 @@ class Project: self.set_state(pac, ' ') os.chdir(olddir) - def commitDelPackage(self, pac): + def commitDelPackage(self, pac, force=False): """deletes a package on the server and in the working copy""" try: # display the correct dir when sending the changes @@ -1144,7 +1144,7 @@ class Project: pass # print statfrmt('Deleting', getTransActPath(os.path.join(self.dir, pac))) print(statfrmt('Deleting', getTransActPath(pac_dir))) - delete_package(self.apiurl, self.name, pac) + delete_package(self.apiurl, self.name, pac, force=force) self.del_package_node(pac) def commitExtPackage(self, pac, msg, files=None, verbose=False, skip_local_service_run=False):