Skip to content

Commit

Permalink
Will now copy both source files and patch files declared in the spec
Browse files Browse the repository at this point in the history
Also fix some spelling errors

fixes #463
  • Loading branch information
arcivanov authored and FrostyX committed Jul 7, 2023
1 parent 39449a8 commit 369c6ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tito/builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ def _download_one_source(self, source):
self.sources.append(target)

def _copy_extra_sources(self, download_sources=False):
cmd = "spectool -S '%s' --define '_sourcedir %s' 2> /dev/null | awk '{print $2}'"\
cmd = "spectool -S -P '%s' --define '_sourcedir %s' 2> /dev/null | awk '{print $2}'"\
% (self.spec_file, self.start_dir)
sources = getoutput(cmd).split("\n")

for source in sources[1:]:
dst_file = os.path.join(self.rpmbuild_sourcedir, source)
if os.path.isfile(dst_file):
debug('Source file "%s" already exists. Skiping.' % dst_file)
debug('Source file "%s" already exists. Skipping.' % dst_file)
continue

parse = urlparse(source)
Expand All @@ -550,11 +550,11 @@ def _copy_extra_sources(self, download_sources=False):
if self.fetch_sources and download_sources:
self._download_one_source(source)
continue
debug('Source "%s" is not a local file. Skiping.' % source)
debug('Source "%s" is not a local file. Skipping.' % source)
continue

if not os.path.exists(source):
debug('Source "%s" file does not exist. Skiping.' % source)
debug('Source "%s" file does not exist. Skipping.' % source)
continue

src = os.path.join(self.rpmbuild_sourcedir, self.tgz_dir, source)
Expand Down

0 comments on commit 369c6ba

Please sign in to comment.