[jhbuild] [packagedb] don't ignore '' as version numbers



commit 1872e1591740e6ba22ea5a9ecfb90c98d9ca670b
Author: Frédéric Péters <fpeters 0d be>
Date:   Mon May 18 19:19:37 2009 +0200

    [packagedb] don't ignore '' as version numbers
    
    packagedb.check() allows None as version parameter to ignore the
    version check; this patch changes the support so '' is not ignored
    as well. This is useful for modules that were installed but got
    their source directory removed, as jhbuild can't find a revision
    number in that situation, and will pass the empty string.
---
 jhbuild/utils/packagedb.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/jhbuild/utils/packagedb.py b/jhbuild/utils/packagedb.py
index 16e3839..09d4b8b 100644
--- a/jhbuild/utils/packagedb.py
+++ b/jhbuild/utils/packagedb.py
@@ -84,7 +84,7 @@ class PackageDB:
         '''Check whether a particular module is installed.'''
         if not self.entries.has_key(package): return False
         p_version, p_installed = self.entries[package]
-        if version:
+        if version is not None:
             if version != p_version: return False
         return True
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]