Do not install git in the native chroot and use it from there. Remove the chown_to_user argument from pmb.helpers.git.clone(), the resulting dir is now always owned by the user. While at it, refactor the function and display the clone URL. Previously we had cloned aports_upstream (from Alpine) with chown_to_user=False (legacy) and pmaports with chown_to_user=True. pmb.helpers.git.rev_parse() would only work after chown_to_user=True. Check if git is installed in "pmbootstrap init", and remove the same check from rev_parse(). Add a new work dir version, that checks for git and changes ownership of already checked out aports_upstream to the host system's user. When creating a new work dir, create cache_git instead of cache_http. cache_http is created on demand already, with proper permissions. But cache_git must be created, otherwise pmb.helpers.mount.bind will create it as root. This is in preparation for the "pmbootstrap pull" feature, as it allows using the host system's git in all new code paths. We will be able to handle repositories even if they were cloned outside of the work dir (which we do in a few CI scripts for example). Related: #1858 |
||
---|---|---|
.. | ||
__init__.py | ||
init.py | ||
load.py | ||
merge_with_args.py | ||
pmaports.py | ||
save.py |