autoport: log naming using timestamp, fix detection of install requirements
- name logfiles using timestamp (TODO: a logfile cleaner) - if both -np and -r were given send to PORT_REPOSITORY instead of pkg_repository - fix detection of install requirements
This commit is contained in:
parent
dd53d60b85
commit
0d02eac831
18
autoport
18
autoport
@ -245,9 +245,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
[ -d $DATADIR/$BASE_REPOSITORY ] || mkdir -p $DATADIR/$BASE_REPOSITORY
|
[ -d $DATADIR/$BASE_REPOSITORY ] || mkdir -p $DATADIR/$BASE_REPOSITORY
|
||||||
[ -d $DATADIR/$PORT_REPOSITORY ] || mkdir -p $DATADIR/$PORT_REPOSITORY
|
[ -d $DATADIR/$PORT_REPOSITORY ] || mkdir -p $DATADIR/$PORT_REPOSITORY
|
||||||
|
|
||||||
logfile=$DATAARCHDIR/$PORT_REPOSITORY.log
|
logdate=`date +"%F@%T"`
|
||||||
[ -e $logfile ] && mv -f $logfile $DATAARCHDIR/$PORT_REPOSITORY-last.log
|
logfile=$DATAARCHDIR/$logdate.log
|
||||||
|
# [ -e $logfile ] && mv -f $logfile $DATAARCHDIR/$PORT_REPOSITORY-last.log
|
||||||
> $logfile
|
> $logfile
|
||||||
|
ln -sf $logdate.log $DATAARCHDIR/current.log
|
||||||
|
|
||||||
BUILD_PLATFORM=`rpm --target $TARGET_ARCH --eval %{_build}`
|
BUILD_PLATFORM=`rpm --target $TARGET_ARCH --eval %{_build}`
|
||||||
BUILD_CPU=`echo $BUILD_PLATFORM | cut -d- -f1`
|
BUILD_CPU=`echo $BUILD_PLATFORM | cut -d- -f1`
|
||||||
@ -461,10 +463,14 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
echo -n "port"
|
echo -n "port"
|
||||||
[ "$pkg_repository" ] || {
|
if [ ! "$pkg_repository" -a "$DONT_PREPARE_THIS" != "1" ]; then
|
||||||
echo "(FAILED) [can't get repository information for this package]"
|
echo "(FAILED) [can't get repository information for this package]"
|
||||||
continue
|
continue
|
||||||
}
|
fi
|
||||||
|
if [ "$DONT_PREPARE_THIS" = "1" -a "$pkg_repository" != "$PORT_REPOSITORY" ]; then
|
||||||
|
# if both -np and -r were given send to PORT_REPOSITORY instead of pkg_repository
|
||||||
|
pkg_repository=$PORT_REPOSITORY
|
||||||
|
fi
|
||||||
[ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ] && pkg_repository="$DEST_REPOSITORY"
|
[ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ] && pkg_repository="$DEST_REPOSITORY"
|
||||||
[ ! "$DONT_PREPARE_THIS" -a "$PORT_REPOSITORY" = "$DEST_REPOSITORY" -a ! "$REBUILD_MILESTONE" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
[ ! "$DONT_PREPARE_THIS" -a "$PORT_REPOSITORY" = "$DEST_REPOSITORY" -a ! "$REBUILD_MILESTONE" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
||||||
LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $pkg_repository --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS &>$tmpfile
|
LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $pkg_repository --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS &>$tmpfile
|
||||||
@ -491,7 +497,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
echo -n "(OK) "
|
echo -n "(OK) "
|
||||||
}
|
}
|
||||||
echo -n "install"
|
echo -n "install"
|
||||||
LANG=C LC_ALL=C autodist -i ${JOB_CURRENT} --arch $TARGET_ARCH --force --severity 2 -- $STAGEOPTS &>>$tmpfile
|
LANG=C LC_ALL=C autodist -i ${JOB_CURRENT} --arch $TARGET_ARCH --force --severity 2 -- $STAGEOPTS &>$tmpfile
|
||||||
# --server $DEST_REPOSITORY --repository $PORT_REPOSITORY
|
# --server $DEST_REPOSITORY --repository $PORT_REPOSITORY
|
||||||
[ $? -gt 0 ] && {
|
[ $? -gt 0 ] && {
|
||||||
if [ "$VERBOSE_MODE" ]; then
|
if [ "$VERBOSE_MODE" ]; then
|
||||||
@ -512,7 +518,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
JOB_MAYBEINSTALLED_NEW=(${JOB_MAYBEINSTALLED_NEW[*]} $JOB_CURRENT)
|
JOB_MAYBEINSTALLED_NEW=(${JOB_MAYBEINSTALLED_NEW[*]} $JOB_CURRENT)
|
||||||
JOB_LOG=`grep "^?= See " $tmpfile | awk '{ print $3 }'`
|
JOB_LOG=`grep "^?= See " $tmpfile | awk '{ print $3 }'`
|
||||||
[ "$JOB_LOG" ] || JOB_LOG=$tmpfile
|
[ "$JOB_LOG" ] || JOB_LOG=$tmpfile
|
||||||
find_requirements $JOB_LOG
|
[ ! "$REBUILD_MILESTONE" ] && find_requirements $JOB_LOG
|
||||||
continue
|
continue
|
||||||
} || {
|
} || {
|
||||||
cat $tmpfile >> $logfile
|
cat $tmpfile >> $logfile
|
||||||
|
Loading…
Reference in New Issue
Block a user