From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-662653-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A84C3138A30 for <garchives@archives.gentoo.org>; Sat, 25 Jan 2014 03:15:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E5B7E0C14; Sat, 25 Jan 2014 03:15:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8B214E0C14 for <gentoo-commits@lists.gentoo.org>; Sat, 25 Jan 2014 03:14:59 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEB3D33F62D for <gentoo-commits@lists.gentoo.org>; Sat, 25 Jan 2014 03:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id B5287187BD for <gentoo-commits@lists.gentoo.org>; Sat, 25 Jan 2014 03:14:56 +0000 (UTC) From: "Devan Franchini" <twitch153@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" <twitch153@gentoo.org> Message-ID: <1390619698.d6a06ebe012ac80bf1ae57298116cdd8a63f454d.twitch153@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/db.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: d6a06ebe012ac80bf1ae57298116cdd8a63f454d X-VCS-Branch: master Date: Sat, 25 Jan 2014 03:14:56 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3a9e434f-1107-452d-a238-c2208fded057 X-Archives-Hash: 156d65f4e9b0974e56a319db4261f0a4 commit: d6a06ebe012ac80bf1ae57298116cdd8a63f454d Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> AuthorDate: Wed Jan 8 03:57:01 2014 +0000 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> CommitDate: Sat Jan 25 03:14:58 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=d6a06ebe WebappConfig/db.py: Slightly alters prune_database() algorithm. When the prune_database() function checks to see if a webapp is installed in the directory the database says it's supposed to be installed in it originally checked to see if a .webapp file existed in the directory. But due to the fact that a .webapp file could exist in a directory and not be the webapp that is listed as installed in that directory it was decided that checking the existance of the .webapp-<webapp>-<version> file would be better as it confirms that a webapp exists in that directory and it is the webapp that it is supposed to be. --- WebappConfig/db.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WebappConfig/db.py b/WebappConfig/db.py index d22020a..228b2c8 100644 --- a/WebappConfig/db.py +++ b/WebappConfig/db.py @@ -444,9 +444,7 @@ class WebappDB(AppHierarchy): for i in loc[j]: appdir = i[3].strip() # We check to see if the webapp is installed. - # TODO: Fix algorithm to see if this is an outdated - # entry. - if not os.path.exists(appdir+'/.webapp'): + if not os.path.exists(appdir+'/.webapp-'+j): if self.__v: OUT.warn('No .webapp file found in dir: ') OUT.warn(appdir)