autoport: added support for milestone rebuilds
- to enable set e.g. REBUILD_MILESTONE=mamba2 in /etc/sysconfig/autoport
This commit is contained in:
parent
498d0057e1
commit
eedc6e37fb
50
autoport
50
autoport
@ -290,12 +290,20 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
port_pkg_ver=$pkg_version
|
port_pkg_ver=$pkg_version
|
||||||
|
port_pkg_rel=$pkg_release
|
||||||
|
|
||||||
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH $p
|
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH $p
|
||||||
if [ "$pkg_name" ]; then
|
if [ "$pkg_name" ]; then
|
||||||
|
pkg_milestone=`echo $pkg_release | sed "s|[0-9.]*\(.*\)|\1|"`
|
||||||
if [ "$pkg_version" != "$port_pkg_ver" ]; then
|
if [ "$pkg_version" != "$port_pkg_ver" ]; then
|
||||||
echo "Package $pkg_name#${port_pkg_ver}($TARGET_ARCH) differs from $pkg_name#${pkg_version}($BASE_ARCH); port needed."
|
echo "Package $pkg_name#${port_pkg_ver}($TARGET_ARCH) differs from $pkg_name#${pkg_version}($BASE_ARCH); port needed."
|
||||||
JOB=(${JOB[*]} $p)
|
JOB=(${JOB[*]} $p)
|
||||||
|
elif [ "$pkg_release" != "$port_pkg_rel" ]; then
|
||||||
|
echo "Package $pkg_name#${port_pkg_ver}-${port_pkg_rel}($TARGET_ARCH) differs from $pkg_name#${pkg_version}-${pkg_release}($BASE_ARCH); port needed."
|
||||||
|
JOB=(${JOB[*]} $p)
|
||||||
|
elif [ "$REBUILD_MILESTONE" -a "$pkg_milestone" != "$REBUILD_MILESTONE" ]; then
|
||||||
|
echo "Package $pkg_name($TARGET_ARCH) was not built for '$REBUILD_MILESTONE' milestone; rebuild needed."
|
||||||
|
JOB=(${JOB[*]} $p)
|
||||||
else
|
else
|
||||||
echo "Package $pkg_name#${port_pkg_ver}($TARGET_ARCH) is up to date."
|
echo "Package $pkg_name#${port_pkg_ver}($TARGET_ARCH) is up to date."
|
||||||
fi
|
fi
|
||||||
@ -370,6 +378,14 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
JOB_FAILED=(${JOB_FAILED[*]} $JOB_CURRENT)
|
JOB_FAILED=(${JOB_FAILED[*]} $JOB_CURRENT)
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
pkg_release=
|
||||||
|
pkg_version=
|
||||||
|
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH ${JOB_CURRENT} || \
|
||||||
|
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $BASE_ARCH ${JOB_CURRENT} || \
|
||||||
|
get_pkg_buildinfo $DATADIR/$BASE_REPOSITORY $TARGET_ARCH ${JOB_CURRENT} || \
|
||||||
|
get_pkg_buildinfo $DATADIR/$BASE_REPOSITORY $BASE_ARCH ${JOB_CURRENT}
|
||||||
|
pkg_milestone=`echo $pkg_release | sed "s|[0-9.]*\(.*\)|\1|"`
|
||||||
|
pkg_numrelease=`echo $pkg_release | sed "s|\([0-9.]*\).*|\1|"`
|
||||||
DONT_PREPARE_THIS=
|
DONT_PREPARE_THIS=
|
||||||
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
|
||||||
@ -408,19 +424,43 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
} || {
|
} || {
|
||||||
echo -n "(OK) "
|
echo -n "(OK) "
|
||||||
}
|
}
|
||||||
|
elif [ "$REBUILD_MILESTONE" -a "$pkg_milestone" != "$REBUILD_MILESTONE" ]; then
|
||||||
|
echo -n "update"
|
||||||
|
[ "$pkg_repository" -a "$pkg_version" -a "$pkg_release" ] || {
|
||||||
|
echo "(FAILED) [can't get repository information for this package]"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
# FIXME: should be implemented in autodist
|
||||||
|
LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 ${pkg_version} ${pkg_numrelease}${REBUILD_MILESTONE} \
|
||||||
|
--changelog "$REBUILD_MILESTONE milestone rebuild" &>$tmpfile
|
||||||
|
[ $? -gt 0 ] && {
|
||||||
|
if [ "$VERBOSE_MODE" ]; then
|
||||||
|
echo
|
||||||
|
echo "Failed output:"
|
||||||
|
echo "=============="
|
||||||
|
cat $tmpfile
|
||||||
|
echo "=============="
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
cat $tmpfile >> $logfile
|
||||||
|
JOB_FAILED=(${JOB_FAILED[*]} $JOB_CURRENT)
|
||||||
|
echo "(FAILED)"
|
||||||
|
JOB_LOG=`grep "^?= See " $tmpfile | awk '{ print $3 }'`
|
||||||
|
[ "$JOB_LOG" ] || JOB_LOG=$tmpfile
|
||||||
|
continue
|
||||||
|
} || {
|
||||||
|
cat $tmpfile >> $logfile
|
||||||
|
echo -n "(OK) "
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
echo -n "port"
|
echo -n "port"
|
||||||
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH ${JOB_CURRENT} || \
|
|
||||||
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $BASE_ARCH ${JOB_CURRENT} || \
|
|
||||||
get_pkg_buildinfo $DATADIR/$BASE_REPOSITORY $TARGET_ARCH ${JOB_CURRENT} || \
|
|
||||||
get_pkg_buildinfo $DATADIR/$BASE_REPOSITORY $BASE_ARCH ${JOB_CURRENT}
|
|
||||||
[ "$pkg_repository" ] || {
|
[ "$pkg_repository" ] || {
|
||||||
echo "(FAILED) [can't get repository information for this package]"
|
echo "(FAILED) [can't get repository information for this package]"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
[ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ] && pkg_repository="$DEST_REPOSITORY"
|
[ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ] && pkg_repository="$DEST_REPOSITORY"
|
||||||
[ ! "$DONT_PREPARE_THIS" -a "$PORT_REPOSITORY" = "$DEST_REPOSITORY" ] && 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
|
||||||
[ $? -gt 0 ] && {
|
[ $? -gt 0 ] && {
|
||||||
if [ "$VERBOSE_MODE" ]; then
|
if [ "$VERBOSE_MODE" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user