mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-04 02:43:30 +08:00
88bad8f462
When preparing the legal-info, the source archives are copied in the legal-info/ output directory. When the archives are big, it can take quite a bit of time and unnecessarily uses disk space. When the legal-info output directory is on the same filesystem as the BR2_DL_DIR, we can easily reduce copy time and disk usage by just using hardlins instead of copying. However, the BR2_DL_DIR may be on a different filesystem, so we must fallback to copying in this case Introduce a helper script that copies a source file into a destination directory, by first attempting to hard-link, and falling back to a plain copy in case the hardlink fails. In case the destination already exists, it is forcibly removed first, to avoid clobering any existing target file (and especially any hardlink to it), since cp -f does not remove the destination file, but clobbers it. In some situations, it will be necessary that the destination file is named differently than the source, so if a third argument is specified, it is treated as the basename of the destination file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
||
---|---|---|
.. | ||
apply-patches.sh | ||
check-host-rpath | ||
check-kernel-headers.sh | ||
eclipse-register-toolchain | ||
expunge-gconv-modules | ||
gen-manual-lists.py | ||
graph-build-time | ||
graph-depends | ||
hardlink-or-copy | ||
kconfiglib.py | ||
mkmakefile | ||
mkusers | ||
pkg-stats | ||
readme.kconfiglib | ||
scancpan | ||
setlocalversion | ||
size-stats | ||
size-stats-compare | ||
xorg-release |
Readme ====== Kconfiglib ---------- This python module, developped by Ulf Magnusson and released under the ISC license, is fetched from: https://github.com/ulfalizer/Kconfiglib commit: a95f477eafc0b6708c3ce671fce7302ecec4f789 Kconfiglib license ~~~~~~~~~~~~~~~~~~ License (ISC) Copyright (c) 2011-2013, Ulf Magnusson <ulfalizer@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.