Previewing the result of a seed change

Hi all,

Last week I was working on bringing up to date the project docs on seeds. This, and some other changes I wanted to make, reminded me that understanding the impact of a change to seeds can be a little hard to see: you can clearly see that a change drops a package out of a seed or whatever but what you can’t see is that when you rebuild the meta package, various other packages are no longer included in the image, or try to drop out of main or whatever.

So I built (largely vibe coded, honestly) germidiff, a tool to show the changes that will result from a change:

(resolute)michael.hudson@canonical.com@dagmor:~/src/ubuntu/ubuntu-seeds/ubuntu.resolute$ ~/src/germidiff/bin/germidiff . 6825ef01f67db9a17c4826a070b55f9a241755e8^ 6825ef01f67db9a17c4826a070b55f9a241755e8 
germidiff: collection under test: ubuntu.resolute (/home/michael.hudson@canonical.com/src/ubuntu/ubuntu-seeds/ubuntu.resolute)
germidiff: ubuntu.resolute is the ubuntu collection of resolute, germinated against main restricted
germidiff: using chdist resolute (/home/michael.hudson@canonical.com/.cache/germidiff/chdists/resolute)
germidiff: updating apt lists for resolute
germidiff: archive metadata: /home/michael.hudson@canonical.com/.cache/germidiff/chdists/resolute/etc/apt/apt.conf (amd64, main restricted)
germidiff: ubuntu.resolute/languages is nested inside ubuntu.resolute and comes with it
germidiff: holding platform.resolute fixed at /home/michael.hudson@canonical.com/src/ubuntu/ubuntu-seeds/platform.resolute (1c07583 supported-kernel-common: Add linux-main-modules for riscv)
germidiff: running: germinate --seed-source /tmp/germidiff-bi13m6k6/old/seeds --seed-dist ubuntu.resolute --apt-config /home/michael.hudson@canonical.com/.cache/germidiff/chdists/resolute/etc/apt/apt.conf --arch amd64 --no-rdepends (in /tmp/germidiff-bi13m6k6/old/out)
germidiff: running: germinate --seed-source /tmp/germidiff-bi13m6k6/new/seeds --seed-dist ubuntu.resolute --apt-config /home/michael.hudson@canonical.com/.cache/germidiff/chdists/resolute/etc/apt/apt.conf --arch amd64 --no-rdepends (in /tmp/germidiff-bi13m6k6/new/out)
germidiff: probing: germinating twice more
**assuming the metapackages are rebuilt**
pollinate dropped from ubuntu-cloud-minimal, ubuntu-server,
ubuntu-server-minimal, which are built from these seeds

**global**
-pollinate

**server-cloud-minimal**
-curl
-libbrotli1
-libcurl4t64
-libgnutls30t64
-libhogweed6t64
-libidn2-0
-libldap-common
-libldap2
-libnettle8t64
-libnghttp2-14
-libp11-kit0
-libpsl5t64
-librtmp1
-libsasl2-2
-libsasl2-modules-db
-libssh2-1t64
-libtasn1-6
-libunistring5
-pollinate
-xxd

**cloud-minimal** (including inherited seeds)
-curl
-libbrotli1
-libcurl4t64
-libldap-common
-libldap2
-libnghttp2-14
-librtmp1
-libsasl2-2
-libsasl2-modules-db
-libssh2-1t64
-pollinate
-xxd

**cloud-image**
-pollinate

**server-minimal** (including inherited seeds)
-curl
-libbrotli1
-libcurl4t64
-libldap-common
-libldap2
-libnghttp2-14
-libpsl5t64
-librtmp1
-libsasl2-2
-libsasl2-modules-db
-libssh2-1t64
-pollinate
-xxd

**server-ship-live** (including inherited seeds)
+libsasl2-modules
+publicsuffix
-curl
-pollinate
-xxd

**supported** (including inherited seeds)
-pollinate

**server**
-pollinate

**server-raspi** (including inherited seeds)
-pollinate

**server-live** (including inherited seeds)
-pollinate

You can run it to compare two local git refs or against a Launchpad MP which will figure all of this out for you:

$ ~/src/germidiff/bin/germidiff-mp https://code.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/platform/+merge/510585 --quiet
germidiff of https://code.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/platform/+merge/510585
platform.stonking, dcca0817959e..0f43dd6ffade, against stonking (main restricted)

**global**
(no net change across all seeds)

**build-essential** (removed seed)
62 packages, all still pulled in by other seeds

**no longer seeded, still pulled in**
all 5 held by hard dependencies: dpkg-dev, g++, gcc, libc6-dev, make

I hope this comes in useful for people. If it does I might look at hooking things up to automatically post the tools output onto all seed MPs but one thing at a time.

2 Likes