Skip to content
Snippets Groups Projects

Prevent failures when files referenced in .dsc are missing

Merged Andrej Shadura requested to merge remove-tarball-test into master
2 files
+ 10
6
Compare changes
  • Side-by-side
  • Inline

Files

+ 3
6
@@ -191,7 +191,6 @@ def do_dput(self, subcmd, opts, *args):
# Remove old files, but only those that are part of the Debian package
superseded = set()
retained = set()
downloaded = set()
for f in remote_file_list.keys():
if f.endswith('.dsc'):
@@ -205,7 +204,8 @@ def do_dput(self, subcmd, opts, *args):
remote_dsc = Dsc(osc.core.streamfile(u, bufsize='line'))
for entry in remote_dsc.get('Files'):
superseded.add(entry['name'])
if entry['name'] in remote_file_list:
superseded.add(entry['name'])
superseded.add(f)
elif f.endswith('.changes'):
@@ -232,7 +232,7 @@ def do_dput(self, subcmd, opts, *args):
os.symlink(dsc_file, f)
package.addfile(f)
if opts.maintained_in_git and 'MAINTAINED_IN_GIT.txt' not in retained:
if opts.maintained_in_git:
open('MAINTAINED_IN_GIT.txt', 'w+').close()
package.addfile('MAINTAINED_IN_GIT.txt')
@@ -241,9 +241,6 @@ def do_dput(self, subcmd, opts, *args):
# the source package
msg = f
for f in downloaded:
package.addfile(f)
if changes is not None:
f = dsc_or_changes_file.name
os.symlink(dsc_or_changes_file, f)
Loading