[jhbuild] [tarball] skip unset directories when looking for patches (GNOME bug 583420)
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] [tarball] skip unset directories when looking for patches (GNOME bug 583420)
- Date: Thu, 21 May 2009 05:08:30 -0400 (EDT)
commit 59e29e08e75435796e24176854646cf6d63607ec
Author: Frédéric Péters <fpeters 0d be>
Date: Thu May 21 11:06:54 2009 +0200
[tarball] skip unset directories when looking for patches (GNOME bug 583420)
---
jhbuild/versioncontrol/tarball.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/jhbuild/versioncontrol/tarball.py b/jhbuild/versioncontrol/tarball.py
index 2b44a58..4fb5608 100644
--- a/jhbuild/versioncontrol/tarball.py
+++ b/jhbuild/versioncontrol/tarball.py
@@ -241,11 +241,15 @@ class TarballBranch(Branch):
if not patchfile:
# nothing else, use jhbuild provided patches
- for dirname in (
- os.path.join(self.config.modulesets_dir, 'patches'),
- os.path.join(self.config.modulesets_dir, '../patches'),
- os.path.join(PKGDATADIR, 'patches', patch),
- os.path.join(SRCDIR, 'patches', patch)):
+ possible_locations = []
+ if self.config.modulesets_dir:
+ possible_locations.append(os.path.join(self.config.modulesets_dir, 'patches'))
+ possible_locations.append(os.path.join(self.config.modulesets_dir, '../patches'))
+ if PKGDATADIR:
+ possible_locations.append(os.path.join(PKGDATADIR, 'patches'))
+ if SRCDIR:
+ possible_locations.append(os.path.join(SRCDIR, 'patches'))
+ for dirname in possible_locations:
patchfile = os.path.join(dirname, patch)
if os.path.exists(patchfile):
break
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]