autoport: added epoch support for added BuildRequirements in rebuild mode

This commit is contained in:
Silvan Calarco 2022-06-08 15:40:24 +02:00
parent de810c1bd7
commit 5c9a10871d

View File

@ -162,6 +162,7 @@ function get_pkg_buildinfo() {
pkg_buildtime=${pkg_header[7]}; pkg_buildtime=${pkg_header[7]};
pkg_altrep=${pkg_header[8]}; pkg_altrep=${pkg_header[8]};
pkg_repository=${pkg_header[9]}; pkg_repository=${pkg_header[9]};
pkg_epoch=${pkg_header[10]};
return 0 return 0
fi fi
unset pkg_name pkg_arch pkg_version pkg_release \ unset pkg_name pkg_arch pkg_version pkg_release \
@ -395,6 +396,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH $j get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH $j
port_pkg_list=${pkg_needrebuild[*]} port_pkg_list=${pkg_needrebuild[*]}
port_pkg_builds=" ${pkg_builds[*]} " port_pkg_builds=" ${pkg_builds[*]} "
port_pkg_epoch=$pkg_epoch
port_pkg_version=$pkg_version port_pkg_version=$pkg_version
port_pkg_release=$pkg_release port_pkg_release=$pkg_release
currrebuild= currrebuild=
@ -413,7 +415,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
if [ "$port_pkgbuilds/ $currprovider-devel }" != "$port_pkgbuilds" ]; then if [ "$port_pkgbuilds/ $currprovider-devel }" != "$port_pkgbuilds" ]; then
currprovider=${currprovider}-devel currprovider=${currprovider}-devel
fi fi
currjobscriptargs="$currjobscriptargs --buildreq ${currprovider} >= $port_pkg_version-$port_pkg_release " currjobscriptargs="$currjobscriptargs --buildreq ${currprovider} >= ${port_pkg_epoch}:${port_pkg_version}-${port_pkg_release} "
done done
[ "$currjobscriptargs" ] && JOB_SCRIPTARGS[$JOBNUM-1]="$currjobscriptargs" [ "$currjobscriptargs" ] && JOB_SCRIPTARGS[$JOBNUM-1]="$currjobscriptargs"
echo "Package dependant from $j to rebuild: ${JOB[*]}" echo "Package dependant from $j to rebuild: ${JOB[*]}"