Bug 6080

Summary: Git fetch caching
Product: buildroot Reporter: Andrew Cooks <acooks>
Component: OtherAssignee: unassigned
Status: RESOLVED WONTFIX    
Severity: minor CC: buildroot
Priority: P5    
Version: 2012.08   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Andrew Cooks 2013-03-08 04:23:06 UTC
When using the Custom Git tree kernel option, changes to the git repository are not detected by buildroot. Even a 'make clean' doesn't remove the stale cached sources. 

Please provide a way to use a local git repo directly, without any caching.
Comment 1 Thomas Petazzoni 2013-03-08 08:36:16 UTC
Have you tested the OVERRIDE_SRCDIR mechanism?
Comment 2 Andrew Cooks 2013-03-11 03:25:27 UTC
OVERRIDE_SRCDIR is not sufficiently described in the manual, but I found a description at http://elinux.org/images/2/2a/Using-buildroot-real-project.pdf

It helps, but it's not exactly what I was looking for.

Consider this section from my config file:
--
#
# Kernel
#
BR2_LINUX_KERNEL=y
# BR2_LINUX_KERNEL_3_6 is not set
# BR2_LINUX_KERNEL_SAME_AS_HEADERS is not set
# BR2_LINUX_KERNEL_CUSTOM_VERSION is not set
# BR2_LINUX_KERNEL_CUSTOM_TARBALL is not set
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="/home/andrew/devel/lk.git"
BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="dma_maps-20130306"
BR2_LINUX_KERNEL_VERSION="dma_maps-20130306"
BR2_LINUX_KERNEL_PATCH=""
# BR2_LINUX_KERNEL_USE_DEFCONFIG is not set
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="/home/andrew/devel/lk.git/.config_mod_ahci"
BR2_LINUX_KERNEL_BZIMAGE=y
# BR2_LINUX_KERNEL_VMLINUX is not set
# BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM is not set
# BR2_LINUX_KERNEL_DTS_SUPPORT is not set
# BR2_LINUX_KERNEL_INSTALL_TARGET is not set
--

It isn't clear to me whether using a local path for the CUSTOM_GIT_REPO_URL is a recognised and valid use case. It works, but with nasty caching.

If you accept that it is a valid use case, I think it would be sensible to detect the local path and use rsync without creating a tarball, similar to 'SITE METHOD = local'.
Comment 3 Thomas Petazzoni 2013-05-26 13:33:15 UTC
What do you call "nasty caching" ? The fact that Buildroot creates a tarball stored in $(DL_DIR) is expected, and I don't think we want to disable that. If your 'dma_maps-20130306' tag doesn't move, then Buildroot caching should not be a problem.

Otherwise, if you're actively doing some development on the Linux kernel sources, and therefore need Buildroot to restart the build of the kernel using the modified sources, you should really be using LINUX_OVERRIDE_SRCDIR.
Comment 4 Thomas Petazzoni 2014-01-08 05:18:06 UTC
I don't think this was really a "bug", what the user is seeing is expected Buildroot behavior.