[kernel] r10607 - people/waldi/dkt/lib/dkt/hooks/modules

Bastian Blank waldi at alioth.debian.org
Tue Feb 19 17:42:58 UTC 2008


Author: waldi
Date: Tue Feb 19 17:42:57 2008
New Revision: 10607

Log:
lib/dkt/hooks/modules/backward_symlinks.py: Add.


Added:
   people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py

Added: people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py
==============================================================================
--- (empty file)
+++ people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py	Tue Feb 19 17:42:57 2008
@@ -0,0 +1,28 @@
+from dkt.config.interfaces import IMutableConfig
+from dkt.hooks import default_registry, interfaces, register
+
+class Hook(object):
+    def image_preinst(self, systemconfig, imageconfig, maintainer_args):
+        pass
+
+    def image_postinst(self, systemconfig, imageconfig, maintainer_args):
+        if not systemconfig.get_parse_boolean('backward-compatibility', 'kpkg-do-symlinks', False):
+            return
+        if maintainer_args[0] != 'configure':
+            return
+        config = IMutableConfig(imageconfig.get_config())
+        config.add_section('backward-compatibility')
+        config.set('backward-compatibility', 'symlink-create', True)
+
+    def image_prerm(self, systemconfig, imageconfig, maintainer_args):
+        pass
+
+    def image_postrm(self, systemconfig, imageconfig, maintainer_args):
+        pass
+
+    def boot_config_partition(self, bootconfigs, systemconfig):
+        if not systemconfig.get_parse_boolean('backward-compatibility', 'kpkg-do-symlinks', False):
+            return
+
+register('backward-symlinks', interfaces.IBootConfigPartition, Hook(), default_registry.PRIORITY_FIRST)
+register('backward-symlinks', interfaces.IImageTask, Hook())



More information about the Kernel-svn-changes mailing list