Unknown YCP Module |
This module has an unstable interface. |
Imports
Global FunctionsLocal Functions |
File: modules/FileChanges.ycp
Module: yast2
Summary: Detect if a configuratil file was changed
Authors: Jiri Srain
Support routines for detecting changes of configuration files being done externally (not by YaST) to prevent the changes from being lost because of YaST not handling the configuration files correctly (eg. removing comments in some cases, changing order of options,...)
Warns user if such change is detected.
Usage:
Before reading the configuration file:
call boolean CheckFiles (list
After writing the configuraiton file: call void StoreFileCheckSum (string) for each file to store recent checksum. YaST will use this checksum next time checking.
Read the data file containing file checksums
Write the data file containing checksums
Compute the checksum of a file
- Parameters:
-
file string the file to compute checksum of
- Return value:
-
the checksum
Check if file was modified compared to the one distributed with the RPM package
- Parameters:
-
file string the file to check
- Return value:
-
true of was changed
Check if a file was modified externally (without YaST)
- Parameters:
-
file string boolean the file to check
- Return value:
-
true if was changed externally
Store checksum of a file to the store
- Parameters:
-
file string filename to compute and store
Check files if any of them were changed Issue a question whether to continue if some were chaned
- Parameters:
-
files a list of files to check
- Return value:
-
true if either none was changed or user agreed to continue