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

Bastian Blank waldi at alioth.debian.org
Sat Mar 8 21:27:18 UTC 2008


Author: waldi
Date: Sat Mar  8 21:27:17 2008
New Revision: 10748

Log:
lib/dkt/hooks/modules/backward_symlinks.py:
Support image with current and old links.


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

Modified: people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py
==============================================================================
--- people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py	(original)
+++ people/waldi/dkt/lib/dkt/hooks/modules/backward_symlinks.py	Sat Mar  8 21:27:17 2008
@@ -19,7 +19,7 @@
             if IImageBaseConfig(l).file == target:
                 self._set_config(l, 'symlink-dir', dir)
                 self._set_config(l, 'symlink-image-file', file)
-                self._set_config(l, 'symlink-type', type)
+                self._set_config(l, 'symlink-type-' + type, True)
                 return
 
     def _get_files_dir(self, act, old, dir):
@@ -69,8 +69,8 @@
 
         dir, file, act, old = self._get_files()
 
-        self._check_file_config(configs, 0, act, dir, file)
-        self._check_file_config(configs, 1, old, dir, file)
+        self._check_file_config(configs, "act", act, dir, file)
+        self._check_file_config(configs, "old", old, dir, file)
 
     def image_preinst(*args):
         pass
@@ -123,10 +123,9 @@
         for i in chain(*bootconfigs):
             config = i.config
             if 'backward-compatibility' in config:
-                symlink_type = config.get('backward-compatibility', 'symlink-type', None)
-                if symlink_type == 0:
+                if config.get('backward-compatibility', 'symlink-type-act', None):
                     symlink_act = i
-                if symlink_type == 1:
+                if config.get('backward-compatibility', 'symlink-type-old', None):
                     symlink_old = i
 
                 if config.get('backward-compatibility', 'symlink-create', None):
@@ -143,9 +142,9 @@
 
         if symlink_remove is not None:
             if symlink_remove is symlink_act:
-                raise NotImplementedError
+                symlink_act = symlink_old
             elif symlink_remove is symlink_old:
-                raise NotImplementedError
+                symlink_old = symlink_act
 
         ret = []
         if symlink_old is not None:



More information about the Kernel-svn-changes mailing list