Subversion Repositories ALCASAR

Rev

Rev 2946 | Rev 2950 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2946 Rev 2947
Line 78... Line 78...
78
for directory in $MAGEIA_NEW_DIR $MAGEIA_OFFICIAL_DIR
78
for directory in $MAGEIA_NEW_DIR $MAGEIA_OFFICIAL_DIR
79
do
79
do
80
	[ -d $directory ] || mkdir -p $directory
80
	[ -d $directory ] || mkdir -p $directory
81
done
81
done
82
printBold "Mageiar will be build with Mageia-$MAGEIA_VERSION-$ARCH and $ALCASAR_EXTRACTED_DIR" 
82
printBold "Mageiar will be build with Mageia-$MAGEIA_VERSION-$ARCH and $ALCASAR_EXTRACTED_DIR" 
83
# remove some rpm (if this script has been already run)
83
# Update the system. Keep only RPMs needed to create ALCASAR rpmslist
-
 
84
urpmi --auto-update --auto 2>/dev/null
84
urpme $ISO_RPM_LIST --auto-orphans --force 2>/dev/null
85
urpme $ISO_RPM_LIST --auto-orphans --force 2>/dev/null
85
urpmi $BASE_RPM_LIST --force --auto 2>/dev/null
86
urpmi $BASE_RPM_LIST --force --auto 2>/dev/null
86
# Retrieve list of installed RPM (without those that will be installed with the alcasar install script)
87
# Retrieve list of installed RPM (without those that will be installed with the alcasar install script)
87
RPM_LIST="$(rpm -qa --queryformat "%{NAME}\n"| grep -Ev 'coova-chilli|gammu|lib64gammu8|ipt-netflow|nfdump|wkhtmltopdf' | tr '\n' ' ')"
88
RPM_LIST="$(rpm -qa --queryformat "%{NAME}\n"| grep -Ev 'coova-chilli|gammu|lib64gammu8|ipt-netflow|nfdump|wkhtmltopdf' | tr '\n' ' ')"
88
 
89
 
Line 128... Line 129...
128
# Copying the RPM in core and clearing the plop.idx file
129
# Copying the RPM in core and clearing the plop.idx file
129
echo "Copying $total RPMS in ISO ..."
130
echo "Copying $total RPMS in ISO ..."
130
for rpm in ${RPM_LIST}; do
131
for rpm in ${RPM_LIST}; do
131
	let percent="${count} * 100 / ${total}"
132
	let percent="${count} * 100 / ${total}"
132
	full_rpm_name=`rpm -q $rpm`
133
	full_rpm_name=`rpm -q $rpm`
133
	if [ `ls $urpmi_cache/* | grep $full_rpm_name | wc -l` -eq 0 ] ; then  # rpm not already downloaded
134
	if [ `ls $urpmi_cache/$full_rpm_name* 2>/dev/null | wc -l` -ne 1 ] ; then  # rpm isn't already in $urpmi_cache
-
 
135
		if [ `ls $coreDir/$full_rpm_name* 2>/dev/null | wc -l` -eq 1 ] ; then  # rpm is in official ISO file
-
 
136
			cp $coreDir/$full_rpm_name* $urpmi_cache/
-
 
137
		else # rpm must be downloaded
134
		# dnf download --downloaddir $coreDirNew $rpm 1> /dev/null || errorExit "could not download $rpm"
138
			# dnf download --downloaddir $coreDirNew $rpm 1> /dev/null || errorExit "could not download $rpm"
135
		urpmi --no-install --replacepkgs -q $rpm 2> /dev/null || urpmi --no-install -q --force $rpm 2> /dev/null || echo "could not download $rpm"
139
			urpmi --no-install --replacepkgs -q $rpm 2> /dev/null || urpmi --no-install -q --force $rpm 2> /dev/null || echo "could not download $rpm"
-
 
140
		fi
136
	fi
141
	fi
137
	printProgress ${percent}
142
	printProgress ${percent}
138
	count=$(expr ${count} + 1)
143
	count=$(expr ${count} + 1)
139
done
144
done
140
printBold "$count RPMs copied"
145
printBold "$count RPMs copied"
Line 197... Line 202...
197
for directory in $MAGEIA_NEW_DIR $MAGEIA_OFFICIAL_DIR
202
for directory in $MAGEIA_NEW_DIR $MAGEIA_OFFICIAL_DIR
198
do
203
do
199
	[ -d $directory ] && rm -rf $directory
204
	[ -d $directory ] && rm -rf $directory
200
done
205
done
201
rm -f "$AUTO_INSTALL_CFG"
206
rm -f "$AUTO_INSTALL_CFG"
202
echo "All RPM are always in '/var/cache/urpmi/rpms'Done. Remove them if nedded."
207
echo "All RPM are always in $urpmi_cache. Remove them if nedded."
-
 
208
echo "The ISO file is here : ${TMP_DIR}/${newIsoName}"