diff options
| author | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-08 15:27:45 -0500 |
|---|---|---|
| committer | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-08 15:27:45 -0500 |
| commit | 3bcae770792afe5d5fff2af127cad2c1d0d59d57 (patch) | |
| tree | b89e5835589ebd222d42c46943e38452f9faa6c6 /modules/cabal.py | |
| parent | 84211749a73cbff248192519c0f458806b1fb065 (diff) | |
| download | fedora-devshell-3bcae770792afe5d5fff2af127cad2c1d0d59d57.tar.gz fedora-devshell-3bcae770792afe5d5fff2af127cad2c1d0d59d57.tar.xz fedora-devshell-3bcae770792afe5d5fff2af127cad2c1d0d59d57.zip | |
Got rid of non absolute _dir properties.
In effect, anything that ends in dir shoud usually return an absolute path. The absolute path is dynamically determined using utility functions based on the load time settings of a directory object. This both reduces the number of path ambiguities based on the cwd, and yet removes as many absolute paths from config files, so directory objects can be shared between workspaces and developers.
Diffstat (limited to 'modules/cabal.py')
| -rw-r--r-- | modules/cabal.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/cabal.py b/modules/cabal.py index 2e6d30b..529b023 100644 --- a/modules/cabal.py +++ b/modules/cabal.py @@ -57,8 +57,8 @@ class Cabal(Module): return one(listdir(getcwd()), setup_re.search) def compile_setup(self, orig=''): - log.debug('code_dir is ' + self.package.code_dir) - with pwd(self.package.code_dir): + log.debug('dir is ' + self.package.dir) + with pwd(self.package.dir): with log_file('ghc.log') as ghc_out: log.debug('ghc.log file is ' + str(ghc_out)) log.debug('source_dir is ' + self.package.source_dir(orig)) @@ -72,7 +72,7 @@ class Cabal(Module): def configure(self, target='home', orig=''): user = True if target == 'home' else False self.compile_setup(orig) - with pwd(self.package.code_dir): + with pwd(self.package.dir): with log_file('cabal.log') as cabal_out: log.debug('source_dir is ' + self.package.source_dir(orig)) with pwd(self.package.source_dir(orig)): @@ -85,7 +85,7 @@ class Cabal(Module): def build(self, orig=''): '''This is not safe to run on an unconfigured source dir''' self.compile_setup(orig) - with pwd(self.package.code_dir): + with pwd(self.package.dir): with log_file('cabal.log') as cabal_out: with pwd(self.package.source_dir(orig)): args = [abspath('Setup'), 'build'] @@ -96,7 +96,7 @@ class Cabal(Module): def install(self, orig=''): '''This is not safe to run on an unconfigured source dir''' self.compile_setup(orig) - with pwd(self.package.code_dir): + with pwd(self.package.dir): with log_file('cabal.log') as cabal_out: with pwd(self.package.source_dir(orig)): args = [abspath('Setup'), 'install'] @@ -135,7 +135,7 @@ class Cabal(Module): self.install_source(target, '') def source_dir(self, *args): - with pwd(self.package.code_dir): + with pwd(self.package.dir): return abspath(self.package.cfg['source'] + (self.orig_src_dir if original else "")) def latest_version(self, pkg): |
