Skip to contentSkip to conversation

bitbake-setup: use non-destructive 'update' mode of the git fetcher

PATCH Superseded Alexander Kanavin 1 participant 1 message Mar 19

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-setup: use non-destructive 'update' mode of the git fetcher

From: Alexander Kanavin <[email protected]>

This allows removing the git hook that prohibited making commits in repositories under layers/, significantly improving user experience.

bitbake-setup logic is adjusted to account for these situations:

- if a git checkout is being replaced with a local symlink, that checkout is moved to a backup location, regardless of whether it has local changes or not
- if a git checkout has uncommited changes, the 'update' mode is going to fail. Bitbake-setup anticipates this, and stashes these changes, with a warning.

The tests are modified so that:

- the check for layer backups is run earlier, and check that backups happen when they're supposed to (which should be just once).

- the test that previously checked that local commits are rejected is adjusted to check that such a commit is accepted, and layer is updated from remote without creating a backup directory.

- a test is added to force a rebase conflict on update, and check that it indeed happens. We can think of better ways to handle rebase conflicts in bitbake-setup later on; right now it simply stops at that point.

---
 aaaa                  |  0
 bin/bitbake-setup     | 42 ++++++++----------------------------------
 lib/bb/tests/setup.py | 42 +++++++++++++++++++++++++++---------------
 3 files changed, 35 insertions(+), 49 deletions(-)
 create mode 100644 aaaa
aaaa new file +0 -0
new file mode 100644
index 000000000..e69de29bb
bin/bitbake-setup +8 -34

72 lines not on this page · raw message

lib/bb/tests/setup.py +27 -15

82 lines not on this page · raw message

Signature · 1 line
2.47.3