diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-05 13:34:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-05 13:34:08 +0000 |
commit | 702d47173101dd8bb132cb22170f38bf82b55344 (patch) | |
tree | 27d22d6f80b0693281dc50ada5a64bee7a2e6421 /perl-install/Xconfig/parse.pm | |
parent | 8b346ef435ed5dd491b2e49a278b5b746e6dd142 (diff) | |
download | drakx-702d47173101dd8bb132cb22170f38bf82b55344.tar drakx-702d47173101dd8bb132cb22170f38bf82b55344.tar.gz drakx-702d47173101dd8bb132cb22170f38bf82b55344.tar.bz2 drakx-702d47173101dd8bb132cb22170f38bf82b55344.tar.xz drakx-702d47173101dd8bb132cb22170f38bf82b55344.zip |
- add ->prepare_write to allow comparing raw_X's
- ensure "config_changed" is returned only if the config file really changed
Diffstat (limited to 'perl-install/Xconfig/parse.pm')
-rw-r--r-- | perl-install/Xconfig/parse.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/Xconfig/parse.pm b/perl-install/Xconfig/parse.pm index 36aad26f3..ae270b9e8 100644 --- a/perl-install/Xconfig/parse.pm +++ b/perl-install/Xconfig/parse.pm @@ -13,9 +13,14 @@ sub read_XF86Config { $raw_X; } +sub prepare_write_XF86Config { + my ($raw_X) = @_; + map { raw_to_string(before_to_string({ %$_ }, 0)) } @$raw_X; +} + sub write_XF86Config { my ($raw_X, $file) = @_; - my @blocks = map { raw_to_string(before_to_string({ %$_ }, 0)) } @$raw_X; + my @blocks = prepare_write_XF86Config($raw_X); @blocks ? output($file, @blocks) : unlink $file; } |