OSDN Git Service

update on the implementation of installer
[ninix-aya/master.git] / lib / ninix / install.py
index 485faf5..5122459 100644 (file)
@@ -289,6 +289,9 @@ class Installer:
     def confirm_removal(self, path, type_string):
         return self.confirm('Remove "{0}"({1})?'.format(os.fsdecode(path), type_string))
 
+    def confirm_refresh(self, path, type_string):
+        return self.confirm('Remove "{0}"({1}) to Refresh Install?'.format(os.fsdecode(path), type_string))
+
     def select(self, candidates):
         assert len(candidates) >= 1
         if len(candidates) == 1:
@@ -369,7 +372,7 @@ class Installer:
             inst_dst = ninix.home.read_install_txt(prefix)
             if inst.get_with_type('refresh', int, 0):
                 # uninstall older versions of the ghost
-                if self.confirm_removal(prefix, 'ghost'):
+                if self.confirm_refresh(prefix, 'ghost'):
                     mask = [ninix.home.get_normalized_path(path) for path in \
                                 inst.get('refreshundeletemask', '').split(':')]
                     mask.append('HISTORY')
@@ -456,7 +459,7 @@ class Installer:
             inst_dst = ninix.home.read_install_txt(dstdir)
             if inst.get_with_type('refresh', int, 0):
                 # uninstall older versions of the balloon
-                if self.confirm_removal(dstdir, 'balloon'):
+                if self.confirm_refresh(dstdir, 'balloon'):
                     mask = [ninix.home.get_normalized_path(path) for path in \
                                 inst.get('refreshundeletemask', '').split(':')]
                     self.remove_files_and_dirs(dstdir, mask)