autodist: maybe fix for packages being sent to wrong repositories
This commit is contained in:
parent
f05b31368f
commit
487dbb2824
25
autoport
25
autoport
@ -33,7 +33,7 @@ ${me[0]} ${me[1]}
|
|||||||
-nr "$"Don't recurse build
|
-nr "$"Don't recurse build
|
||||||
--fix "$"Fix .la files for cross linking and exit
|
--fix "$"Fix .la files for cross linking and exit
|
||||||
-r "$"Work on given repository (default: $PORT_REPOSITORY)
|
-r "$"Work on given repository (default: $PORT_REPOSITORY)
|
||||||
-d "$"Release packages to given repository (default: $PORT_REPOSITORY)
|
-d "$"Release packages to given repository (default: work repository)
|
||||||
-h "$"Show this help and exit
|
-h "$"Show this help and exit
|
||||||
-s \"script_args\" "$"Send script_args as arguments for autodist update-specfile script
|
-s \"script_args\" "$"Send script_args as arguments for autodist update-specfile script
|
||||||
-u changelog "$"Rebuild packages with given changelog
|
-u changelog "$"Rebuild packages with given changelog
|
||||||
@ -524,6 +524,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DONT_PREPARE_THIS=
|
DONT_PREPARE_THIS=
|
||||||
|
RELEASE_UPDATED=
|
||||||
for p in ${JOB_CMDLINE[*]}; do
|
for p in ${JOB_CMDLINE[*]}; do
|
||||||
[ "$p" = "${JOB_CURRENT}" -o "$DONT_PREPARE_ANY" ] || continue
|
[ "$p" = "${JOB_CURRENT}" -o "$DONT_PREPARE_ANY" ] || continue
|
||||||
[ -e ${SPECDIR}/${JOB_CURRENT}.spec ] && DONT_PREPARE_THIS="$DONT_PREPARE"
|
[ -e ${SPECDIR}/${JOB_CURRENT}.spec ] && DONT_PREPARE_THIS="$DONT_PREPARE"
|
||||||
@ -570,6 +571,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
} || {
|
} || {
|
||||||
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
||||||
echo -n "(OK) "
|
echo -n "(OK) "
|
||||||
|
RELEASE_UPDATED=1
|
||||||
}
|
}
|
||||||
elif [ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ]; then
|
elif [ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ]; then
|
||||||
echo -n "update"
|
echo -n "update"
|
||||||
@ -584,6 +586,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
} || {
|
} || {
|
||||||
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
||||||
echo -n "(OK) "
|
echo -n "(OK) "
|
||||||
|
RELEASE_UPDATED=1
|
||||||
}
|
}
|
||||||
elif [ "$REBUILD_MILESTONE" -a "$src_milestone" != "$REBUILD_MILESTONE" ]; then
|
elif [ "$REBUILD_MILESTONE" -a "$src_milestone" != "$REBUILD_MILESTONE" ]; then
|
||||||
echo -n "update"
|
echo -n "update"
|
||||||
@ -615,6 +618,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
cat $tmpfile >> $logfile
|
cat $tmpfile >> $logfile
|
||||||
echo -n "(OK) "
|
echo -n "(OK) "
|
||||||
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
||||||
|
RELEASE_UPDATED=1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -624,15 +628,14 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
autoport_log ${JOB_CURRENT} port failed
|
autoport_log ${JOB_CURRENT} port failed
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$DONT_PREPARE_THIS" = "1" -a "$src_repository" != "$PORT_REPOSITORY" ]; then
|
SEND_REPOSITORY=$DEST_REPOSITORY
|
||||||
# if both -np and -r were given send to PORT_REPOSITORY instead of src_repository
|
if [ ! "$RELEASE_UPDATED" -a ! "$DONT_PREPARE_THIS" ]; then
|
||||||
src_repository=$PORT_REPOSITORY
|
SEND_REPOSITORY=$src_repository
|
||||||
fi
|
fi
|
||||||
[ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ] && src_repository="$DEST_REPOSITORY"
|
[ ! "$DONT_PREPARE_THIS" -a ! "$RELEASE_UPDATED" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
||||||
[ ! "$DONT_PREPARE_THIS" -a "$PORT_REPOSITORY" = "$DEST_REPOSITORY" -a ! "$REBUILD_MILESTONE" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
|
||||||
[ "$VERBOSE_MODE" ] && echo "
|
[ "$VERBOSE_MODE" ] && echo "
|
||||||
%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $src_repository --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
||||||
LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $src_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 $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS &>$tmpfile
|
||||||
[ $? -gt 0 ] && {
|
[ $? -gt 0 ] && {
|
||||||
if [ "$VERBOSE_MODE" ]; then
|
if [ "$VERBOSE_MODE" ]; then
|
||||||
echo
|
echo
|
||||||
@ -659,10 +662,10 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
if [ "$WEBBUILD_URL" -a "$WEBBUILD_USER" ]; then
|
if [ "$WEBBUILD_URL" -a "$WEBBUILD_USER" ]; then
|
||||||
if [ "$WEBBUILD_USER_CMDLINE" ]; then
|
if [ "$WEBBUILD_USER_CMDLINE" ]; then
|
||||||
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\
|
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\
|
||||||
MESSAGE=`cgi_encodevar \"(invoked by $WEBBUILD_USER_CMDLINE) ported <b>$JOB_CURRENT</b> to <b>$TARGET_ARCH</b> and sent it to <b>$src_repository</b>\"`" >/dev/null
|
MESSAGE=`cgi_encodevar \"(invoked by $WEBBUILD_USER_CMDLINE) ported <b>$JOB_CURRENT</b> to <b>$TARGET_ARCH</b> and sent it to <b>$SEND_REPOSITORY</b>\"`" >/dev/null
|
||||||
else
|
else
|
||||||
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\
|
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\
|
||||||
MESSAGE=`cgi_encodevar \"ported <b>$JOB_CURRENT</b> to <b>$TARGET_ARCH</b> and sent it to <b>$src_repository</b>\"`" >/dev/null
|
MESSAGE=`cgi_encodevar \"ported <b>$JOB_CURRENT</b> to <b>$TARGET_ARCH</b> and sent it to <b>$SEND_REPOSITORY</b>\"`" >/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -770,4 +773,4 @@ MESSAGE=`cgi_encodevar \"ported <b>$JOB_CURRENT</b> to <b>$TARGET_ARCH</b> and s
|
|||||||
rm -f $tmpfile $tmpfile1
|
rm -f $tmpfile $tmpfile1
|
||||||
done
|
done
|
||||||
echo "* All jobs completed. See $logfile for details."
|
echo "* All jobs completed. See $logfile for details."
|
||||||
exit 0
|
exit ${#JOB_FAILED[*]}
|
||||||
|
Loading…
Reference in New Issue
Block a user