diff options
Diffstat (limited to 'modules/packagesource.py')
-rw-r--r-- | modules/packagesource.py | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/modules/packagesource.py b/modules/packagesource.py new file mode 100644 index 0000000..e6c8d99 --- /dev/null +++ b/modules/packagesource.py @@ -0,0 +1,63 @@ +# Fedora Developer Shell +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Authors: Yaakov M. Nemoy <ynemoy@redhat.com> +# + +from modules.directory import directory + +class PackageSource(Directory): + + def make_dir(self, dir): + super(PackageSource, self).make_dir(dir) + with pwd(dir): + makedirs('.pkg_src') + + @property + def pkg_src(self): + return '.pkg_src' + + @property + def pkg_src_dir(self): + return join(self.dir, self.pkg_src) + + @property + def branch(self): + return join(self.pkg_src, 'branches') + + @property + def branch_dir(self): + return join(self.dir, self.branch) + + @property + def sourceball(self): + return self.cfg['sourceball'] + + @property + def sourceball_loc(self): + return join(self.parent, self.sourceball) + + def setup_sourceball(self): + raise NotImplementedError + + def setup_sourceball_w_patches(self): + raise NotImplementedError + + def source(self, *args): + raise NotImplementedError + + def source_dir(self, *args): + return join(self.dir, self.source(*args)) + |