autoport: add safety check that .spec version matches srcpkglist to fix packages sent in wrong repositories when the latter file is not up to date
This commit is contained in:
parent
7dcd16b2ca
commit
27d32d110e
8
autoport
8
autoport
@ -557,6 +557,14 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
autoport_log ${JOB_CURRENT} prepare failed $tmpfile
|
||||
continue
|
||||
} || {
|
||||
spec_version=`grep "^Version:" ${SPECDIR}/${JOB_CURRENT}.spec | awk '{ print $2}'`
|
||||
spec_release=`grep "^Release:" ${SPECDIR}/${JOB_CURRENT}.spec | awk '{ print $2}'`
|
||||
if [ "${spec_version}-${spec_release}" != "$src_version-$src_release" ]; then
|
||||
echo "< (FAILED) [wrong version ${src_version}-${src_release} != ${spec_version}-${spec_release}]"
|
||||
JOB_CANTPREPARE=(${JOB_CANTPREPARE[*]} $JOB_CURRENT)
|
||||
autoport_log ${JOB_CURRENT} prepare failed $tmpfile
|
||||
continue
|
||||
fi
|
||||
echo $JOB_CURRENT >> $DATAARCHDIR/preparedjobs
|
||||
echo -n "(OK) "
|
||||
autoport_log ${JOB_CURRENT} prepare ok $tmpfile
|
||||
|
Loading…
Reference in New Issue
Block a user