• [gentoo-dev] [PATCH] savedconfig.eclass: do not preserve symlink in res

    From Mike Gilbert@21:1/5 to All on Sun Jun 4 19:40:02 2023
    This allows users to maintain the saved config file in some other
    location.

    Also drop the recursive (-R) option; this cp command is only executed
    when we are restoring a single regular file.

    Closes: https://bugs.gentoo.org/907696
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    ---
    eclass/savedconfig.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
    index cc5748543078..a778dfba0245 100644
    --- a/eclass/savedconfig.eclass
    +++ b/eclass/savedconfig.eclass
    @@ -124,8 +124,8 @@ restore_config() {

    if [[ -f ${found} ]]; then
    elog "Building using saved configfile \"${found}\""
    - if [ $# -gt 0 ]; then
    - cp -pPR "${found}" "$1" || die "Failed to restore ${found} to $1"
    + if [[ $# -gt 0 ]]; then
    + cp -p "${found}" "$1" || die "Failed to restore ${found} to $1"
    else
    die "need to know the restoration filename"
    fi
    --
    2.40.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)