Jump to content

[Armbian build PR] - Fix git_ensure_safe_directory function again


Recommended Posts

Posted

Description

The command added to check whether the directory is git or not was having syntax error. Fixed the same. Also it seems adding safe-directory with local doesn't really work which actually makes sense. hence reverting to using global instead. Its still safer than before as we are not adding * and are adding the actual path of the directory

Fixes following error in the logs

--> (9) COMMAND: git --no-pager -C /home/flash/build-fork/cache/git-bare/kernel -C rev-parse --git-dir
   -->--> command failed with error code 128 after 0 seconds
--> (9) WARNING: stacktrace for failed command [ exit code 128:git --no-pager -C /home/flash/build-fork/cache/git-bare/kernel -C rev-parse --git-dir
                       regular_git() --> lib/functions/general/git.sh:44
         git_ensure_safe_directory() --> lib/functions/general/git.sh:58
      kernel_prepare_bare_repo_from_oras_gitball() --> lib/functions/compilation/kernel-git-oras.sh:232
                     do_with_hooks() --> lib/functions/general/extensions.sh:557
                   do_with_logging() --> lib/functions/logging/section-logging.sh:81
                    compile_kernel() --> lib/functions/compilation/kernel.sh:30
      artifact_kernel_build_from_sources() --> lib/functions/artifacts/artifact-kernel.sh:230
       artifact_build_from_sources() --> lib/functions/artifacts/artifacts-obtain.sh:34
          obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:280
          build_artifact_for_image() --> lib/functions/artifacts/artifacts-obtain.sh:392
       main_default_build_packages() --> lib/functions/main/build-packages.sh:108
      full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:31
             do_with_default_build() --> lib/functions/main/default-build.sh:42
            cli_standard_build_run() --> lib/functions/cli/cli-build.sh:25
           armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                    cli_entrypoint() --> lib/functions/cli/entrypoint.sh:176
                              main() --> compile.sh:50 ]

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.

  • [X] Ran compilation both inside and outside docker-shell.

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

View the full article

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines