autodist-repository: manage merging of packages without relying on base arch (i586)

This commit is contained in:
Silvan Calarco 2014-05-27 13:13:47 +02:00
parent 112abc68c6
commit 99ab1fe252

View File

@ -426,20 +426,30 @@ function import_package() {
# check release in dest repository
get_pkg_buildinfo $destrepository $a $import_pkg
[ "$pkg_name" ] && {
# IMPORT_ORIG_ARCHS=(${IMPORT_ORIG_ARCHS[*]} $a)
dest_ver=$pkg_version
dest_rel=$pkg_release
get_pkg_buildinfo $origrepository $a $import_pkg
[ "$pkg_name" ] || {
[ "$a" == "$basearch" ] && {
echo "Error: package $import_pkg does not exist in $origrepository($a); skipping."
return
for b in ${AUTODIST_ARCHS[*]}; do
if [ "$b" != "$a" ]; then
# Get upstream version in other architecture, then if same version -> merge
get_pkg_buildinfo $origrepository $b $import_pkg
fi
[ "$pkg_name" ] && break
done
if [ "$dest_ver-$dest_rel" != "$pkg_version-$pkg_release" ]; then
[ "$a" == "$basearch" -a "$force" != "1" ] && {
echo "Error: package $import_pkg for $a does not exist in $origrepository and can't merge due to different versions; skipping."
return 255
}
if [ "$force" = "1" ]; then
echo "Warning: package $import_pkg is missing in $origrepository($a) but present in $destrepository($a)."
echo "Warning: package $import_pkg for $a is missing in $origrepository but present in $destrepository."
echo "Import forced. You will need to port package to the missing arch."
else
echo "Error: package $import_pkg is missing in $origrepository($a). This would break package in $destrepository($a) repository."
echo "Error: package $import_pkg for $a is missing in $origrepository. This would break package in $destrepository($a) repository."
return 255
fi
fi
}
}
done