[jhbuild] check copy_dir is set when the copy checkout mode is used
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] check copy_dir is set when the copy checkout mode is used
- Date: Fri, 1 May 2009 05:24:53 -0400 (EDT)
commit 012e34375effcca9eb8701a7292e01cc892622be
Author: Frederic Peters <fpeters 0d be>
Date: Fri May 1 11:20:11 2009 +0200
check copy_dir is set when the copy checkout mode is used
---
jhbuild/config.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 556270c..fc5258c 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -172,12 +172,16 @@ class Config:
if not self.tarballdir: self.tarballdir = self.checkoutroot
# check possible checkout_mode values
+ seen_copy_mode = (self.checkout_mode == 'copy')
possible_checkout_modes = ('update', 'clobber', 'export', 'copy')
if self.checkout_mode not in possible_checkout_modes:
raise FatalError(_('invalid checkout mode'))
for module, checkout_mode in self.module_checkout_mode.items():
+ seen_copy_mode = seen_copy_mode or (checkout_mode == 'copy')
if checkout_mode not in possible_checkout_modes:
raise FatalError(_('invalid checkout mode (module: %s)') % module)
+ if seen_copy_mode and not self.copy_dir:
+ raise FatalError(_('copy mode requires copy_dir to be set'))
def setup_env(self):
'''set environment variables for using prefix'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]