[Buildroot] [PATCH] utils/docker-run: make it work in workdirs/woktrees
Peter Korsgaard
peter at korsgaard.com
Tue Jun 13 16:46:25 UTC 2023
>>>>> "Baruch" == Baruch Siach <baruch at tkos.co.il> writes:
> Hi Peter,
> On Tue, Jun 13 2023, Peter Korsgaard wrote:
>>>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:
>>
>> > It is quite customary to use a single repository with multiple workdirs,
>> > one for each active branch, with either the aging 'git new-workdir' or
>> > the more recent 'git worktree'.
>>
>> > However, in a workdir/worktree, most entries in .git/ are only symlinks
>> > to the actual files in the main repository.
>>
>> > Currently, utils/docker-run only bind-mounts the current working copy.
>> > If that is a workdir/worktree, then it is going to be missing the actual
>> > git data, resulting in errors like:
>>
>> > $ ./utils/docker-run make check-package
>> > fatal: not a git repository (or any parent up to mount point [....]/buildroot)
>> > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
>> > No files to check style
>> > make: *** [Makefile:1257: check-package] Error 1
>>
>> > So, we also bind-mount the actual git directory. If that is a subdir
>> > of the current working copy, then it is already mounted and thus the
>> > bind-mount is superfluous but harmless; for simplicity, we mount it
>> > unconditionally.
>>
>> > Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
>> > Cc: Ricardo Martincoski <ricardo.martincoski at datacom.com.br>
>>
>> Committed to 2023.02.x, thanks.
> Not in 2023.02.x branch as of commit bcddc639d.
Ups, fixed now - Thanks.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list