mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-13 05:20:18 +03:00
modify the log a bit; add some counters; move one more bit (the echos at end of build_package) to the caller; change the build/install dialog to a 'yes/no' dialog per Mauro's suggestion
This commit is contained in:
parent
07c263c203
commit
6bd48b9f8a
@ -2383,12 +2383,6 @@ build_package() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
else
|
|
||||||
echo "Done building package for $PKG."
|
|
||||||
NEWPACKAGE=$(ls -1 *.t?z)
|
|
||||||
echo "$PKGNAME:" >> $TMPSUMMARYLOG
|
|
||||||
echo "Built package: $NEWPACKAGE" >> $TMPSUMMARYLOG
|
|
||||||
echo "Built package: $NEWPACKAGE"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2506,7 +2500,7 @@ pick_file() {
|
|||||||
# $3 = the package name
|
# $3 = the package name
|
||||||
# Returns 0 if the user did his choice, 1 if ESC was pressed.
|
# Returns 0 if the user did his choice, 1 if ESC was pressed.
|
||||||
|
|
||||||
FILE=$1
|
local FILE=$1
|
||||||
local PKGPATH=$2
|
local PKGPATH=$2
|
||||||
local PKG=$3
|
local PKG=$3
|
||||||
PICKFILE=original
|
PICKFILE=original
|
||||||
@ -2671,7 +2665,7 @@ process_queue() {
|
|||||||
|
|
||||||
# need to check the following before uncommenting
|
# need to check the following before uncommenting
|
||||||
#local PKG PKGBUILD SINGLE PKGPATH CHKBUILD ANS
|
#local PKG PKGBUILD SINGLE PKGPATH CHKBUILD ANS
|
||||||
local CHKBUILD ANS
|
local CHKBUILD ANS COUNTER
|
||||||
|
|
||||||
rm -f $TMPLOG $TMPBUILDLOG $TMPSUMMARYLOG $FINALQUEUE
|
rm -f $TMPLOG $TMPBUILDLOG $TMPSUMMARYLOG $FINALQUEUE
|
||||||
# Start the precheck
|
# Start the precheck
|
||||||
@ -2684,10 +2678,17 @@ process_queue() {
|
|||||||
echo "------------------------------------------" >> $TMPLOG
|
echo "------------------------------------------" >> $TMPLOG
|
||||||
echo "PACKAGE BUILDING/INSTALLATION PRECHECK LOG" >> $TMPLOG
|
echo "PACKAGE BUILDING/INSTALLATION PRECHECK LOG" >> $TMPLOG
|
||||||
echo "Using the $REPO_DESC" >> $TMPLOG
|
echo "Using the $REPO_DESC" >> $TMPLOG
|
||||||
|
if [[ $QUEUETYPE == "buildinstall" ]]; then
|
||||||
|
echo "Queue process: build and install" >> $TMPLOG
|
||||||
|
else
|
||||||
|
echo "Queue process: build" >> $TMPLOG
|
||||||
|
fi
|
||||||
echo >> $TMPLOG
|
echo >> $TMPLOG
|
||||||
|
COUNTER=1
|
||||||
for CHKBUILD in $(< $STARTQUEUE); do
|
for CHKBUILD in $(< $STARTQUEUE); do
|
||||||
# FIXME: This section still needs to be reviewed
|
# FIXME: This section still needs to be reviewed
|
||||||
unset PKG PKGPATH PKGNAME VERSION BUILD PICKFILE FILE
|
unset PKG PKGPATH PKGNAME VERSION BUILD PICKFILE FILE
|
||||||
|
echo "Package $COUNTER: $CHKBUILD" >> $TMPLOG
|
||||||
if ! search_package $CHKBUILD; then
|
if ! search_package $CHKBUILD; then
|
||||||
echo "$CHKBUILD not found!" >> $TMPLOG
|
echo "$CHKBUILD not found!" >> $TMPLOG
|
||||||
continue
|
continue
|
||||||
@ -2699,7 +2700,7 @@ process_queue() {
|
|||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
. $PKGPATH/$PKG.info.build
|
. $PKGPATH/$PKG.info.build
|
||||||
echo "Using $PICKFILE $FILE file" >> $TMPLOG-info
|
echo "Using $PICKFILE .info file" >> $TMPLOG-files
|
||||||
fi
|
fi
|
||||||
if ! pick_slackbuild $PKGPATH $CHKBUILD; then
|
if ! pick_slackbuild $PKGPATH $CHKBUILD; then
|
||||||
rm -f $PKGPATH/$PKG*.build
|
rm -f $PKGPATH/$PKG*.build
|
||||||
@ -2707,12 +2708,11 @@ process_queue() {
|
|||||||
else
|
else
|
||||||
BUILD=$(egrep -m1 "^BUILD" $PKGPATH/$PKG.SlackBuild.build |
|
BUILD=$(egrep -m1 "^BUILD" $PKGPATH/$PKG.SlackBuild.build |
|
||||||
sed -e 's/^.*[=-]//;s/\"//;s/[ #}\t].*$//g;s/\"//g')
|
sed -e 's/^.*[=-]//;s/\"//;s/[ #}\t].*$//g;s/\"//g')
|
||||||
echo "Using $PICKFILE $FILE file" >> $TMPLOG-SB
|
echo "Using $PICKFILE SlackBuild file" >> $TMPLOG-files
|
||||||
fi
|
fi
|
||||||
echo "Found $CHKBUILD $VERSION-$BUILD" >> $TMPLOG
|
echo "Found $CHKBUILD $VERSION-$BUILD" >> $TMPLOG
|
||||||
cat $TMPLOG-info >> $TMPLOG
|
cat $TMPLOG-files >> $TMPLOG
|
||||||
cat $TMPLOG-SB >> $TMPLOG
|
rm $TMPLOG-files
|
||||||
rm $TMPLOG-info $TMPLOG-SB
|
|
||||||
use_options $PKGPATH $CHKBUILD
|
use_options $PKGPATH $CHKBUILD
|
||||||
if [[ $BUILDOPTIONS ]]; then
|
if [[ $BUILDOPTIONS ]]; then
|
||||||
echo "Options: $BUILDOPTIONS" >> $TMPLOG
|
echo "Options: $BUILDOPTIONS" >> $TMPLOG
|
||||||
@ -2720,6 +2720,7 @@ process_queue() {
|
|||||||
echo "Options: None" >> $TMPLOG
|
echo "Options: None" >> $TMPLOG
|
||||||
fi
|
fi
|
||||||
echo >> $TMPLOG
|
echo >> $TMPLOG
|
||||||
|
COUNTER=$((COUNTER+1))
|
||||||
done
|
done
|
||||||
echo "------------------------------------------" >> $TMPLOG
|
echo "------------------------------------------" >> $TMPLOG
|
||||||
if [[ ! -e $FINALQUEUE ]]; then
|
if [[ ! -e $FINALQUEUE ]]; then
|
||||||
@ -2768,6 +2769,7 @@ process_queue() {
|
|||||||
# Okay, precheck done, now start the actual queue processing (build or
|
# Okay, precheck done, now start the actual queue processing (build or
|
||||||
# build+install)
|
# build+install)
|
||||||
> $SBOPKGTMP/sbopkg_build.lck
|
> $SBOPKGTMP/sbopkg_build.lck
|
||||||
|
COUNTER=1
|
||||||
for PKGBUILD in $(< $FINALQUEUE); do
|
for PKGBUILD in $(< $FINALQUEUE); do
|
||||||
if ! search_package $PKGBUILD; then
|
if ! search_package $PKGBUILD; then
|
||||||
echo "$CHKBUILD not found!" >> $TMPLOG
|
echo "$CHKBUILD not found!" >> $TMPLOG
|
||||||
@ -2776,6 +2778,12 @@ process_queue() {
|
|||||||
if [[ -f $SBOPKGTMP/sbopkg_build.lck ]]; then
|
if [[ -f $SBOPKGTMP/sbopkg_build.lck ]]; then
|
||||||
build_package $PKGPATH $PKGBUILD 2>&1 | tee $TMPBUILDLOG ||
|
build_package $PKGPATH $PKGBUILD 2>&1 | tee $TMPBUILDLOG ||
|
||||||
break
|
break
|
||||||
|
echo "Done building package for $PKG."
|
||||||
|
NEWPACKAGE=$(ls -1t $SB_OUTPUT/*.t?z | head -n1)
|
||||||
|
echo "Package $COUNTER: $PKG" >> $TMPSUMMARYLOG
|
||||||
|
#echo "$PKG:" >> $TMPSUMMARYLOG
|
||||||
|
echo "Built package: $NEWPACKAGE" >> $TMPSUMMARYLOG
|
||||||
|
echo "Built package: $NEWPACKAGE"
|
||||||
if [[ $QUEUETYPE == "buildinstall" ]]; then
|
if [[ $QUEUETYPE == "buildinstall" ]]; then
|
||||||
if [[ $SB_OUTPUT/*.t?z ]]; then
|
if [[ $SB_OUTPUT/*.t?z ]]; then
|
||||||
#install_package $SB_OUTPUT *.t?z
|
#install_package $SB_OUTPUT *.t?z
|
||||||
@ -2793,6 +2801,7 @@ process_queue() {
|
|||||||
echo "Not processed - build queue aborted." >> $TMPSUMMARYLOG
|
echo "Not processed - build queue aborted." >> $TMPSUMMARYLOG
|
||||||
echo >> $TMPSUMMARYLOG
|
echo >> $TMPSUMMARYLOG
|
||||||
fi
|
fi
|
||||||
|
COUNTER=$((COUNTER+1))
|
||||||
done
|
done
|
||||||
if [[ $KEEPLOG ]]; then
|
if [[ $KEEPLOG ]]; then
|
||||||
cat $TMPBUILDLOG >> $LOGFILE
|
cat $TMPBUILDLOG >> $LOGFILE
|
||||||
@ -2837,18 +2846,18 @@ start_dialog_queue() {
|
|||||||
# When using cli, the -b or -i option will determine whether we build or
|
# When using cli, the -b or -i option will determine whether we build or
|
||||||
# build and install.
|
# build and install.
|
||||||
|
|
||||||
dialog --title "Install Package(s)" --yes-label "Build" \
|
dialog --title "Install Package(s)" --yesno \
|
||||||
--no-label "Build and Install" --yesno \
|
"$(crunch "Would you like to install the packages as they are \
|
||||||
"$(crunch "Would you like to build the package(s) only, or \
|
built? Press <Yes> to install, <No> to build only, or <Esc> \
|
||||||
build and install the package(s)? (Press ESC to exit).")" 8 50
|
to exit.")" 8 50
|
||||||
case $? in
|
case $? in
|
||||||
255|-1 ) # The user pressed ESC
|
255|-1 ) # The user pressed ESC
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
1 ) # Build and install
|
0 ) # Build and install
|
||||||
process_queue buildinstall
|
process_queue buildinstall
|
||||||
;;
|
;;
|
||||||
0 ) # Build only
|
1 ) # Build only
|
||||||
process_queue build
|
process_queue build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user