#1468 PR merged
: Using apply-mappings() instead of calling 320_apply_mappings.sh¶
Labels: cleanup
, fixed / solved / done
schabrolles opened issue at 2017-09-03 08:51:¶
#1450 introduced a function (apply-mappings) in
usr/share/rear/lib/layout-functions.sh
(
f408a6936388ecef39ba0780ec514394b5db5cbe and
7a76d5edc06ab7ce1750347222b7d192507d690a)
The aim of this function is to avoid call to
/layout/prepare/default/320_apply_mappings.sh
, but
apply-mappings()
function with parameter instead.
tmp_layout="$LAYOUT_FILE"
LAYOUT_FILE="$OLD_ID_FILE"
source $SHARE_DIR/layout/prepare/default/320_apply_mappings.sh
LAYOUT_FILE="$tmp_layout"
replace by:
apply_mappings $OLD_ID_FILE
This PR finish the job by redirecting all calls to
320_apply_mappings.sh
to the new apply-mappings()
function.
jsmeix commented at 2017-09-04 12:06:¶
@schabrolles
preferably use an explanatory name that also tells about
what kind of mappings are applied here, e.g.
function apply_layout_mappings () { ... }
schlomo commented at 2017-09-04 12:07:¶
👍 for renaming the function. Variables also can't have a -
in them.
schabrolles commented at 2017-09-04 20:07:¶
@jsmeix function renamed apply_layout_mappings()
@schlomo variables protected by quotes
waiting for review.
tested with sles12 with disk migration
schabrolles commented at 2017-09-05 08:39:¶
@schlomo : Updated
schabrolles commented at 2017-09-05 09:33:¶
@jsmeix Don't worry... there is no rush. Thanks for your time and review.
[Export of Github issue for rear/rear.]