Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Replace absolute path to git-tree with relative #4881

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

adeepn
Copy link
Member

@adeepn adeepn commented Feb 28, 2023

Description

Replace absolute path to git-tree with relative, so it is accesible without docker builder.

was:

$ cat cache/sources/linux-kernel-worktree/6.2__jethome64__arm64/.git
gitdir: /armbian/cache/git-bare/kernel/.git/worktrees/6.2__jethome64__arm64

new:

$ cat cache/sources/linux-kernel-worktree/6.2__jethome64__arm64/.git
gitdir: ../../../git-bare/kernel/.git/worktrees/6.2__jethome64__arm64

Jira reference number [AR-9999]

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Build ok
  • Access to git tree without docker builder ok

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@adeepn adeepn requested a review from a team as a code owner February 28, 2023 07:57
@iav
Copy link
Contributor

iav commented Feb 28, 2023

What need to be run to see an error you fix there?

@adeepn
Copy link
Member Author

adeepn commented Feb 28, 2023

What need to be run to see an error you fix there?

this is QoL update.
with this changes you can access git tree of kernel/uboot sources inside cache dir without run docker armbian-builder if main build processed inside docker
it does not change anything in the build process

@iav
Copy link
Contributor

iav commented Feb 28, 2023

On my system folder cache/sources/linux-kernel-worktree/6.1__rockchip64__arm64 have .github folder, but not have .git.
Hm?

@adeepn
Copy link
Member Author

adeepn commented Feb 28, 2023

On my system folder cache/sources/linux-kernel-worktree/6.1__rockchip64__arm64 have .github folder, but not have .git. Hm?

.git is file, not dir

iav
iav previously approved these changes Feb 28, 2023
Copy link
Contributor

@iav iav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!

@rpardini
Copy link
Member

Nice, I had the absolute in there to fix some problem reported early in the -next testing cycle (gotta find git blame)

One consideration about the concept:

  • Sharing the git tree in-Docker and out-of-Docker only really works well if both host and Docker are on the same OS (Linux) and git binary is somewhat the same version.... otherwise git has to refresh the index constantly. Happens on macOS for example, or with large "gaps" in git version (bulleye's vs kinetic's for example)

About the implementation:

  • maybe consider coreutil's realpath --relative-to instead of sed magic? (or... not. I dunno)

@adeepn
Copy link
Member Author

adeepn commented Feb 28, 2023

  • maybe consider coreutil's realpath --relative-to instead of sed magic? (or... not. I dunno)

damn. of course, it's so much easier)

@adeepn adeepn requested a review from iav February 28, 2023 12:21
@rpardini rpardini merged commit 123b31b into armbian:main Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants