#691 Do not require 'sources' file for all namespaces
Merged a year ago by onosek. Opened a year ago by onosek.
onosek/rpkg sources_checking  into  master

file modified
-2
@@ -1168,8 +1168,6 @@ 

  

      @property

      def sources_filename(self):

-         if self.layout is None or isinstance(self.layout, layout.IncompleteLayout):

-             raise rpkgError('Spec file is not available')

This message wasn't really correct, right?

          if isinstance(self.layout, layout.RetiredLayout):

              raise rpkgError('This package or module is retired. The action has stopped.')

          return os.path.join(

file modified
-1
@@ -2375,7 +2375,6 @@ 

  

      def import_srpm(self):

          uploadfiles = self.cmd.import_srpm(self.args.srpm)

-         self.load_cmd()  # to reload layouts - because a specfile could appear during import

          if uploadfiles:

              try:

                  self.cmd.upload(uploadfiles, replace=True, offline=self.args.offline)

file modified
+1 -1
@@ -1610,7 +1610,7 @@ 

          cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'sources']

          with patch('sys.argv', new=cli_cmd):

              with patch('pyrpkg.Commands.rpmdefines',

-                         new=['--define', '_sourcedir %s' % self.cloned_repo_path]):

+                        new=['--define', '_sourcedir %s' % self.cloned_repo_path]):

                  cli = self.new_cli()

                  with patch('pyrpkg.lookaside.CGILookasideCache.download',

                             new=self.lookasidecache_download):

Requirement for 'sources' file for all layouts except the RetiredLayout
(and thus all namespaces) was too restrictive and unexpected.

Fixes: #684
JIRA: RHELCMP-11529

Signed-off-by: Ondrej Nosek onosek@redhat.com

rebased onto 079a64d

a year ago

This message wasn't really correct, right?

This message wasn't really correct, right?

At this point, there wasn't any specfile present. Sources file either. The message could include both.

Pull-Request has been merged by onosek

a year ago