#512 Skip 'sources' file when it is missing
Merged 3 years ago by onosek. Opened 3 years ago by onosek.
onosek/rpkg sources_skip  into  master

file modified
+1 -2
@@ -42,8 +42,7 @@ 

  

          if len([f for f in os.listdir(path) if f.endswith('.spec')]) == 0:

              raise LayoutError('spec file not found.')

-         sources = 'sources' if os.path.exists('%s/sources' % path) else None

-         return cls(root_dir=path, sources_file_template=sources)

+         return cls(root_dir=path)

  

  

  class SRPMLayout(BaseLayout):

JIRA: RHELCMP-1968
Resolves: rhbz#1867440

Signed-off-by: Ondřej Nosek onosek@redhat.com

https://bugzilla.redhat.com/show_bug.cgi?id=1867440
in the example, 'sources' file was missing. fedpkg was able to deal with this situation by skipping missing file.

@lrossett can you also check the change, please?

I think it is possible to fix it in property "sources_filename" in init.py too.

rebased onto 1c9c570c809de5c2bca0712e7cfbf229e02ae86e

3 years ago

rebased onto 3af55c0

3 years ago

Added link to another Bugzilla ticket to commit message.

Yup, it looks like it should fix the problem.

Pull-Request has been merged by onosek

3 years ago