Attempt to copy local Sources during releases.
For releasers copying into a build system SCM, we now extract the
SourceX filenames from the spec file, and anything we see in the
relative directory matching those exactly will be copied. (i.e. if you
store additional sources for your package at the same level as your spec
file, these will now be copied)
Loading branch information
2 changed files
and 0 deletions.
@@ -33,6 +33,23 @@
def extract_sources( spec_file_lines):
Returns a list of sources from the given spec file.
Some of these will be URL's, which is fine they will be ignored.
We're really just after relative filenames that might live in the same
location as the spec file, mostly used with NoTgzBuilder packages.
= re.compile( ) '^Source\d+?:\s*(.*) '
for line in spec_file_lines:
def extract_bzs( output):
Parses the output of CVS diff or a series of git commit log entries,
@@ -152,6 +152,12 @@ def _list_files_to_copy(self):
# we modify and then use a spec file copy from a different location.
= [ self.builder.spec_file] # full paths
= open( self.builder.spec_file, ) 'r '
"Watching for source filenames: %s " % source_filenames)
for filename in os.listdir( self.builder.rpmbuild_gitcopy):
= os.path.join( self.builder.rpmbuild_gitcopy, filename)
@@ -166,6 +172,12 @@ def _list_files_to_copy(self):
# builder is in use.
# Check if file looks like it matches a Source line in the spec file:
if filename in source_filenames:
" copying: %s " % filename)
# Check if file ends with something this builder subclass wants
# to copy: