80,7 → 80,8 |
[ -d $directory ] || mkdir -p $directory |
done |
printBold "Mageiar will be build with Mageia-$MAGEIA_VERSION-$ARCH and $ALCASAR_EXTRACTED_DIR" |
# remove some rpm (if this script has been already run) |
# Update the system. Keep only RPMs needed to create ALCASAR rpmslist |
urpmi --auto-update --auto 2>/dev/null |
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) |
130,9 → 131,13 |
for rpm in ${RPM_LIST}; do |
let percent="${count} * 100 / ${total}" |
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" |
if [ `ls $urpmi_cache/$full_rpm_name* 2>/dev/null | wc -l` -ne 1 ] ; then # rpm isn't already in $urpmi_cache |
if [ `ls $coreDir/$full_rpm_name* 2>/dev/null | wc -l` -eq 1 ] ; then # rpm is in official ISO file |
cp $coreDir/$full_rpm_name* $urpmi_cache/ |
else # rpm must be 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 |
fi |
printProgress ${percent} |
count=$(expr ${count} + 1) |
199,4 → 204,5 |
[ -d $directory ] && rm -rf $directory |
done |
rm -f "$AUTO_INSTALL_CFG" |
echo "All RPM are always in '/var/cache/urpmi/rpms'Done. Remove them if nedded." |
echo "All RPM are always in $urpmi_cache. Remove them if nedded." |
echo "The ISO file is here : ${TMP_DIR}/${newIsoName}" |