1 |
commit: d6a06ebe012ac80bf1ae57298116cdd8a63f454d |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 8 03:57:01 2014 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 25 03:14:58 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=d6a06ebe |
7 |
|
8 |
WebappConfig/db.py: Slightly alters prune_database() algorithm. |
9 |
|
10 |
When the prune_database() function checks to see if a webapp is |
11 |
installed in the directory the database says it's supposed to be |
12 |
installed in it originally checked to see if a .webapp file existed |
13 |
in the directory. But due to the fact that a .webapp file could exist |
14 |
in a directory and not be the webapp that is listed as installed in |
15 |
that directory it was decided that checking the existance of the |
16 |
.webapp-<webapp>-<version> file would be better as it confirms that |
17 |
a webapp exists in that directory and it is the webapp that it is |
18 |
supposed to be. |
19 |
|
20 |
--- |
21 |
WebappConfig/db.py | 4 +--- |
22 |
1 file changed, 1 insertion(+), 3 deletions(-) |
23 |
|
24 |
diff --git a/WebappConfig/db.py b/WebappConfig/db.py |
25 |
index d22020a..228b2c8 100644 |
26 |
--- a/WebappConfig/db.py |
27 |
+++ b/WebappConfig/db.py |
28 |
@@ -444,9 +444,7 @@ class WebappDB(AppHierarchy): |
29 |
for i in loc[j]: |
30 |
appdir = i[3].strip() |
31 |
# We check to see if the webapp is installed. |
32 |
- # TODO: Fix algorithm to see if this is an outdated |
33 |
- # entry. |
34 |
- if not os.path.exists(appdir+'/.webapp'): |
35 |
+ if not os.path.exists(appdir+'/.webapp-'+j): |
36 |
if self.__v: |
37 |
OUT.warn('No .webapp file found in dir: ') |
38 |
OUT.warn(appdir) |