Go to file
Yann E. MORIN 80d8bc6e46 download/git: ensure we can checkout repos with submodule conversions
When a git tree has had sub-dir <-> sub-module conversions, or has had
submodules added or removed over the course of time, checking out a
changeset across those conversions/additions/removals may leave
untracked files, or may fail because of a conflict of type.

So, before we checkout the new changeset, we forcibly remove the
submodules. The new set of submodules, if any, will be restored later.

Ideally, we would use a native git command: git submodule deinit --all.
However, that was only introduced in git 1.8.3 which, while not being
recent by modern standards, is still too old for some enterprise-grade
distributions (RHEL6 only has git-1.7.1).

So, instead, we just use git submodule foreach, to rm -rf the submodules
directory.

Again, we would ideally use 'cd $toplevel && rm -rf $path', but
$toplevel was only introduced in git 1.7.2. $path has always been there.

So, instead, we just cd back one level, and remove the basename of the
directory.

Eventually, we need to get rid of now-empty and untracked directories,
that were parents of a removed submodule. For example. ./foo/bar/ was a
submodule, so ./foo/bar/ was removed, which left ./foo/ around.

Yet again, recent-ish git versions would have removed it during the
forced checkout, but old-ish versions (e.g. 1.7.1) do not remove it with
the forced checkout.

Instead we rely on the already used forced-forced clean of directories,
untracked, and ignored content, to really get rid of extra stuff we are
not interested in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-01 21:22:28 +02:00
arch arch: drop BR2_BINFMT_FLAT_SEP_DATA support 2018-04-15 22:04:09 +02:00
board configs/gdb_bfin_bf512: remove defconfig 2018-04-15 22:03:20 +02:00
boot boot/uboot: default to kconfig buildsystem for latest version 2018-04-25 21:35:35 +02:00
configs configs/solidrun_macchiatobin_*: use a Git commit for ATF 2018-04-25 21:28:47 +02:00
docs package/pkg-generic: add check that target variant is defined before host variant 2018-04-30 17:43:49 +02:00
fs fs/squashfs: add zstd support 2018-04-25 23:39:04 +02:00
linux linux: bump default to version 4.16.6 2018-05-01 11:45:31 +02:00
package cups: disable pam support 2018-05-01 15:36:22 +02:00
support download/git: ensure we can checkout repos with submodule conversions 2018-05-01 21:22:28 +02:00
system system/Config.in: re-wrap help text 2018-04-01 08:01:05 +02:00
toolchain toolchain-external-custom: allow specifying relative path to binaries 2018-04-19 23:04:44 +02:00
utils scanpypi: add support for the new PyPI infrastructure 2018-04-18 17:11:47 +02:00
.defconfig
.flake8 .flake8: ignore utils/diffconfig 2018-03-13 22:37:54 +01:00
.gitignore
.gitlab-ci.yml support/testing: add test for syslog-ng 2018-04-19 23:16:15 +02:00
.gitlab-ci.yml.in .gitlab-ci.yml: extend check-package test to Config.* files 2018-04-01 10:16:35 +02:00
CHANGES Update for 2017.02.11 2018-04-12 18:37:41 +02:00
Config.in Config.in: fix check-package warning 2018-04-17 14:54:45 +02:00
Config.in.legacy legacy: remove options made legacy 5 years ago 2018-04-16 16:21:14 +02:00
COPYING
DEVELOPERS imx-alsa-plugins: new package 2018-04-30 17:49:35 +02:00
Makefile arch: remove Blackfin architecture 2018-04-15 22:03:41 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches