mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-16 03:41:32 +01:00
fix issue where downloaded sources with a space would fail md5sum check (GNOME-Colors, for example); also fix issue with erroneous check for empty_queue when using -b or -i from cli.
This commit is contained in:
parent
8d4fba2225
commit
5cb04eb9a8
1 changed files with 11 additions and 10 deletions
|
@ -1586,23 +1586,23 @@ get_source () {
|
||||||
# Check to see if the source tarball exists in the local cache
|
# Check to see if the source tarball exists in the local cache
|
||||||
# directory. If it does, make a symlink to the package directory in
|
# directory. If it does, make a symlink to the package directory in
|
||||||
# the local mirror. If it does not, download it and make the link.
|
# the local mirror. If it does not, download it and make the link.
|
||||||
if [ ! -e $PKGPATH/$SRCNAME ]; then
|
if [ ! -e $PKGPATH/"$SRCNAME" ]; then
|
||||||
if [ -e $SRCDIR/$SRCNAME ]; then
|
if [ -e $SRCDIR/"$SRCNAME" ]; then
|
||||||
ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME
|
ln -s $SRCDIR/"$SRCNAME" $LOCALREPO/$SLACKVER/$PKGPATH/"$SRCNAME"
|
||||||
else
|
else
|
||||||
mkdir -p $SRCDIR/download
|
mkdir -p $SRCDIR/download
|
||||||
cd $SRCDIR/download
|
cd $SRCDIR/download
|
||||||
wget $WGETFLAGS $DOWNLOAD >> $SBOPKGOUTPUT & echo "$!" >> \
|
wget $WGETFLAGS $DOWNLOAD >> $SBOPKGOUTPUT & echo "$!" >> \
|
||||||
$TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT
|
$TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT
|
||||||
wait
|
wait
|
||||||
DOWNLOADFILE=$(ls *)
|
DOWNLOADFILE=$(ls)
|
||||||
CORRECTED_DOWNLOADFILE=$(echo $DOWNLOADFILE | sed -e \
|
CORR_DOWNLOADFILE=$(echo $DOWNLOADFILE | sed -e \
|
||||||
's/\?e=.*$//') # for Virtualbox where wget adds a '?=' at end
|
's/\?e=.*$//') # for Virtualbox where wget adds a '?=' at end
|
||||||
mv $DOWNLOADFILE $CORRECTED_DOWNLOADFILE
|
mv "$DOWNLOADFILE" "$CORR_DOWNLOADFILE"
|
||||||
mv $CORRECTED_DOWNLOADFILE $SRCDIR/
|
mv "$CORR_DOWNLOADFILE" $SRCDIR/
|
||||||
cd -
|
cd -
|
||||||
rm -rf $SRCDIR/download
|
rm -rf $SRCDIR/download
|
||||||
ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME
|
ln -s $SRCDIR/"$SRCNAME" $LOCALREPO/$SLACKVER/$PKGPATH/"$SRCNAME"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1712,12 +1712,13 @@ build_package () {
|
||||||
PKGNAME=${PKG##*/}
|
PKGNAME=${PKG##*/}
|
||||||
SRCNAME=${DOWNLOAD##*/}
|
SRCNAME=${DOWNLOAD##*/}
|
||||||
SRCNAME=$(echo $SRCNAME | sed -e 's/\%2B/\+/g') # TiMidity fix for '+'
|
SRCNAME=$(echo $SRCNAME | sed -e 's/\%2B/\+/g') # TiMidity fix for '+'
|
||||||
|
SRCNAME=$(echo $SRCNAME | sed -e 's/\%20/ /g') # Fix for spaces
|
||||||
if [ "$PKG" = "django" ]; then
|
if [ "$PKG" = "django" ]; then
|
||||||
SRCNAME="Django-$VERSION.tar.gz"
|
SRCNAME="Django-$VERSION.tar.gz"
|
||||||
fi
|
fi
|
||||||
get_source $PKG
|
get_source $PKG
|
||||||
echo "Checking MD5SUM for "$SRCNAME"..."
|
echo "Checking MD5SUM for "$SRCNAME"..."
|
||||||
MD5CHK=$(md5sum $SRCNAME | cut -d' ' -f1)
|
MD5CHK=$(md5sum "$SRCNAME" | cut -d' ' -f1)
|
||||||
if [ "$MD5CHK" == $MD5SUM ]; then
|
if [ "$MD5CHK" == $MD5SUM ]; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
|
@ -2050,7 +2051,7 @@ process_queue () {
|
||||||
QUITBUILD=""
|
QUITBUILD=""
|
||||||
rm -f $SBOPKGTMPOUTPUT $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
rm -f $SBOPKGTMPOUTPUT $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
||||||
check_root
|
check_root
|
||||||
if [ "$BUILDPKGS" = 1 ]; then
|
if [[ "$DIAG" = 1 && "$BUILDPKGS" = 1 ]]; then
|
||||||
if empty_queue; then return; fi
|
if empty_queue; then return; fi
|
||||||
fi
|
fi
|
||||||
if [ $ROOT = "false" ]; then
|
if [ $ROOT = "false" ]; then
|
||||||
|
|
Loading…
Reference in a new issue