New commits:
commit 070be194c9e93afbe5ae935d66248b39fdca360c
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libstage: don't defer configs if the system already has exact copies
fixes odd configs getting deffered - confmeld did not present the merge
menu, since the files were the same and so we got just a few extraneous
messages
diff --git a/ChangeLog b/ChangeLog
index b1001ba..1b65271 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
don't create a useless backup file when staging init configs
* libdispel: remove modified configs if they were modified back to the
original (reverted)
+ * libstage: don't defer configs if the system already has exact copies
2009-10-10 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* protected: added tr for heisenbug #15408
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 086f6dd..210b5f5 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -115,9 +115,14 @@ function stage_install_file()
config)
if [[ -e "${INSTALL_ROOT}/$FILE" ]]
then
- message "${MESSAGE_COLOR}Staging config to
$CONFIG_STAGE_DIRECTORY${DEFAULT_COLOR}"
- mkdir -p "$(smgl_dirname $SAVE)" &&
- cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$SAVE"
+ if cmp -s "$FILE" "${INSTALL_ROOT}/$FILE"
+ then
+ : # nothing to do, we already have the same file
+ else
+ message "${MESSAGE_COLOR}Staging config to
$CONFIG_STAGE_DIRECTORY${DEFAULT_COLOR}"
+ mkdir -p "$(smgl_dirname $SAVE)" &&
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$SAVE"
+ fi
else
cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
fi
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (070be194c9e93afbe5ae935d66248b39fdca360c),
Jaka Kranjc, 10/16/2009