| Summary: | bitbake does not recognize that git-lfs is not installed when usehead=1 is used | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | tom.georgi |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | ACCEPTED --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | ccasciato, konrad.scherer, poky.bs.watcher, poky.watcher, randy.macleod, sivakumar.bs, tom.georgi |
| Version: | unspecified | ||
| Target Milestone: | 6.2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
tom.georgi
2023-08-18 09:06:00 UTC
Tom, Can you submit a patch? Richard will try to make time for this bug in 5.0. This looks fixed on current master, as a side effect of: commit 2515fbd10824005fa7f34e87706000c079920366 "fetch: Drop multiple branch/revision support for single git urls" Richard Purdie, 2025-03-18 That commit collapsed ud.branches/ud.revisions (dicts) down to singular ud.branch/ud.revision. As part of it, _contains_lfs()'s refname is now derived from ud.revision instead of ud.branches[name]: cmd = ud.basecmd + ['grep', '^[^#].*lfs', ud.revision + ':.gitattributes'] ud.revision is always a resolved SHA, including when usehead=1 is set (HEAD resolves to a real revision during urldata_init), so the original problem - empty branch under usehead=1 causing the LFS check to silently no-op - no longer applies. Confirmed by replaying the old refname = ud.branches[ud.names[0]] logic against a local repo with LFS-marked .gitattributes: it fails with "fatal: ambiguous argument ':.gitattributes'", swallowed by the existing except (FetchError, ValueError): pass, so _contains_lfs() returns False. The current ud.revision-based version returns True against the same repo. |