xbps-src: improve msg_* funcs and update all callers.
This commit is contained in:
parent
24c7ac6808
commit
3da3783333
27 changed files with 184 additions and 173 deletions
|
@ -61,23 +61,21 @@ install_src_phase()
|
|||
return 0
|
||||
fi
|
||||
|
||||
cd $wrksrc || msg_error "can't change cwd to wrksrc!"
|
||||
cd $wrksrc || msg_error "can't change cwd to wrksrc!\n"
|
||||
if [ -n "$build_wrksrc" ]; then
|
||||
cd $build_wrksrc \
|
||||
|| msg_error "can't change cwd to build_wrksrc!"
|
||||
|| msg_error "can't change cwd to build_wrksrc!\n"
|
||||
fi
|
||||
|
||||
# Run pre_install func.
|
||||
if [ ! -f $XBPS_PRE_INSTALL_DONE ]; then
|
||||
run_func pre_install
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "Package '$pkgname': pre_install (destdir) phase done."
|
||||
msg_normal "'$pkgname-$lver': pre_install (destdir) phase done.\n"
|
||||
touch -f $XBPS_PRE_INSTALL_DONE
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_normal "Package '$pkgname ($lver)': running install (destdir) phase."
|
||||
|
||||
# Type of installation: custom, make or python.
|
||||
case "$build_style" in
|
||||
custom-install) run_func do_install;;
|
||||
|
@ -87,22 +85,22 @@ install_src_phase()
|
|||
;;
|
||||
*) run_func make_install;;
|
||||
esac
|
||||
cd ${wrksrc} || msg_error "can't change cwd to wrksrc!"
|
||||
cd ${wrksrc} || msg_error "can't change cwd to wrksrc!\n"
|
||||
|
||||
msg_normal "Package '$pkgname ($lver)': install (destdir) phase done."
|
||||
msg_normal "'$pkgname-$lver': install (destdir) phase done.\n"
|
||||
|
||||
# Run post_install func.
|
||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
run_func post_install
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "Package '$pkgname': post_install (destdir) phase done."
|
||||
msg_normal "'$pkgname-$lver': post_install (destdir) phase done.\n"
|
||||
touch -f $XBPS_POST_INSTALL_DONE
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove libtool archives by default.
|
||||
if [ -z "$keep_libtool_archives" ]; then
|
||||
msg_normal "Package '$pkgname ($lver)': removing libtool archives..."
|
||||
msg_normal "'$pkgname-$lver': removing libtool archives...\n"
|
||||
find ${DESTDIR} -type f -name \*.la -delete
|
||||
fi
|
||||
# Always remove perllocal.pod and .packlist files.
|
||||
|
@ -112,10 +110,10 @@ install_src_phase()
|
|||
fi
|
||||
# Remove empty directories by default.
|
||||
if [ -z "$keep_empty_dirs" ]; then
|
||||
msg_normal "Package '$pkgname ($lver)': removing empty dirs..."
|
||||
msg_normal "'$pkgname-$lver': removing empty dirs...\n"
|
||||
find ${DESTDIR} -depth -type d -exec rmdir 2>/dev/null {} \;
|
||||
fi
|
||||
msg_normal "Package '$pkgname ($lver)': installed into destdir."
|
||||
msg_normal "'$pkgname-$lver': installed into destdir.\n"
|
||||
|
||||
if [ "$build_style" != "custom-install" -a -z "$distfiles" ]; then
|
||||
touch -f $XBPS_INSTALL_DONE
|
||||
|
@ -133,9 +131,9 @@ install_src_phase()
|
|||
check_installed_pkg ${spkgrev}
|
||||
[ $? -eq 0 ] && continue
|
||||
|
||||
msg_normal "Package '${sourcepkg} ($lver)': preparing subpackage '${subpkg}'."
|
||||
msg_normal "'${sourcepkg}-$lver': preparing subpackage '${subpkg}'...\n"
|
||||
if [ ! -f $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template ]; then
|
||||
msg_error "Cannot find '${subpkg}' subpkg build template!"
|
||||
msg_error "Cannot find '${subpkg}' subpkg build template!\n"
|
||||
fi
|
||||
. $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template
|
||||
pkgname=${subpkg}
|
||||
|
@ -146,7 +144,7 @@ install_src_phase()
|
|||
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
|
||||
fi
|
||||
else
|
||||
msg_normal "Package '$sourcepkg ($lver)': skipping '$pkgname' subpkg, already installed into destdir."
|
||||
msg_warn "'$sourcepkg-$lver': skipping '$pkgname' subpkg, already installed into destdir.\n"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue