automaint: support importing from any architecture, not just base arch (i586)

This commit is contained in:
Silvan Calarco 2014-05-24 20:17:44 +02:00
parent 67497d1d4f
commit 70548ea687

View File

@ -159,34 +159,46 @@ for a in `seq 1 ${#ARCHS[*]}`; do
needportlist[$a-1]="${needport_list[*]}" needportlist[$a-1]="${needport_list[*]}"
done done
for p in ${pkglist[0]}; do tmpfile=`mktemp -q -t $me.XXXXXXXX` || {
pkgcontinue= echo "ERROR: cannot create temporary files." >&2
needsport= exit 1
}
for a in `seq 1 ${#ARCHS[*]}`; do
echo -n "${pkglist[$a-1]} " >> $tmpfile
done
allpkgs="`cat $tmpfile | xargs -n 1 | sort -u | xargs`"
rm -f $tmpfile
for p in ${allpkgs}; do
pkgcontinue=
needsport=
for a in `seq 1 ${#ARCHS[*]}`; do
for w in ${warningslist[*]}; do for w in ${warningslist[*]}; do
[ "$p" = "$w" ] && { pkgcontinue=1; break; } [ "$p" = "$w" ] && { pkgcontinue=1; break; }
done done
[ "$pkgcontinue" ] && continue [ "$pkgcontinue" ] && break
get_pkg_buildinfo $LOCAL_REPS_BASE_DIR/distromatic/$SOURCE_REPOSITORY ${ARCHS[0]} $p get_pkg_buildinfo $LOCAL_REPS_BASE_DIR/distromatic/$SOURCE_REPOSITORY ${ARCHS[$a-1]} $p
[ "$pkg_name" ] || {
#echo "$p: looks like a new package; skipping."
continue
}
for o in ${needportlist[*]}; do for o in ${needportlist[*]}; do
[ "$p" = "$o" ] && { needsport=1; break; } [ "$p" = "$o" ] && { needsport=1; break; }
done done
[ "$needsport" -a ! "$PORT_REPOSITORY" ] && continue [ "$needsport" -a ! "$PORT_REPOSITORY" ] && break
spkg_version=$pkg_version spkg_version=$pkg_version
spkg_release=$pkg_release spkg_release=$pkg_release
get_pkg_buildinfo $LOCAL_REPS_BASE_DIR/distromatic/$DEST_REPOSITORY ${ARCHS[0]} $p get_pkg_buildinfo $LOCAL_REPS_BASE_DIR/distromatic/$DEST_REPOSITORY ${ARCHS[$a-1]} $p
[ "$pkg_name" ] || {
echo "$p: looks like a new package; skipping."
continue
}
if [ "$pkg_version" = "$spkg_version" ]; then if [ "$pkg_version" = "$spkg_version" ]; then
if [ "$pkg_release" = "$spkg_release" ]; then if [ "$pkg_release" = "$spkg_release" ]; then
echo "$p: same release as upstream; skipping." echo "$p: same release as upstream; skipping."
continue break
fi fi
update_type="release" update_type="release"
else else
@ -201,12 +213,12 @@ for p in ${pkglist[0]}; do
if [ "$i" = "${#SVER[*]}" ]; then if [ "$i" = "${#SVER[*]}" ]; then
if [[ 64#${SVER[i-1]} -gt 64#89 && 64#${VER[i-1]} -lt 64#80 ]]; then if [[ 64#${SVER[i-1]} -gt 64#89 && 64#${VER[i-1]} -lt 64#80 ]]; then
[ "$VERBOSE" ] && echo "$p: dubious beta upgrade from ${VER[i-1]} to ${SVER[i-1]}; skipping." [ "$VERBOSE" ] && echo "$p: dubious beta upgrade from ${VER[i-1]} to ${SVER[i-1]}; skipping."
continue break
fi fi
update_type="minor" update_type="minor"
else else
[ "$VERBOSE" ] && echo "$p: dubious not-minor version update $i/${#SVER[*]}: ${SVER[i-1]} != ${VER[i-1]}; skipping." [ "$VERBOSE" ] && echo "$p: dubious not-minor version update $i/${#SVER[*]}: ${SVER[i-1]} != ${VER[i-1]}; skipping."
continue break
fi fi
fi fi
if [ "$needsport" ]; then if [ "$needsport" ]; then
@ -228,6 +240,8 @@ MESSAGE=`cgi_encodevar \"imported <b>$p</b> from <b>$SOURCE_REPOSITORY</b> to <b
fi fi
fi fi
fi fi
break
done
done done
exit 0 exit 0