@@ -80,12 +80,9 @@ def is_complete(self, action, wid):
8080 action ['sourcepackage' ],
8181 action ['sourcerevision' ])
8282
83- if "_service" in filelist :
84- filelist .remove ("_service" )
85- if "_ccache" in filelist :
86- filelist .remove ("_ccache" )
87- if "_src" in filelist :
88- filelist .remove ("_src" )
83+ # Remove all files starting with _ which don't have a : in
84+ # them (_constraints, _service but not _service:filename)
85+ filelist = [f for f in filelist if not re .match (r"_[^:]*$" , f )]
8986 spec = self .has_spec_file (action , wid , filelist )[0 ]
9087 changes = self .has_changes_file (action , wid , filelist )[0 ]
9188 sources = spec and self .check_source_files (action , wid , filelist )[0 ]
@@ -181,18 +178,15 @@ def check_source_files(self, action, _wid, filelist):
181178 for name in filelist :
182179 if name .startswith ("_service" ):
183180 name = name .split (":" )[- 1 ]
184- if name == "_src" :
185- continue
186181 if os .path .splitext (name )[1 ] in (".spec" , ".changes" , ".dsc" ):
187182 continue
188183 if name not in sources :
189184 if name .endswith ("-rpmlintrc" ) and not name == "%s-rpmlintrc" % action ["sourcepackage" ]:
190185 continue
191- if name == "_src" :
192- continue
193186 extras .append (name )
194187 else :
195188 sources .remove (name )
189+ # Check the spec file. Old ones may have had _src. Ignore it
196190 if "_src" in sources :
197191 sources .remove ("_src" )
198192 if extras :
0 commit comments