#1627 Don't allow archive imports that don't match build type
Merged 2 years ago by tkopecek. Opened 2 years ago by mikem.

file modified
+3 -1
@@ -6636,7 +6636,9 @@ 

      archiveinfo['type_id'] = archivetype['id']

      btype = lookup_name('btype', type, strict=False)

      if btype is None:

-         raise koji.BuildError('unsupported archive type: %s' % type)

+         raise koji.BuildError('unsupported build type: %s' % type)

+     if btype not in get_build_type(buildinfo, strict=True):

+         raise koji.ImportError('Build does not have type %s', btype)

      archiveinfo['btype_id'] = btype['id']

  

      # cg extra data

Alternate solution for #1609 (see also PR #1614)

Commit 0b0e38a fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @julian8628:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago