# HG changeset patch # User Christophe Lincoln # Date 1398809006 -7200 # Node ID e6c5f54a2a02f99d806952c7b43cb3f9f4cab7a3 # Parent faf8a6708713ec3a54c5950d3a69396a2a0777a9 Fix saving config installed config files diff -r faf8a6708713 -r e6c5f54a2a02 spk-add --- a/spk-add Fri Apr 25 18:41:41 2014 +0100 +++ b/spk-add Wed Apr 30 00:03:26 2014 +0200 @@ -72,7 +72,8 @@ install_package() { local package_file=$1 - # Set by receipt: pre_depends() DEPENDS SELF_INSTALL CONFIG_FILES post_install() + # Set by receipt: pre_depends() DEPENDS SELF_INSTALL CONFIG_FILES + # pre_install post_install() local package_name=$PACKAGE local package_dir="$installed/$package_name" @@ -195,10 +196,17 @@ # Handle Config Files set in receipt. Keep system configs: they can # be modified/customized by users, slitaz-config, etc. if [ "$CONFIG_FILES" ] && [ ! "$newconf" ]; then - gettext "Keeping configuration files..." + ccf="$(echo $CONFIG_FILES | wc -l)" + colorize 34 "$(gettext 'Keeping configuration files: '; echo $ccf)" for file in ${CONFIG_FILES}; do - cp -f ${file} fs/ 2>/dev/null - done; status + if [ -f "${file}" ]; then + gettext "Keeping:"; echo -n " $file" + dir=$(dirname $file) + cp -f ${file} fs/${dir}; 2>/dev/null status + debug "cp -f ${file} fs/${dir}" + fi + done + unset CONFIG_FILES fi # Merge package FS with $root