Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2945 → Rev 2946

/iso/build-iso.sh
82,10 → 82,9
printBold "Mageiar will be build with Mageia-$MAGEIA_VERSION-$ARCH and $ALCASAR_EXTRACTED_DIR"
# remove some rpm (if this script has been already run)
urpme $ISO_RPM_LIST --auto-orphans --force 2>/dev/null
urpmi $BASE_RPM_LIST --force --auto 2>/dev/null
# Retrieve list of installed RPM (without those that will be installed with the alcasar install script)
ALCASAR_RPM_LIST="$(dnf list installed | cut -d " " -f1 | rev | cut -d "." -f2- | rev | grep -Ev 'coova-chilli|gammu|lib64gammu8|ipt-netflow|nfdump|wkhtmltopdf' | tail -n +2 | tr '\n' ' ')"
# agregate & clean rpm list
RPM_LIST=$(echo $BASE_RPM_LIST $ALCASAR_RPM_LIST | sed "s/ /\n/g" | sort | uniq | sed "s/\n/ /g")
RPM_LIST="$(rpm -qa --queryformat "%{NAME}\n"| grep -Ev 'coova-chilli|gammu|lib64gammu8|ipt-netflow|nfdump|wkhtmltopdf' | tr '\n' ' ')"
 
# Insert list into AUTO_INSTALL_CFG
formattedList=$(echo $RPM_LIST | sed "s/[^ ]*/\'\0\'/g" | sed "s/ /,\n/g")
100,7 → 99,6
 
# Installing tools to create the iso file
printBold "Installing ISO building tools"
#dnf install 'dnf-command(download)' -y || errorExit "could not install necessary packages"
#dnf install -y $ISO_RPM_LIST || errorExit "could not install necessary packages"
urpmi $ISO_RPM_LIST --force|| errorExit "could not install necessary packages"
 
131,8 → 129,11
echo "Copying $total RPMS in ISO ..."
for rpm in ${RPM_LIST}; do
let percent="${count} * 100 / ${total}"
# dnf download --downloaddir $coreDirNew $rpm 1> /dev/null || errorExit "could not download $rpm"
#urpmi --no-install --replacepkgs -q $rpm 2> /dev/null || urpmi --no-install -q --force $rpm 2> /dev/null || echo "could not download $rpm"
full_rpm_name=`rpm -q $rpm`
if [ `ls $urpmi_cache/* | grep $full_rpm_name | wc -l` -eq 0 ] ; then # rpm not already downloaded
# dnf download --downloaddir $coreDirNew $rpm 1> /dev/null || errorExit "could not download $rpm"
urpmi --no-install --replacepkgs -q $rpm 2> /dev/null || urpmi --no-install -q --force $rpm 2> /dev/null || echo "could not download $rpm"
fi
printProgress ${percent}
count=$(expr ${count} + 1)
done