mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Will now copy both source files and patch files declared in the spec
Also fix some spelling errors fixes #463
This commit is contained in:
parent
39449a8cc2
commit
369c6baeb5
1 changed files with 4 additions and 4 deletions
|
@ -527,14 +527,14 @@ class Builder(ConfigObject, BuilderBase):
|
||||||
self.sources.append(target)
|
self.sources.append(target)
|
||||||
|
|
||||||
def _copy_extra_sources(self, download_sources=False):
|
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)
|
% (self.spec_file, self.start_dir)
|
||||||
sources = getoutput(cmd).split("\n")
|
sources = getoutput(cmd).split("\n")
|
||||||
|
|
||||||
for source in sources[1:]:
|
for source in sources[1:]:
|
||||||
dst_file = os.path.join(self.rpmbuild_sourcedir, source)
|
dst_file = os.path.join(self.rpmbuild_sourcedir, source)
|
||||||
if os.path.isfile(dst_file):
|
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
|
continue
|
||||||
|
|
||||||
parse = urlparse(source)
|
parse = urlparse(source)
|
||||||
|
@ -550,11 +550,11 @@ class Builder(ConfigObject, BuilderBase):
|
||||||
if self.fetch_sources and download_sources:
|
if self.fetch_sources and download_sources:
|
||||||
self._download_one_source(source)
|
self._download_one_source(source)
|
||||||
continue
|
continue
|
||||||
debug('Source "%s" is not a local file. Skiping.' % source)
|
debug('Source "%s" is not a local file. Skipping.' % source)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not os.path.exists(source):
|
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
|
continue
|
||||||
|
|
||||||
src = os.path.join(self.rpmbuild_sourcedir, self.tgz_dir, source)
|
src = os.path.join(self.rpmbuild_sourcedir, self.tgz_dir, source)
|
||||||
|
|
Loading…
Add table
Reference in a new issue