reduce verbosity based on $VERBOSE variable
This commit is contained in:
parent
1df5f9426a
commit
e25fed755a
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ help:
|
||||
rpms:
|
||||
@echo $(TIMESTAMP) > build_timestamp
|
||||
@echo "Building template: $(TEMPLATE_NAME)"
|
||||
@createrepo -g $$PWD/comps-qubes-template.xml yum_repo_qubes/$(DIST) -o yum_repo_qubes/$(DIST) && \
|
||||
@createrepo -q -g $$PWD/comps-qubes-template.xml yum_repo_qubes/$(DIST) -o yum_repo_qubes/$(DIST) && \
|
||||
sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img clean_images/packages.list && \
|
||||
sudo -E ./qubeize_image fedorized_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME) && \
|
||||
./build_template_rpm $(TEMPLATE_NAME) || exit 1; \
|
||||
|
@ -4,4 +4,4 @@ INSTALLDIR=$PWD/mnt
|
||||
|
||||
rpm -i --root=$INSTALLDIR 3rd_party_software/adobe-release-x86_64-*.noarch.rpm
|
||||
rpm --import --root=$INSTALLDIR mnt/etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
|
||||
yum install -c $PWD/yum.conf -y --installroot=$INSTALLDIR flash-plugin
|
||||
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR flash-plugin
|
||||
|
@ -18,14 +18,14 @@ ls -als $IMG
|
||||
mount -o loop $IMG mnt || exit 1
|
||||
INSTALLDIR=`pwd`/mnt/
|
||||
rm -f $INSTALLDIR/var/lib/rpm/__db.00* $INSTALLDIR/var/lib/rpm/.rpm.lock
|
||||
yum -c $PWD/yum.conf clean packages --installroot=$INSTALLDIR
|
||||
yum -c $PWD/yum.conf $YUM_OPTS clean packages --installroot=$INSTALLDIR
|
||||
|
||||
# Make sure that rpm database has right format (for rpm version in template, not host)
|
||||
echo "--> Rebuilding rpm database..."
|
||||
chroot `pwd`/mnt /bin/rpm --rebuilddb 2> /dev/null
|
||||
|
||||
echo "--> Compacting image file..."
|
||||
dd if=/dev/zero of=mnt/fillme bs=1M 2> /dev/null || true
|
||||
dd if=/dev/zero of=mnt/fillme bs=1M > /dev/null 2>&1 || true
|
||||
sync
|
||||
rm mnt/fillme
|
||||
umount mnt
|
||||
|
@ -12,6 +12,9 @@ echo "usage $0 <img_file_name> <package_list>"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
YUM_OPTS="$YUM_OPTS -q"
|
||||
fi
|
||||
|
||||
if [ -f $IMG ]; then
|
||||
echo "-> Image file already exists, assuming *update*..."
|
||||
|
@ -27,6 +27,10 @@ if [ $ID != 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" == "1" ]; then
|
||||
export YUM_OPTS="$YUM_OPTS -q"
|
||||
fi
|
||||
|
||||
function cleanup() {
|
||||
if grep -q " $PWD/mnt " /proc/mounts; then
|
||||
umount mnt/proc mnt
|
||||
|
Loading…
Reference in New Issue
Block a user