[pkg-boinc-commits] r330 - in trunk/boinc/debian: . extra patches

Frank S. Thomas fst-guest at costa.debian.org
Thu Jan 12 23:48:18 UTC 2006


Author: fst-guest
Date: 2006-01-12 23:48:17 +0000 (Thu, 12 Jan 2006)
New Revision: 330

Added:
   trunk/boinc/debian/extra/boinc_mk_app_links.py
Modified:
   trunk/boinc/debian/boinc-client.install
   trunk/boinc/debian/changelog
   trunk/boinc/debian/patches/02_wx2.6-configure.ac.dpatch
Log:
Added first draft of the boinc_mk_app_links.py script. This script will handle
the creation of symlinks for "anonymous" applications in BOINC data
directories.


Modified: trunk/boinc/debian/boinc-client.install
===================================================================
--- trunk/boinc/debian/boinc-client.install	2006-01-09 18:32:25 UTC (rev 329)
+++ trunk/boinc/debian/boinc-client.install	2006-01-12 23:48:17 UTC (rev 330)
@@ -1,2 +1,3 @@
-debian/extra/gui_rpc_auth.cfg   etc/boinc-client
-debian/tmp/usr/bin/boinc_cmd    usr/bin
+debian/extra/gui_rpc_auth.cfg       etc/boinc-client
+debian/extra/boinc_mk_app_links.py  usr/bin
+debian/tmp/usr/bin/boinc_cmd        usr/bin

Modified: trunk/boinc/debian/changelog
===================================================================
--- trunk/boinc/debian/changelog	2006-01-09 18:32:25 UTC (rev 329)
+++ trunk/boinc/debian/changelog	2006-01-12 23:48:17 UTC (rev 330)
@@ -1,3 +1,12 @@
+boinc (5.2.15-2) UNRELEASED; urgency=low
+
+  * NOT RELEASED YET
+  
+  [ Frank S. Thomas ]
+  * added first draft of boinc_mk_app_links.py
+
+ -- Frank S. Thomas <frank at thomas-alfeld.de>  Mon,  9 Jan 2006 19:32:28 +0100
+
 boinc (5.2.15-1) experimental; urgency=low
 
   * New upstream release.

Added: trunk/boinc/debian/extra/boinc_mk_app_links.py
===================================================================
--- trunk/boinc/debian/extra/boinc_mk_app_links.py	2006-01-09 18:32:25 UTC (rev 329)
+++ trunk/boinc/debian/extra/boinc_mk_app_links.py	2006-01-12 23:48:17 UTC (rev 330)
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# This script creates symlinks for anonymous BOINC applications.
+# Copyright © 2006 Debian BOINC Maintainers
+#                  <pkg-boinc-devel at lists.alioth.debian.org>
+#
+# This file is licensed under the terms of the GNU General Public License,
+# Version 2 or any later version published by the Free Software Foundation.
+#
+# $Id$
+
+import os
+import sys
+
+app_info_dir = '/usr/share/boinc-client/app_info/'
+
+def main():
+    if not os.path.isdir(app_info_dir):
+        sys.exit(0)
+
+    if len(sys.argv) < 2:
+        print >> sys.stderr, 'Error: missing path argument'
+        sys.exit(1)
+
+    projects = {}
+
+    for file in os.listdir(app_info_dir):
+        if file.endswith('.py'):
+            execfile(app_info_dir + file)
+
+    for project in projects:
+        for url in projects[project]['urls']:
+            project_dir = sys.argv[1] + '/projects/' + url + '/'
+            try:
+                os.makedirs(project_dir)
+            except OSError:
+                pass
+
+            renew_symlink(projects[project]['app_info'],
+                project_dir + 'app_info.xml')
+
+            for app in projects[project]['apps']:
+                renew_symlink(app, project_dir + os.path.basename(app))
+    return
+
+def renew_symlink(src, dst):
+    if os.path.isfile(dst) and not os.path.islink(dst):
+        return
+    elif os.path.exists(dst):
+        os.remove(dst)
+
+    os.symlink(src, dst)
+    return
+
+if __name__ == '__main__':
+    main()


Property changes on: trunk/boinc/debian/extra/boinc_mk_app_links.py
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Id


Property changes on: trunk/boinc/debian/patches/02_wx2.6-configure.ac.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the pkg-boinc-commits mailing list