#524 Add support for debugsource
Merged 2 years ago by mikem. Opened 2 years ago by ignatenkobrain.
ignatenkobrain/koji debugsource  into  master

file modified
+2 -3

@@ -1052,9 +1052,8 @@ 

  

  def is_debuginfo(name):

      """Determines if an rpm is a debuginfo rpm, based on name"""

-     if name.endswith('-debuginfo') or name.find('-debuginfo-') != -1:

-         return True

-     return False

+     return (name.endswith('-debuginfo') or name.endswith('-debugsource') or

+             '-debuginfo-' in name)

  

  def canonArch(arch):

      """Given an arch, return the "canonical" arch"""

I would even remove that 'if' and just use 'return name.endswith...'

1 new commit added

  • make is_debuginfo() one-line
2 years ago

Syntax error in current version. Please check make test next time.

Also, would prefer to avoid backslash continuations unless it is the least worst option, as pep8 recommends. E.g.

    return (name.endswith('-debuginfo') or name.endswith('-debugsource') or
            '-debuginfo-' in name)

3 new commits added

  • make is_debuginfo() one-line
  • use if 'x' in s instead of str.find()
  • handle debugsource same way as debuginfo packages
2 years ago

Commit 658953a fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

2 years ago