Fix deleting of files

The Package class would already look at the files, so the addremove
was too late
This commit is contained in:
Stephan Kulow 2018-11-28 08:14:41 +01:00
parent 9273bd42a3
commit c2e68c2f9a

View File

@ -1540,14 +1540,15 @@ class CommandLineInterface(ToolBase.CommandLineInterface):
f.close()
def commit_package(self, path):
package = Package(path)
if self.options.dry:
package = Package(path)
for i in package.get_diff():
print(''.join(i))
else:
# No proper API function to perform the same operation.
print(subprocess.check_output(
' '.join(['cd', path, '&&', 'osc', 'addremove']), shell=True))
package = Package(path)
package.commit(msg='Automatic update', skip_local_service_run=True)