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

Fix check-git-abc Makefile target #4384

Closed

Conversation

dopamane
Copy link

@dopamane dopamane commented May 9, 2024

What are the reasons/motivation for this change?

#4383

Explain how this is achieved.

Add the condition that if git submodule status abc results in a string starting with - then the git submodule is uninitialized.

If applicable, please suggest to reviewers how they can test the change.

Clone the repo, run make or make check-git-abc, examine instructions to initialize the submodule, git submodule update --init, re-run make or make check-git-abc and there should not be any error.

@mmicko
Copy link
Member

mmicko commented May 9, 2024

@dopamane thanks for changes suggestions. Please note there are couple of cases we need to handle here

  1. no "abc" directory ( ask for submodule init)
  2. there is "abc" directory but it is empty ( ask for submodule init)
  3. there is existing "abc" from before the change and there is .gitcommit (with "$Format:%h$") ask for it to be removed and initialized
  4. there is existing "abc" with .gitcommit containing git revision number (this is fine it is unpacked abc tarball)

Last one is special case we need to handle for users not using git but building all from source tarballs.
Meta code that should cover this

if abc dir exists 
   if abc/.gitcommit is not "$Format:%h$"
          all fine abc tarball, just exit
   else if abc submodule status is "-" 
          using old abc checkout, remove and initialize
   else 
         all fine
else 
   ask for submodule init
 

@mmicko
Copy link
Member

mmicko commented May 9, 2024

@dopamane Could you please take a look at #4386 and if this one works fine for you.

@dopamane dopamane closed this May 9, 2024
@dopamane dopamane deleted the dev/dopamane/makefile-submodule-check branch May 9, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants