fix bash long lines and replace TODO with FIXME
This commit is contained in:
parent
02e9262c11
commit
46d3fc7812
3 changed files with 18 additions and 11 deletions
|
@ -468,7 +468,8 @@ uninstall_components() {
|
|||
verbose_msg "removing component manifest $_component_manifest"
|
||||
run rm "$_component_manifest"
|
||||
# This is a hard error because the installation is unrecoverable
|
||||
critical_need_ok "failed to remove installed manifest for component '$_installed_component'"
|
||||
local _err_cant_r_manifest="failed to remove installed manifest for component"
|
||||
critical_need_ok "$_err_cant_r_manifest '$_installed_component'"
|
||||
|
||||
# Update the installed component list
|
||||
local _modified_components="$(sed "/^$_installed_component\$/d" "$_md/components")"
|
||||
|
@ -692,7 +693,9 @@ maybe_configure_ld() {
|
|||
fi
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
warn "failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error"
|
||||
local _warn_s="failed to run ldconfig. this may happen when \
|
||||
not installing as root. run with --verbose to see the error"
|
||||
warn "$_warn_s"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -977,7 +980,9 @@ make_dir_recursive "$abs_libdir/$TEMPLATE_REL_MANIFEST_DIR"
|
|||
need_ok "failed to create $TEMPLATE_REL_MANIFEST_DIR"
|
||||
|
||||
# Drop the version number into the manifest dir
|
||||
write_to_file "$TEMPLATE_RUST_INSTALLER_VERSION" "$abs_libdir/$TEMPLATE_REL_MANIFEST_DIR/rust-installer-version"
|
||||
write_to_file "$TEMPLATE_RUST_INSTALLER_VERSION" \
|
||||
"$abs_libdir/$TEMPLATE_REL_MANIFEST_DIR/rust-installer-version"
|
||||
|
||||
critical_need_ok "failed to write installer version"
|
||||
|
||||
# Install the uninstaller
|
||||
|
@ -992,5 +997,3 @@ maybe_configure_ld "$abs_libdir"
|
|||
echo
|
||||
echo " $TEMPLATE_SUCCESS_MESSAGE"
|
||||
echo
|
||||
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ impl Scripter {
|
|||
/// Generates the actual installer script
|
||||
pub fn run(self) -> Result<()> {
|
||||
// Replace dashes in the success message with spaces (our arg handling botches spaces)
|
||||
// TODO: still needed? Kept for compatibility for now.
|
||||
// FIXME: still needed? Kept for compatibility for now.
|
||||
let product_name = self.product_name.replace('-', " ");
|
||||
|
||||
// Replace dashes in the success message with spaces (our arg handling botches spaces)
|
||||
// TODO: still needed? Kept for compatibility for now.
|
||||
// FIXME: still needed? Kept for compatibility for now.
|
||||
let success_message = self.success_message.replace('-', " ");
|
||||
|
||||
let script = TEMPLATE
|
||||
|
|
|
@ -458,7 +458,8 @@ uninstall_from_installed_script_with_args_fails() {
|
|||
--output-dir="$OUT_DIR/c1" \
|
||||
--component-name=rustc
|
||||
try "$WORK_DIR/c1/package/install.sh" --prefix="$PREFIX_DIR"
|
||||
expect_output_fail "uninstall.sh does not take any arguments" sh "$PREFIX_DIR/lib/packagelib/uninstall.sh" --prefix=foo
|
||||
expect_output_fail "uninstall.sh does not take any arguments" \
|
||||
sh "$PREFIX_DIR/lib/packagelib/uninstall.sh" --prefix=foo
|
||||
}
|
||||
runtest uninstall_from_installed_script_with_args_fails
|
||||
|
||||
|
@ -680,7 +681,8 @@ select_components_to_install() {
|
|||
try test -e "$PREFIX_DIR/bin/program"
|
||||
try test -e "$PREFIX_DIR/bin/cargo"
|
||||
try test ! -e "$PREFIX_DIR/baz"
|
||||
try "$WORK_DIR/rust/install.sh --uninstall" --prefix="$PREFIX_DIR" --components=rustc,cargo,rust-docs
|
||||
try "$WORK_DIR/rust/install.sh --uninstall" --prefix="$PREFIX_DIR" \
|
||||
--components=rustc,cargo,rust-docs
|
||||
try test ! -e "$PREFIX_DIR/bin/program"
|
||||
try test ! -e "$PREFIX_DIR/bin/cargo"
|
||||
try test ! -e "$PREFIX_DIR/baz"
|
||||
|
@ -733,7 +735,8 @@ select_components_to_uninstall() {
|
|||
try test ! -e "$PREFIX_DIR/bin/cargo"
|
||||
try test -e "$PREFIX_DIR/baz"
|
||||
try "$WORK_DIR/rust/install.sh" --prefix="$PREFIX_DIR"
|
||||
try "$WORK_DIR/rust/install.sh --uninstall" --prefix="$PREFIX_DIR" --components=rustc,cargo,rust-docs
|
||||
try "$WORK_DIR/rust/install.sh --uninstall" --prefix="$PREFIX_DIR" \
|
||||
--components=rustc,cargo,rust-docs
|
||||
try test ! -e "$PREFIX_DIR/bin/program"
|
||||
try test ! -e "$PREFIX_DIR/bin/cargo"
|
||||
try test ! -e "$PREFIX_DIR/baz"
|
||||
|
@ -765,7 +768,8 @@ invalid_component() {
|
|||
--output-dir="$OUT_DIR" \
|
||||
--package-name=rust \
|
||||
--input-tarballs="$OUT_DIR/rustc.tar.gz,$OUT_DIR/cargo.tar.gz,$OUT_DIR/rust-docs.tar.gz"
|
||||
expect_output_fail "unknown component" "$WORK_DIR/rust/install.sh" --prefix="$PREFIX_DIR" --components=foo
|
||||
expect_output_fail "unknown component" "$WORK_DIR/rust/install.sh" --prefix="$PREFIX_DIR" \
|
||||
--components=foo
|
||||
}
|
||||
runtest invalid_component
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue