mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 12:00:33 +03:00
first crack at fixing issue where failed download would still attempt a md5sum check; correctly remove the temporary backup queue; fix issue where the local/original slackbuild/.info would display twice
This commit is contained in:
parent
eb8d12c105
commit
d9ae15df75
@ -1197,8 +1197,7 @@ load_backup_queue () {
|
|||||||
cat $PERMQUEUE | while read PICK; do
|
cat $PERMQUEUE | while read PICK; do
|
||||||
add_item_to_queue $PICK
|
add_item_to_queue $PICK
|
||||||
done
|
done
|
||||||
# FIXME: this next line can be removed soon.
|
rm $PERMQUEUE
|
||||||
#mv $PERMQUEUE $TMPQUEUE
|
|
||||||
touch $TMP/sbopkg_backup_queue.lck
|
touch $TMP/sbopkg_backup_queue.lck
|
||||||
dialog --title "Done" --msgbox \
|
dialog --title "Done" --msgbox \
|
||||||
"The backup queue has been loaded." 8 30
|
"The backup queue has been loaded." 8 30
|
||||||
@ -1669,6 +1668,7 @@ 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.
|
||||||
|
SUMMARYLOG=$TMP/sbopkg_summary
|
||||||
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"
|
||||||
@ -1678,6 +1678,33 @@ get_source () {
|
|||||||
wget $WGETFLAGS $DOWNLOAD >> $SBOPKGOUTPUT & echo "$!" >> \
|
wget $WGETFLAGS $DOWNLOAD >> $SBOPKGOUTPUT & echo "$!" >> \
|
||||||
$TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT
|
$TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT
|
||||||
wait
|
wait
|
||||||
|
if [ -z "$(ls -A . 2>/dev/null)" ]; then
|
||||||
|
echo "$PKG:" >> $SUMMARYLOG
|
||||||
|
echo "Download failed." >> $SUMMARYLOG
|
||||||
|
echo >> $SUMMARYLOG
|
||||||
|
rm -f $PKG.info.build
|
||||||
|
rm -f $PKG.SlackBuild.build
|
||||||
|
cd $LOCALREPO/$SLACKVER
|
||||||
|
if [ "$BUILDPKGS" = 1 ]; then
|
||||||
|
echo
|
||||||
|
echo "Would you like to continue processing the rest of the"
|
||||||
|
echo "build queue or would you like to abort? If this failed"
|
||||||
|
echo "package is a dependency of another package in the queue"
|
||||||
|
echo "then it may not make sense to continue."
|
||||||
|
echo
|
||||||
|
echo "Press (Y)es to continue or (N)o to abort."
|
||||||
|
read ANS
|
||||||
|
case $ANS in
|
||||||
|
y* | Y* ) continue
|
||||||
|
;;
|
||||||
|
n* | N* ) rm -f $TMP/sbopkg_build.lck && break
|
||||||
|
;;
|
||||||
|
* ) echo "Unknown response."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
DOWNLOADFILE=$(ls)
|
DOWNLOADFILE=$(ls)
|
||||||
CORR_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
|
||||||
@ -1975,10 +2002,10 @@ pick_slackbuild () {
|
|||||||
fi
|
fi
|
||||||
if [ "$SLACKBUILD" = "original" ]; then
|
if [ "$SLACKBUILD" = "original" ]; then
|
||||||
cp $PKGPATH/$PKG.SlackBuild $PKGPATH/$PKG.SlackBuild.build
|
cp $PKGPATH/$PKG.SlackBuild $PKGPATH/$PKG.SlackBuild.build
|
||||||
echo "Using original Slackbuild" >> $TMP/sbopkg-tmp-prechecklog
|
echo "Using original Slackbuild" >> $TMP/sbopkg_tmp_prechecklog
|
||||||
elif [ "$SLACKBUILD" = "local" ]; then
|
elif [ "$SLACKBUILD" = "local" ]; then
|
||||||
cp $PKGPATH/$PKG.SlackBuild.sbopkg $PKGPATH/$PKG.SlackBuild.build
|
cp $PKGPATH/$PKG.SlackBuild.sbopkg $PKGPATH/$PKG.SlackBuild.build
|
||||||
echo "Using local Slackbuild" >> $TMP/sbopkg-tmp-prechecklog
|
echo "Using local Slackbuild" >> $TMP/sbopkg_tmp_prechecklog
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2071,10 +2098,10 @@ pick_info () {
|
|||||||
fi
|
fi
|
||||||
if [ "$DOTINFO" = "original" ]; then
|
if [ "$DOTINFO" = "original" ]; then
|
||||||
cp $PKGPATH/$PKG.info $PKGPATH/$PKG.info.build
|
cp $PKGPATH/$PKG.info $PKGPATH/$PKG.info.build
|
||||||
echo "Using original .info file" >> $TMP/sbopkg-tmp-prechecklog
|
echo "Using original .info file" >> $TMP/sbopkg_tmp_prechecklog
|
||||||
elif [ "$DOTINFO" = "local" ]; then
|
elif [ "$DOTINFO" = "local" ]; then
|
||||||
cp $PKGPATH/$PKG.info.sbopkg $PKGPATH/$PKG.info.build
|
cp $PKGPATH/$PKG.info.sbopkg $PKGPATH/$PKG.info.build
|
||||||
echo "Using local .info file" >> $TMP/sbopkg-tmp-prechecklog
|
echo "Using local .info file" >> $TMP/sbopkg_tmp_prechecklog
|
||||||
fi
|
fi
|
||||||
. $PKGPATH/$PKG.info.build
|
. $PKGPATH/$PKG.info.build
|
||||||
PKGNAME=${PKG##*/}
|
PKGNAME=${PKG##*/}
|
||||||
@ -2134,6 +2161,7 @@ process_queue () {
|
|||||||
SUMMARYLOG=$TMP/sbopkg_summary
|
SUMMARYLOG=$TMP/sbopkg_summary
|
||||||
QUITBUILD=""
|
QUITBUILD=""
|
||||||
rm -f $SBOPKGTMPOUTPUT $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
rm -f $SBOPKGTMPOUTPUT $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
||||||
|
rm -f $TMP/sbopkg_tmp_prechecklog
|
||||||
if [[ "$DIAG" = 1 && "$BUILDPKGS" = 1 ]]; then
|
if [[ "$DIAG" = 1 && "$BUILDPKGS" = 1 ]]; then
|
||||||
if empty_queue; then return; fi
|
if empty_queue; then return; fi
|
||||||
fi
|
fi
|
||||||
@ -2202,8 +2230,8 @@ process_queue () {
|
|||||||
else
|
else
|
||||||
echo "Options: $BUILDOPTIONS" >> $PRECHECKLOG
|
echo "Options: $BUILDOPTIONS" >> $PRECHECKLOG
|
||||||
fi
|
fi
|
||||||
cat $TMP/sbopkg-tmp-prechecklog >> $PRECHECKLOG
|
cat $TMP/sbopkg_tmp_prechecklog >> $PRECHECKLOG
|
||||||
rm -f $TMP/sbopkg-tmp-prechecklog
|
rm -f $TMP/sbopkg_tmp_prechecklog
|
||||||
echo >> $PRECHECKLOG
|
echo >> $PRECHECKLOG
|
||||||
done
|
done
|
||||||
echo "******************************************" >> $PRECHECKLOG
|
echo "******************************************" >> $PRECHECKLOG
|
||||||
|
Loading…
Reference in New Issue
Block a user