diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-02-11 12:49:28 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-02-11 12:49:28 +0100 |
commit | 3e3b32641d342e3f2040bce68db528683d75452c (patch) | |
tree | e7e117f7cf653973b91b32d14eeb745a25ac00d6 | |
parent | 16dd1fe6e0022d317b07c6f8a0ec09ab896da4d4 (diff) | |
download | devtools-3e3b32641d342e3f2040bce68db528683d75452c.tar.gz devtools-3e3b32641d342e3f2040bce68db528683d75452c.tar.xz |
Reduce verbosity to a sane minimum
-rwxr-xr-x | makechrootpkg | 11 | ||||
-rwxr-xr-x | mkarchroot | 20 |
2 files changed, 1 insertions, 30 deletions
diff --git a/makechrootpkg b/makechrootpkg index 7982a56..bbacec8 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -114,7 +114,6 @@ fi if [ -n "$install_pkg" ]; then pkgname="$(basename "$install_pkg")" - echo "installing '$pkgname' in chroot" cp "$install_pkg" "$copydir/$pkgname" mkarchroot -r "pacman -U /$pkgname" "$copydir" ret=$? @@ -124,11 +123,9 @@ if [ -n "$install_pkg" ]; then fi if [ $update_first -eq 1 ]; then - echo "updating chroot" mkarchroot -r "pacman -Syu --noconfirm" "$copydir" fi -echo "moving build files to chroot" [ -d "$copydir/build" ] || mkdir "$copydir/build" if [ "$REPACK" != "1" ]; then @@ -142,13 +139,11 @@ PKGDEST=$(grep '^PKGDEST=' /etc/makepkg.conf | cut -d= -f2) [ -d "$copydir/pkgdest" ] || mkdir "$copydir/pkgdest" if ! grep "PKGDEST=/pkgdest" "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then - echo "Setting PKGDEST in makepkg.conf" echo "PKGDEST=/pkgdest" >> "$copydir/etc/makepkg.conf" fi [ -d "$copydir/srcdest" ] || mkdir "$copydir/srcdest" if ! grep "SRCDEST=/srcdest" "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then - echo "Setting SRCDEST in makepkg.conf" echo "SRCDEST=/srcdest" >> "$copydir/etc/makepkg.conf" fi @@ -187,7 +182,6 @@ chown -R nobody "$copydir/srcdest" chown -R nobody "$copydir/pkgdest" if ! grep "^nobody" "$copydir/etc/sudoers" >/dev/null 2>&1; then - echo "allowing 'nobody' sudo rights in the chroot" touch "$copydir/etc/sudoers" echo "nobody ALL=(ALL) NOPASSWD: ALL" >> "$copydir/etc/sudoers" chmod 440 "$copydir/etc/sudoers" @@ -221,10 +215,8 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then fi if [ -d "$PKGDEST" ]; then - echo "Moving completed ${_pkgname%${PKGEXT}} package file to ${PKGDEST}" mv "$pkgfile" "${PKGDEST}" else - echo "Moving completed ${_pkgname%${PKGEXT}} package file to ${WORKDIR}" mv "$pkgfile" "${WORKDIR}" fi done @@ -232,10 +224,8 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then for f in "${copydir}"/srcdest/*; do [ -e "$f" ] || continue if [ -d "$SRCDEST" ]; then - echo "Moving downloaded source file $(basename $f) to ${SRCDEST}" mv "$f" "${SRCDEST}" else - echo "Moving downloaded source file $(basename $f) to ${WORKDIR}" mv "$f" "${WORKDIR}" fi done @@ -253,7 +243,6 @@ if [ -e "${copydir}/build/BUILD_FAILED" ]; then rm "${copydir}/build/BUILD_FAILED" else rm -rf "${copydir}"/build/* - echo "Build complete" fi @@ -71,19 +71,15 @@ shift 1 chroot_mount () { - echo "mounting sysfs : /sys" [ -e "${working_dir}/sys" ] || mkdir "${working_dir}/sys" mount -t sysfs sysfs "${working_dir}/sys" - echo "mounting procfs : /proc" [ -e "${working_dir}/proc" ] || mkdir "${working_dir}/proc" mount -t proc proc "${working_dir}/proc" - echo "binding device nodes : /dev" [ -e "${working_dir}/dev" ] || mkdir "${working_dir}/dev" mount -o bind /dev "${working_dir}/dev" - echo "binding pacman cache : ${cache_dir}" [ -e "${working_dir}/var/cache/pacman/pkg" ] || mkdir -p "${working_dir}/var/cache/pacman/pkg" mount -o bind "${cache_dir}" "${working_dir}/var/cache/pacman/pkg" @@ -92,17 +88,13 @@ chroot_mount () copy_hostconf () { - echo "copying mtab : /etc/mtab" cp /etc/mtab "${working_dir}/etc/mtab" - - echo "copying resolv.conf : /etc/resolv.conf" cp /etc/resolv.conf "${working_dir}/etc/resolv.conf" } chroot_umount () { - echo "cleaning up mounts" umount "${working_dir}/proc" umount "${working_dir}/sys" umount "${working_dir}/dev" @@ -123,7 +115,6 @@ if [ "$RUN" != "" ]; then chroot_mount copy_hostconf - echo "starting chroot ($RUN)" chroot "${working_dir}" ${RUN} # }}} @@ -147,12 +138,7 @@ else pacargs="$pacargs --config=${pac_conf}" fi - if [ $# -eq 0 ]; then - echo "no packages to install" - else - echo "installing packages:" - for i in $@; do echo -e "\t$i"; done - + if [ $# -ne 0 ]; then op="-Sy" if [ "$FORCE" = "y" ]; then op="${op}f" @@ -164,22 +150,18 @@ else fi if [ -d "${working_dir}/lib/modules" ]; then - echo "running ldconfig" ldconfig -r "${working_dir}" fi if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then - echo "installing custom pacman.conf" cp ${pac_conf} ${working_dir}/etc/pacman.conf fi if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then - echo "installing custom makepkg.conf" cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf fi if [ -e "${working_dir}/etc/locale.gen" ]; then - echo "generating default locales from host system" cp /etc/locale.gen "${working_dir}/etc/locale.gen" chroot "${working_dir}" locale-gen fi |