~medicalwei/germinate:handle-git-subdir

Last commit made on 2023-12-10
Get this branch:
git clone -b handle-git-subdir https://git.launchpad.net/~medicalwei/germinate
Only Yao Wei can upload to this branch. If you are Yao Wei please log in for upload directions.

Branch merges

Branch information

Name:
handle-git-subdir
Repository:
lp:~medicalwei/germinate

Recent commits

67e4aed... by Yao Wei

Handle including git subdir like "ubuntu.noble/languages"

Previously, to check out seeds in Bazaar repos, we use
notations like "ubuntu.noble/languages" to indicate checking
out "languages" subdirectory inside "noble" branch.

This workaround is to ensure the backward compatibility with
bzr repos. However, this implies we cannot include "/" in
git branch name, otherwise it will be recognized as a
subdirectory name in germinate.

Git itself does not provide a convenient function to check
out a subdirectory of a repo, therefore we remove the path
and attempt to check out the entire repo, which it might be
previously checked out.

Succeeded
[SUCCEEDED] test:0 (build)
11 of 1 result
65c0f49... by Colin Watson

Add changelog entry for previous commit

Succeeded
[SUCCEEDED] test:0 (build)
11 of 1 result
6984b0c... by Michael Hudson-Doyle

perform shallow clones of seed repos

The repos are not very large to start with but it does make a noticeable
difference for me (8s vs 5s or so)

901de5b... by Colin Watson

releasing package germinate version 2.42

ccd1afd... by Julian Andres Klode

tox: lint: Add virtualenv to deps to fix CI

With virtualenv being in the deps, it will install virtualenv
from/matching the host into the tox directory, rather than the
latest virtualenv, which then makes CI work again.

9d331cc... by Julian Andres Klode

Allow seeds to declare alternative dependencies as fallbacks

These are not resolved further, but only added to the generated meta
package dependencies.

The design decision here is to impact as little as possible, so instead
of modifying the seed entries to track the alternatives there, we track
the alternatives in a separate per-seed dictionary.

When writing out the dependency files with germinate-update-metapackage,
we reconstruct the alternatives when generating the package list. An
alternative approach would be to reconstruct the alternatives during the
write out only, or record them in separate files, but doing it at the
list levels allows the delta to be calculated, for example, changing
`systemd-timesyncd` seed entry to `systemd-timesyncd | time-daemon`
yield:

  * Refreshed dependencies
  * Added systemd-timesyncd | time-daemon to cloud-minimal
  * Removed systemd-timesyncd from cloud-minimal

Arguably it would be nice to resolve alternatives further, but doing
so would require significantly more effort.

The change to the `systemd-timesyncd` seed entry above that this enables
allows us to:

- apt install chrony after installing the task
- apt install ubuntu-cloud-minimal chrony in one go

But it still prevents us from `apt install cloud-minimal^ chrony` using
the `cloud-minimal^` task expansion as that still resolves to
systemd-timesyncd.

3e315eb... by Colin Watson

releasing package germinate version 2.41

dacb6b7... by Colin Watson

Remove germinate/tests/test_lint.py

It wasn't set up to honour the top-level setup.cfg when run from
pybuild, and lint checks are handled by pre-commit hooks now anyway.

4d6472e... by Colin Watson

releasing package germinate version 2.40

0f4cd97... by Colin Watson

Simplify configparser imports

We don't need Python 2 compatibility any more.