Only act on sources.

master
Simon Quigley 6 years ago
parent a2e93a13d5
commit 74e9399ee1

@ -17,15 +17,18 @@ for RELEASE in $RELEASES; do
egrep -v '^#' britney_output/$BRITNEY_TIMESTAMP/HeidiOutputDelta > candidates || echo "No candidates found."; egrep -v '^#' britney_output/$BRITNEY_TIMESTAMP/HeidiOutputDelta > candidates || echo "No candidates found.";
while read -r -a package; do while read -r -a package; do
if [ $ARCHIVE_TYPE = "ppa" ]; then # This only acts on sources; binaries require manual cleanup
COPY="./ubuntu-archive-tools/copy-package" if [ ${#package[@]} = 2 ];
REMOVE="./ubuntu-archive-tools/remove-package" if [ $ARCHIVE_TYPE = "ppa" ]; then
if echo ${package[0]} | egrep -q "^-"; then COPY="./ubuntu-archive-tools/copy-package"
$COPY -y -b -s $RELEASE --from "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --to "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --version "${package[1]}" "`echo ${package[0]} | sed 's/-//'`"; REMOVE="./ubuntu-archive-tools/remove-package"
$REMOVE -y -s $RELEASE --archive "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --version "${package[1]}" --removal-comment="demoted to proposed" "`echo ${package[0]} | sed 's/-//'`"; if echo ${package[0]} | egrep -q "^-"; then
else $COPY -y -b -s $RELEASE --from "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --to "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --version "${package[1]}" "`echo ${package[0]} | sed 's/-//'`";
$COPY -y -b -s $RELEASE --from "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --to "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --version "${package[1]}" "${package[0]}"; $REMOVE -y -s $RELEASE --archive "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --version "${package[1]}" --removal-comment="demoted to proposed" "`echo ${package[0]} | sed 's/-//'`";
$REMOVE -y -s $RELEASE --archive "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --version "${package[1]}" --removal-comment="moved to release" "${package[0]}"; else
$COPY -y -b -s $RELEASE --from "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --to "ppa:$LP_TEAM/ubuntu/$DEST_PPA" --version "${package[1]}" "${package[0]}";
$REMOVE -y -s $RELEASE --archive "ppa:$LP_TEAM/ubuntu/$SOURCE_PPA" --version "${package[1]}" --removal-comment="moved to release" "${package[0]}";
fi
fi fi
fi fi
done < candidates; done < candidates;

Loading…
Cancel
Save