[pkg-boinc-commits] r405 - in branches/experimental/boinc/debian: . extra manpages

Frank S. Thomas fst-guest at costa.debian.org
Sat Apr 15 20:30:27 UTC 2006


Author: fst-guest
Date: 2006-04-15 20:30:24 +0000 (Sat, 15 Apr 2006)
New Revision: 405

Added:
   branches/experimental/boinc/debian/extra/update-boinc-applinks
   branches/experimental/boinc/debian/manpages/update-boinc-applinks.xml
Removed:
   branches/experimental/boinc/debian/extra/boinc_applinks
   branches/experimental/boinc/debian/manpages/boinc_applinks.xml
Modified:
   branches/experimental/boinc/debian/boinc-client.install
   branches/experimental/boinc/debian/boinc-client.manpages
   branches/experimental/boinc/debian/changelog
   branches/experimental/boinc/debian/rules
Log:
Renamed boinc_applinks to update-boinc-applinks.


Modified: branches/experimental/boinc/debian/boinc-client.install
===================================================================
--- branches/experimental/boinc/debian/boinc-client.install	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/boinc-client.install	2006-04-15 20:30:24 UTC (rev 405)
@@ -1,5 +1,5 @@
 debian/extra/global_prefs_override.xml  etc/boinc-client
 debian/extra/gui_rpc_auth.cfg   etc/boinc-client
 debian/extra/remote_hosts.cfg   etc/boinc-client
-debian/extra/boinc_applinks     usr/bin
+debian/extra/update-boinc-applinks  usr/bin
 debian/tmp/usr/bin/boinc_cmd    usr/bin

Modified: branches/experimental/boinc/debian/boinc-client.manpages
===================================================================
--- branches/experimental/boinc/debian/boinc-client.manpages	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/boinc-client.manpages	2006-04-15 20:30:24 UTC (rev 405)
@@ -1,3 +1,3 @@
-boinc_applinks.1
 boinc_client.1
 boinc_cmd.1
+update-boinc-applinks.1

Modified: branches/experimental/boinc/debian/changelog
===================================================================
--- branches/experimental/boinc/debian/changelog	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/changelog	2006-04-15 20:30:24 UTC (rev 405)
@@ -2,8 +2,8 @@
 
   [ Frank S. Thomas ]
   * Synchronized with pkg-boinc/trunk/boinc, revision 399.
-  * Added the boinc_applinks tool that creates symlinks to "anonymous" BOINC
-    applications and their app_info.xml files in a given data directory.
+  * Added the update-boinc-applinks tool that creates symlinks to "anonymous"
+    BOINC applications and their app_info.xml files in a given data directory.
     The "anonymous" applications and their app_info.xml files are provided
     by boinc-app-* packages (e.g.: boinc-app-seti).
 

Deleted: branches/experimental/boinc/debian/extra/boinc_applinks
===================================================================
--- branches/experimental/boinc/debian/extra/boinc_applinks	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/extra/boinc_applinks	2006-04-15 20:30:24 UTC (rev 405)
@@ -1,93 +0,0 @@
-#!/usr/bin/python2.3
-# -*- 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 optparse
-import os
-import sys
-
-APPS_INFO_DIR = '/usr/share/boinc-apps/info/'
-
-def main():
-    opts = parse_options()
-
-    if not os.path.isdir(APPS_INFO_DIR):
-        sys.exit(0)
-
-    projects = {}
-
-    # Include all files in APPS_INFO_DIR that ends with .py.
-    for file in os.listdir(APPS_INFO_DIR):
-        if file.endswith('.py'):
-            execfile(APPS_INFO_DIR + file)
-
-    # Show list of all available projects.
-    if opts.list_projects == True:
-        for project in projects:
-            print project
-
-    # Manage symbolic links and directories.
-    if opts.create == None:
-        return
-    for project in projects:
-        if opts.project == '' or project == opts.project:
-            for url in projects[project]['urls']:
-                project_dir = opts.data_dir + '/projects/' + url + '/'
-                manage_symlink(projects[project]['app_info'],
-                    project_dir + 'app_info.xml', opts.create)
-
-                for app_src in projects[project]['apps']:
-                    app_dst = project_dir + os.path.basename(app_src)
-                    manage_symlink(app_src, app_dst, opts.create)
-    return
-
-def manage_symlink(src, dst, bool):
-    dirname = os.path.dirname(dst)
-
-    try:
-        if bool == True:
-            os.makedirs(dirname)
-            os.symlink(src, dst)
-        else:
-            if os.path.isfile(dst) and not os.path.islink(dst):
-                return
-            elif os.path.islink(dst):
-                os.remove(dst)
-
-            os.removedirs(dirname)
-    except OSError:
-        pass
-    return
-
-def parse_options():
-    parser = optparse.OptionParser()
-
-    parser.add_option('--create', action='store_true', dest='create',
-        help='create symlinks and project directories')
-
-    parser.add_option('--remove', action='store_false', dest='create',
-        help='remove symlinks and empty project directories')
-
-    parser.add_option('--data-dir', dest='data_dir', default='.',
-        metavar='DIR', help='destination directory for the symlinks')
-
-    parser.add_option('--project', dest='project', default='',
-        metavar='PROJECT', help='create only symlinks for project PROJECT')
-
-    parser.add_option('--list-projects', action='store_true',
-        dest='list_projects', default=False,
-        help='list all available projects')
-
-    (opts, args) = parser.parse_args()
-    return opts
-
-if __name__ == '__main__':
-    main()

Copied: branches/experimental/boinc/debian/extra/update-boinc-applinks (from rev 386, branches/experimental/boinc/debian/extra/boinc_applinks)
===================================================================
--- branches/experimental/boinc/debian/extra/boinc_applinks	2006-03-29 21:51:06 UTC (rev 386)
+++ branches/experimental/boinc/debian/extra/update-boinc-applinks	2006-04-15 20:30:24 UTC (rev 405)
@@ -0,0 +1,121 @@
+#!/usr/bin/python2.3
+# -*- 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 ConfigParser
+import optparse
+import os
+import sys
+
+APPS_INFO_DIR = '/usr/share/boinc-apps/info/'
+
+def main():
+    opts = parse_options()
+
+    if not os.path.isdir(APPS_INFO_DIR):
+        sys.exit(0)
+
+    projects = parse_app_info_files()
+
+    # Show list of all available projects.
+    if opts.list_projects == True:
+        for project in projects:
+            print project
+
+    # Manage symbolic links and directories.
+    if opts.create == None:
+        return
+    for project in projects:
+        if opts.project == '' or project == opts.project:
+            for url in projects[project]['urls']:
+                project_dir = opts.data_dir + '/projects/' + url + '/'
+                manage_symlink(projects[project]['app_info'],
+                    project_dir + 'app_info.xml', opts.create)
+
+                for app_src in projects[project]['apps']:
+                    app_dst = project_dir + os.path.basename(app_src)
+                    manage_symlink(app_src, app_dst, opts.create)
+    return
+
+def get_list(res):
+    """ convert a space separated option value to a list """
+    res = res.replace('\n', ' ')
+    if ' ' in res:
+        res = res.split(' ')
+    else:
+        res = [res]
+    while '' in res:
+        res.remove('')
+    return res
+
+
+def parse_app_info_files():
+    projects = {}
+
+    for file in os.listdir(APPS_INFO_DIR):
+        if file.endswith('.cfg'):
+            cfg = ConfigParser.ConfigParser()
+            cfg.readfp(open(APPS_INFO_DIR + file))
+
+            project = cfg.get('DEFAULT', 'project')
+            cfg.remove_option('DEFAULT', 'project')
+
+            projects[project] = {}
+            list_options = ['apps', 'urls']
+            for item in cfg.items('DEFAULT'):
+                if item[0] in list_options:
+                    projects[project][item[0]] = get_list(item[1])
+                else:
+                    projects[project][item[0]] = item[1]
+    return projects
+
+def manage_symlink(src, dst, bool):
+    dirname = os.path.dirname(dst)
+
+    try:
+        if bool == True:
+            os.makedirs(dirname)
+            os.symlink(src, dst)
+        else:
+            if os.path.isfile(dst) and not os.path.islink(dst):
+                return
+            elif os.path.islink(dst):
+                os.remove(dst)
+
+            os.removedirs(dirname)
+    except OSError:
+        pass
+    return
+
+def parse_options():
+    parser = optparse.OptionParser()
+
+    parser.add_option('--create', action='store_true', dest='create',
+        help='create symlinks and project directories')
+
+    parser.add_option('--remove', action='store_false', dest='create',
+        help='remove symlinks and empty project directories')
+
+    parser.add_option('--data-dir', dest='data_dir', default='.',
+        metavar='DIR', help='destination directory for the symlinks')
+
+    parser.add_option('--project', dest='project', default='',
+        metavar='PROJECT', help='create only symlinks for project PROJECT')
+
+    parser.add_option('--list-projects', action='store_true',
+        dest='list_projects', default=False,
+        help='list all available projects')
+
+    (opts, args) = parser.parse_args()
+    return opts
+
+if __name__ == '__main__':
+    main()

Deleted: branches/experimental/boinc/debian/manpages/boinc_applinks.xml
===================================================================
--- branches/experimental/boinc/debian/manpages/boinc_applinks.xml	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/manpages/boinc_applinks.xml	2006-04-15 20:30:24 UTC (rev 405)
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<!--
- This is the manual page for boinc_applinks, a tool that creates/removes
- symlinks for anonymous platform applications and their associated app_info.xml
- files in a given BOINC data directory.
-
- 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.
-
- Copyright © 2006 Debian BOINC Maintainers
--->
-
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
-
-  <!ENTITY dhgroupname "Debian BOINC Maintainers">
-  <!ENTITY dhgroupmail "<email>pkg-boinc-devel at lists.alioth.debian.org</email>">
-
-  <!ENTITY dhbinary    "boinc_applinks">
-  <!ENTITY dhdate      "<date>March 05, 2006</date>">
-
-  <!ENTITY debian      "<productname>Debian</productname>">
-  <!ENTITY gnu         "<acronym>GNU</acronym>">
-  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
-]>
-
-<refentry>
-  <refentryinfo>
-    <address>
-      &dhgroupmail;
-    </address>
-    <author>
-      <firstname>Frank</firstname>
-      <lastname>Thomas</lastname>
-      <email>frank at thomas-alfeld.de</email>
-    </author>
-    <copyright>
-      <year>2006</year>
-      <holder>&dhgroupname;</holder>
-    </copyright>
-    &dhdate;
-  </refentryinfo>
-
-  <refmeta>
-    <refentrytitle>&dhbinary;</refentrytitle>
-    <manvolnum>1</manvolnum>
-  </refmeta>
-
-  <refnamediv>
-    <refname>&dhbinary;</refname> 
-    <refpurpose>create/remove symbolic links for anonymous BOINC
-      applications</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>&dhbinary;</command>
-      <arg><replaceable>options</replaceable></arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>DESCRIPTION</title>
-    <para>&dhbinary; creates (or removes) symbolic links for anonymous BOINC
-      applications and their associated app_info.xml files in a given BOINC
-      data directory.</para>
-    <para>Note: &dhbinary; is an extension for &debian; users and is only
-      available in &debian;'s boinc-client package.</para>
-  </refsect1>
-
-  <refsect1>
-    <title>OPTIONS</title>
-    <para>For a full summary of options, run <command>&dhbinary;
-      --help</command>.</para>
-
-    <variablelist>
-      <varlistentry>
-        <term><option>-h, --help</option></term>
-        <listitem>
-          <para>Show help message and all options.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--create</option></term>
-        <listitem>
-          <para>Create symbolic links and project directories.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--remove</option></term>
-        <listitem>
-          <para>Remove symbolic links and empty project directories.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>
-          <option>--data-dir=<replaceable>DIR</replaceable></option>
-        </term>
-        <listitem>
-          <para>Manage symbolic links in the given directory
-            <replaceable>DIR</replaceable>. If this option is not present,
-            <replaceable>DIR</replaceable> defaults to the current working
-            directory.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>
-          <option>--project=<replaceable>PROJECT</replaceable></option>
-        </term>
-        <listitem>
-          <para>Manage symbolic links only for the given project
-            <replaceable>PROJECT</replaceable>.
-            Run <command>&dhbinary; --list-projects</command> to get a list
-            of projects for which anonymous applications are available and
-            therefore can be replaced with
-            <replaceable>PROJECT</replaceable>. If this option is not present,
-            &dhbinary; will manage symbolic links for all available
-            projects.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>
-          <option>--list-projects</option>
-        </term>
-        <listitem>
-          <para>Show a list of projects for which anonymous applications are
-            available. Normally those applications are provided by packages
-            called boinc-app-<replaceable>PROJECT</replaceable>
-            (e.g. boinc-app-seti).</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>AUTHOR</title>
-    <para>Written by Frank S. Thomas.</para>
-  </refsect1>
-
-  <refsect1>
-    <title>COPYRIGHT</title>
-    <para>Copyright &copy; 2006 &dhgroupname;.</para>
-    <para>
-      This is free software; you can redistribute it and/or modify it under the
-      terms of the &gnu; General Public License, Version 2 or any later version
-      published by the Free Software Foundation.</para>
-  </refsect1>
-</refentry>

Copied: branches/experimental/boinc/debian/manpages/update-boinc-applinks.xml (from rev 386, branches/experimental/boinc/debian/manpages/boinc_applinks.xml)
===================================================================
--- branches/experimental/boinc/debian/manpages/boinc_applinks.xml	2006-03-29 21:51:06 UTC (rev 386)
+++ branches/experimental/boinc/debian/manpages/update-boinc-applinks.xml	2006-04-15 20:30:24 UTC (rev 405)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ This is the manual page for update-boinc-applinks, a tool that creates/removes
+ symlinks for anonymous platform applications and their associated app_info.xml
+ files in a given BOINC data directory.
+
+ 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.
+
+ Copyright © 2006 Debian BOINC Maintainers
+-->
+
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
+
+  <!ENTITY dhgroupname "Debian BOINC Maintainers">
+  <!ENTITY dhgroupmail "<email>pkg-boinc-devel at lists.alioth.debian.org</email>">
+
+  <!ENTITY dhbinary    "update-boinc-applinks">
+  <!ENTITY dhdate      "<date>March 05, 2006</date>">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhgroupmail;
+    </address>
+    <author>
+      <firstname>Frank</firstname>
+      <lastname>Thomas</lastname>
+      <email>frank at thomas-alfeld.de</email>
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhgroupname;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>&dhbinary;</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>&dhbinary;</refname> 
+    <refpurpose>create/remove symbolic links for anonymous BOINC
+      applications</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhbinary;</command>
+      <arg><replaceable>options</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>DESCRIPTION</title>
+    <para>&dhbinary; creates (or removes) symbolic links for anonymous BOINC
+      applications and their associated app_info.xml files in a given BOINC
+      data directory.</para>
+    <para>Note: &dhbinary; is an extension for &debian; users and is only
+      available in &debian;'s boinc-client package.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+    <para>For a full summary of options, run <command>&dhbinary;
+      --help</command>.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h, --help</option></term>
+        <listitem>
+          <para>Show help message and all options.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--create</option></term>
+        <listitem>
+          <para>Create symbolic links and project directories.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--remove</option></term>
+        <listitem>
+          <para>Remove symbolic links and empty project directories.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--data-dir=<replaceable>DIR</replaceable></option>
+        </term>
+        <listitem>
+          <para>Manage symbolic links in the given directory
+            <replaceable>DIR</replaceable>. If this option is not present,
+            <replaceable>DIR</replaceable> defaults to the current working
+            directory.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--project=<replaceable>PROJECT</replaceable></option>
+        </term>
+        <listitem>
+          <para>Manage symbolic links only for the given project
+            <replaceable>PROJECT</replaceable>.
+            Run <command>&dhbinary; --list-projects</command> to get a list
+            of projects for which anonymous applications are available and
+            therefore can be replaced with
+            <replaceable>PROJECT</replaceable>. If this option is not present,
+            &dhbinary; will manage symbolic links for all available
+            projects.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>--list-projects</option>
+        </term>
+        <listitem>
+          <para>Show a list of projects for which anonymous applications are
+            available. Normally those applications are provided by packages
+            called boinc-app-<replaceable>PROJECT</replaceable>
+            (e.g. boinc-app-seti).</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>AUTHOR</title>
+    <para>Written by Frank S. Thomas.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>COPYRIGHT</title>
+    <para>Copyright &copy; 2006 &dhgroupname;.</para>
+    <para>
+      This is free software; you can redistribute it and/or modify it under the
+      terms of the &gnu; General Public License, Version 2 or any later version
+      published by the Free Software Foundation.</para>
+  </refsect1>
+</refentry>

Modified: branches/experimental/boinc/debian/rules
===================================================================
--- branches/experimental/boinc/debian/rules	2006-04-15 17:58:40 UTC (rev 404)
+++ branches/experimental/boinc/debian/rules	2006-04-15 20:30:24 UTC (rev 405)
@@ -69,10 +69,10 @@
 	cp -f /usr/share/misc/config.sub config.sub
 	aclocal-1.9 -I m4 && autoheader && automake-1.9 && autoconf
 	
-	docbook2x-man debian/manpages/boinc_applinks.xml
 	docbook2x-man debian/manpages/boinc_client.xml
 	docbook2x-man debian/manpages/boinc_cmd.xml
 	docbook2x-man debian/manpages/boincmgr.xml
+	docbook2x-man debian/manpages/update-boinc-applinks.xml
 	touch $@
 
 build: pre-build build-stamp
@@ -106,11 +106,11 @@
 	  lib/boinccmd.unmodified
 	
 	dh_clean \
-	  boinc_applinks.1 \
 	  boinc_client.1 \
 	  boinc_cmd.1 \
-	  boincmgr.1
-	  
+	  boincmgr.1 \
+	  update-boinc-applinks.1
+	
 	dh_clean \
 	  api/Makefile.in \
 	  apps/Makefile.in \




More information about the pkg-boinc-commits mailing list