Merge lp:~vorlon/ubuntu-archive-tools/clean-NBS-for-EOL into lp:ubuntu-archive-tools

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1334
Proposed branch: lp:~vorlon/ubuntu-archive-tools/clean-NBS-for-EOL
Merge into: lp:ubuntu-archive-tools
Diff against target: 22 lines (+18/-0)
1 file modified
cleanup-NBS-for-EOL (+18/-0)
To merge this branch: bzr merge lp:~vorlon/ubuntu-archive-tools/clean-NBS-for-EOL
Reviewer Review Type Date Requested Status
Brian Murray Approve
Adam Conrad Pending
Ubuntu Package Archive Administrators Pending
Review via email: mp+382047@code.launchpad.net

Description of the change

This is what I'm running in practice in order for us to be able to EOL disco; stashing it so we don't have to reinvent the wheel each cycle...

To post a comment you must log in.
1308. By Steve Langasek

handle both updates and security. Ignore failures from remove-package, usually caused by it already being removed.

1309. By Steve Langasek

Don't use xargs, which will cause permanent failures.

Some of the packages in the update_output list are not in -updates or
-security at all, they're only in the release pocket; so batching them in a
remove-package command with others will cause failures no matter how many
times we rerun. We need to process the removals one-by-one instead.

Revision history for this message
Brian Murray (brian-murray) wrote :

What would happen if DIST was the current or active development series? Should there be a safe guard in place?

review: Needs Information
Revision history for this message
Steve Langasek (vorlon) wrote :

Brian, if run against the development series, it would effectively be a no-op, since there are no packages published to -updates or -security during development (and definitely not more than one kernel update, that would result in NBS binaries being left behind).

If run against a non-EOL series (in particular, a non-EOL LTS series, for which we do debian-installer SRUs), the impact would be that users who are locally using a netboot image that is not current will find that the udebs their netboot image references are no longer available in the archive. I do not think this is important to guard against, since we are unlikely to accidentally run this command against a non-EOL release, and the archive can't protect us from running it against a non-EOL release because it can only be run against a series in the archive that is still /open/, and the solution for users impacted if we do accidentally run it is to update to a current netboot image.

Revision history for this message
Brian Murray (brian-murray) wrote :

Okay, thanks for the additional information. This looks good to me then.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'cleanup-NBS-for-EOL'
2--- cleanup-NBS-for-EOL 1970-01-01 00:00:00 +0000
3+++ cleanup-NBS-for-EOL 2020-04-10 17:06:36 +0000
4@@ -0,0 +1,18 @@
5+#!/bin/sh
6+set -e
7+
8+DIST="$1"
9+
10+if [ -z "$DIST" ]; then
11+ echo "Usage: $0 DIST"
12+ exit 1
13+fi
14+wget -O - -q \
15+ https://people.canonical.com/~ubuntu-archive/proposed-migration/"$DIST"/update_output.txt \
16+| sed -e'1,/Removing packages left in testing/d; /^[^[:space:]]/,$d; s/^[[:space:]]*//; s/:.*//' \
17+| grep -E '^linux|-di$' \
18+| while read pkgs; do
19+ remove-package -b -s "$DIST"-updates -m NBS -y $pkgs || true
20+ remove-package -b -s "$DIST"-security -m NBS -y $pkgs || true
21+done
22+

Subscribers

People subscribed via source and target branches