Skip to content

Commit b72816f

Browse files
author
emmett1
committed
revert logging
1 parent 9b186bf commit b72816f

File tree

2 files changed

+8
-58
lines changed

2 files changed

+8
-58
lines changed

INSTALL.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ install -d ${DESTDIR}${REVDEPD}
1515
install -dm777 ${DESTDIR}${CACHE_DIR}/packages
1616
install -dm777 ${DESTDIR}${CACHE_DIR}/sources
1717
install -dm777 ${DESTDIR}${CACHE_DIR}/work
18-
install -dm777 ${DESTDIR}${CACHE_DIR}/log
1918

2019
install -m755 xchroot revdep pkgadd pkgdel pkgbuild pkgquery scratch updateconf ${DESTDIR}${BINDIR}
2120
install -m644 scratchpkg.conf scratchpkg.repo scratchpkg.alias ${DESTDIR}${CONFDIR}

scratch

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ scratch_build() {
481481
while [ "$1" ]; do
482482
case $1 in
483483
-i|-u|-r|-g|-p) ;;
484-
--log) LOGBUILD=1;;
485484
-*) OPTS="$OPTS $1";;
486485
*) PKGNAME="$PKGNAME $1";;
487486
esac
@@ -498,12 +497,7 @@ scratch_build() {
498497
}
499498
cd $ppath
500499
settermtitle "Building $pkg..."
501-
if [ "$LOGBUILD" = 1 ]; then
502-
pkgbuild $OPTS | tee $LOG_DIR/$pkg.log
503-
else
504-
pkgbuild $OPTS
505-
fi
506-
[ "$?" = 0 ] || {
500+
pkgbuild $OPTS || {
507501
settermtitle "Building $pkg failed."
508502
return 1
509503
}
@@ -520,7 +514,6 @@ scratch_install() {
520514
-r|--reinstall) REINSTALL=1;;
521515
-y|--yes) NOCONFIRM=1;;
522516
-n|--no-dep) NO_DEP=1;;
523-
--log) LOGBUILD=1;;
524517
--exclude=*) EXOPT=$1;;
525518
-*) OPTS="$OPTS $1";;
526519
*) PKGNAME="$PKGNAME $1";;
@@ -542,12 +535,7 @@ scratch_install() {
542535
else
543536
cd $(getportpath $ii)
544537
settermtitle "Reinstalling $ii..."
545-
if [ "$LOGBUILD" = 1 ]; then
546-
pkgbuild $OPTS -r | tee $LOG_DIR/$ii.log
547-
else
548-
pkgbuild $OPTS -r
549-
fi
550-
[ "$?" = 0 ] || {
538+
pkgbuild $OPTS -r || {
551539
error=1
552540
break
553541
}
@@ -571,12 +559,7 @@ scratch_install() {
571559
else
572560
cd $(getportpath $ii)
573561
settermtitle "Installing $ii..."
574-
if [ "$LOGBUILD" = 1 ]; then
575-
pkgbuild $OPTS -i | tee $LOG_DIR/$ii.log
576-
else
577-
pkgbuild $OPTS -i
578-
fi
579-
[ "$?" = 0 ] || {
562+
pkgbuild -i $OPTS || {
580563
error=1
581564
break
582565
}
@@ -623,12 +606,7 @@ scratch_install() {
623606
if portpathh=$(getportpath $int); then
624607
cd $portpathh
625608
settermtitle "[ $count/$total ] installing $int..."
626-
if [ "$LOGBUILD" = 1 ]; then
627-
pkgbuild $OPTS -i | tee $LOG_DIR/$int.log
628-
else
629-
pkgbuild $OPTS -i
630-
fi
631-
[ "$?" = 0 ] || {
609+
pkgbuild -i $OPTS || {
632610
error=1
633611
count=$(( count - 1 ))
634612
break
@@ -722,7 +700,6 @@ scratch_sysup() {
722700
-i|-u|-r) ;;
723701
-y|--yes) NOCONFIRM=1;;
724702
-n|--no-dep) NODEP=1;;
725-
--log) LOGBUILD=1;;
726703
--exclude=*) EXOPT=$1;;
727704
-*) OPTS="$OPTS $1";;
728705
esac
@@ -779,24 +756,14 @@ scratch_sysup() {
779756
cd $(getportpath $inst)
780757
if ! isinstalled $inst; then
781758
settermtitle "[ $count/$total ] Installing $inst..."
782-
if [ "$LOGBUILD" = 1 ]; then
783-
pkgbuild $OPTS -i | tee $LOG_DIR/$inst.log
784-
else
785-
pkgbuild $OPTS -i
786-
fi
787-
[ "$?" = 0 ] || {
759+
pkgbuild -i $OPTS || {
788760
error=1
789761
count=$(( count - 1 ))
790762
break
791763
}
792764
else
793765
settermtitle "[ $count/$total ] Upgrading $inst..."
794-
if [ "$LOGBUILD" = 1 ]; then
795-
pkgbuild $OPTS -u | tee $LOG_DIR/$inst.log
796-
else
797-
pkgbuild $OPTS-u
798-
fi
799-
[ "$?" = 0 ] || {
766+
pkgbuild -u $OPTS || {
800767
error=1
801768
count=$(( count - 1 ))
802769
break
@@ -818,7 +785,6 @@ scratch_upgrade() {
818785
-i|-r) ;;
819786
-y|--yes) NOCONFIRM=1;;
820787
-d|--no-dep) NO_DEP=1;;
821-
--log) LOGBUILD=1;;
822788
--exclude=*) EXOPT=$1;;
823789
-*) OPTS="$OPTS $1";;
824790
*) PKGNAME="$PKGNAME $1";;
@@ -887,24 +853,14 @@ scratch_upgrade() {
887853
cd $(getportpath $inst)
888854
if ! isinstalled $inst; then
889855
settermtitle "[ $count/$total ] Installing $inst..."
890-
if [ "$LOGBUILD" = 1 ]; then
891-
pkgbuild $OPTS -i | tee $LOG_DIR/$inst.log
892-
else
893-
pkgbuild $OPTS -i
894-
fi
895-
[ "$?" = 0 ] || {
856+
pkgbuild -i $OPTS || {
896857
error=1
897858
count=$(( count - 1 ))
898859
break
899860
}
900861
else
901862
settermtitle "[ $count/$total ] Upgrading $inst..."
902-
if [ "$LOGBUILD" = 1 ]; then
903-
pkgbuild $OPTS -u | tee $LOG_DIR/$inst.log
904-
else
905-
pkgbuild $OPTS -u
906-
fi
907-
[ "$?" = 0 ] || {
863+
pkgbuild -u $OPTS || {
908864
error=1
909865
count=$(( count - 1 ))
910866
break
@@ -1185,13 +1141,11 @@ Options:
11851141
-r|--reinstall reinstall
11861142
-n|--no-dep skip dependencies
11871143
-y|--yes skip ask user permission
1188-
--log log build process
11891144
--exclude=* exclude dependencies, comma separated
11901145
11911146
upgrade <ports> <arg> upgrade ports (use pkgbuild arg, except '-i' & '-r')
11921147
-n|--no-dep skip dependencies
11931148
-y|--yes skip ask user permission
1194-
--log log build process
11951149
--exclude=* exclude dependencies, comma separated
11961150
11971151
remove <ports> <arg> remove installed ports (use pkgdel arg)
@@ -1200,15 +1154,13 @@ Options:
12001154
sysup <arg> full system upgrade (use pkgbuild arg, except '-i', '-r' & '-u')
12011155
-n|--no-dep skip dependencies
12021156
-y|--yes skip ask user permission
1203-
--log log build process
12041157
--exclude=* exclude dependencies, comma separated
12051158
12061159
deplist <ports> print all dependencies for ports
12071160
-q|--quick skip installed ports
12081161
--exclude=* exclude dependencies, comma separated
12091162
12101163
build <ports> <arg> build ports (use pkgbuild arg, except '-i', '-u', '-r', '-g', & '-p')
1211-
--log log build process
12121164
12131165
lock <ports> locking ports prevent upgrade
12141166
unlock <ports> unlock locked ports
@@ -1240,7 +1192,6 @@ ALIAS_FILE="/etc/scratchpkg.alias"
12401192
# default value from pkgbuild
12411193
SOURCE_DIR="/var/cache/scratchpkg/sources"
12421194
PACKAGE_DIR="/var/cache/scratchpkg/packages"
1243-
LOG_DIR="/var/cache/scratchpkg/log"
12441195
COMPRESSION_MODE="xz"
12451196

12461197
mode=$1

0 commit comments

Comments
 (0)