diff options
author | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-18 16:24:29 -0500 |
---|---|---|
committer | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-18 16:24:29 -0500 |
commit | d479ded1669de67df94fe62c2c1c896a4694b874 (patch) | |
tree | b4885cde6aa7d0f569fdcb922c0fb5283c97c8ff | |
parent | 690fc37a3b4b1bfcdaa26d31742b4b22b7c926b1 (diff) | |
download | fedora-devshell-d479ded1669de67df94fe62c2c1c896a4694b874.tar.gz fedora-devshell-d479ded1669de67df94fe62c2c1c896a4694b874.tar.xz fedora-devshell-d479ded1669de67df94fe62c2c1c896a4694b874.zip |
Modifies package and build to work with multiple sourceballs
-rw-r--r-- | modules/build.py | 5 | ||||
-rw-r--r-- | modules/package.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/modules/build.py b/modules/build.py index 338f635..1eba2da 100644 --- a/modules/build.py +++ b/modules/build.py @@ -49,8 +49,8 @@ class Build(Directory): with pwd(pkg.dir): symlink(pkg.spec_file, join(self.dir, 'SPECS', pkg.spec_file)) - sball = pkg.sourceball - symlink(sball, join(self.dir, 'SOURCES', sball)) + for sball in pkg.sourceballen: + symlink(sball, join(self.dir, 'SOURCES', sball)) patches = [f for f in listdir(getcwd()) if f.endswith('.patch')] for patch in patches: symlink(patch, join(self.dir, 'SOURCES', patch)) @@ -126,6 +126,7 @@ class Build(Directory): target_dir is a path to the destination for all the rpms ''' + target_dir = abspath(target_dir) with pwd(self.dir): for path, dirs, files in walk('.'): for f in files: diff --git a/modules/package.py b/modules/package.py index bf1e3ec..2e46add 100644 --- a/modules/package.py +++ b/modules/package.py @@ -124,10 +124,16 @@ class Package(Directory): def fetch_sourceballs(self, profile=None): pkg_srcen = self.sources pkg_srcen = (DirFactory(pkg_src) for pkg_src in pkg_srcen) + self.cfg['sourceballen'] = list() with pwd(self.dir): for pkg_src in pkg_srcen: pkg_src.setup_sourceball(self.ver(profile)) symlink(pkg_src.sourceball_loc, pkg_src.sourceball) + self.cfg['sourceballen'].append(pkg_src.sourceball) + + @property + def sourceballen(self): + return self.cfg['sourceballen'] # These don't make sense anymore # TODO: Figure out the API to iterate over PackageSources where *args should be diff for each one |