You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/scripts
John Crispin 590b855c26 scripts/feeds: handle missing/broken feeds better
pts/feeds update -a" can fail rather silently for feeds using git, as
the script does not pause when updating a feed fails. Instead it prints the
error message and calmly continues to the next feed. It is very easy to
overlook update errors with the feeds updated first, as their text scrolls
rapidly away from the screen.

This behaviour has not been a big problem with svn feeds, as svn update stops
with a conflict message and interactively forces the user to resolve or
postpone the conflict. In any case the svn error is noticed by the user.

Majority of the feeds use now git, so this silent failure can affect users
doing private builds in an increasing amount.

Below is an example of update failing and script continuing:

perus@v1404:/Openwrt/barrier$ ./scripts/feeds update -a
Updating feed 'packages' from
'https://github.com/openwrt/packages.git;for-14.07' ...
remote: Counting objects: 17, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 17 (delta 10), reused 8 (delta 1)
Unpacking objects: 100% (17/17), done.
 From https://github.com/openwrt/packages
62031da..dc26009  for-14.07  -> origin/for-14.07
Updating 62031da..dc26009
error: Your local changes to the following files would be overwritten by merge:
utils/collectd/Makefile
Please, commit your changes or stash them before you can merge.
Aborting
failed.
Updating feed 'luci' from 'http://git.openwrt.org/project/luci.git;luci-0.12' ...
Already up-to-date.
Create index file './feeds/luci.index'
Updating feed 'routing' from
'https://github.com/openwrt-routing/packages.git;for-14.07' ...
...

The script prints "failed.", but does not break the updating process. The
"update_feed" function returns an error code 1, but that value is not checked
in the "update" function, which continues to the next feed.
Return 1 as error:
​https://dev.openwrt.org/browser/trunk/scripts/feeds#L547
Call to update_feed without any error monitoring:
​https://dev.openwrt.org/browser/trunk/scripts/feeds#L585

The included patch makes the feeds script to stop updating after failing to
update a feed.

The script continues to the refresh_config step despite a possible failure in
updating, so the stopping action just prevents the other feeds from updating
and makes the error more clearly visible.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 42891
10 years ago
..
config scripts/config: make wildcard include with no results non-fatal 10 years ago
flashing make flashing scripts executable 14 years ago
arm-magic.sh add support for the Tonze AP-422/425 12 years ago
brcmImage.pl brcmImage.pl should be set executable 16 years ago
bundle-libraries.sh scripts/bundle-libraries: fall back to only copying binaries if ldd is unavailable (e.g. non-linux system) 10 years ago
checkpatch.pl scripts/checkpatch.pl: Fix whitespace errors 11 years ago
clang-gcc-wrapper build: fix build on Mac OS X 10.9 11 years ago
clean-package.sh build: clean up stale files from a previous build when installing a package build to the staging dir 11 years ago
cleanfile scripts/{cleanfile,cleanpatch}: Add scripts for cleaning up file and patch whitespaces 11 years ago
cleanpatch scripts/{cleanfile,cleanpatch}: Add scripts for cleaning up file and patch whitespaces 11 years ago
combined-ext-image.sh scripts: add script to generate combined extended image format 13 years ago
combined-image.sh scripts/combined-image.sh: remove the use of mktemp to make it more portable 15 years ago
config.guess upgrade the config.* scripts 14 years ago
config.rpath add config.rpath and link it in autotools.mk if missing, some packages might need it, especially users of lib-link.m4 or iconv.m4 13 years ago
config.sub remove support for ubicom32 12 years ago
deptest.sh deptest: Also accept stamps that are broken links. 14 years ago
diffconfig.sh build: add new menuconfig code based on linux 3.9 11 years ago
dl_cleanup.py scripts: dl_cleanup.py: properly detect file names with <date>-<githash> version string 11 years ago
download.pl include/download.mk: Add download mirrors for tools from GNU Savannah (bug #15184) 10 years ago
env scripts: unset GREP_OPTIONS in env and feeds (fixes #16924) 10 years ago
ext-toolchain.sh buildroot: allow specifying libc personality for external toolchains 11 years ago
feeds scripts/feeds: handle missing/broken feeds better 10 years ago
freebsd.sh build: BSD compile fixes 11 years ago
gen-dependencies.sh scripts/gen-dependencies.sh: prevent zero-length dep.* files from accumulating in tmp/ 11 years ago
getver.sh getver.sh: cope with varying "git log" line formats to reliably extract the git-svn rev (#10268) 13 years ago
ipkg scripts/ipkg: print warnings/errors to stderr 11 years ago
ipkg-make-index.sh ipkg-make-index: use more backwards-compatible openssl call for SHA256 11 years ago
kconfig.pl scripts/kconfig.pl: Indicate which file we couldn't open 11 years ago
make-ipkg-dir.sh finally move buildroot-ng to trunk 8 years ago
md5sum improve support for building on mac os x by improving detection of missing components 16 years ago
metadata.pl build: add support for declaring package CONFLICTS which only affect selecting built-in packages 10 years ago
metadata.pm build: add support for declaring package CONFLICTS which only affect selecting built-in packages 10 years ago
mkits.sh build: move mkits.sh script to more common place 11 years ago
om-fwupgradecfg-gen.sh scripts/om-fwupgradecfg-gen.sh: add support for the OM5P 10 years ago
openbsd.sh build: BSD compile fixes 11 years ago
pad_image rework board detection 14 years ago
patch-kernel.sh patch-kernel.sh: utilize --force (#7745), also use the PATCH env var and fallback to "patch" if unset 14 years ago
patch-specs.sh patch-specs.sh: gcc 3.4.6 has an additional "(OpenWrt-2.0)" after the version tag, cope with that 13 years ago
relink-lib.sh base-files: relink uclibc and libgcc libraries to remove leftovers of the statically linked initial libgcc saves a few kb and gets rid of unused not exported functions as well should also improve the reliability of mklibs 13 years ago
remote-gdb script/remote-gdb: enable and keep command history 10 years ago
rstrip.sh strip kernel modules more aggressively: make all global symbols local, rename all symbols in the symbol table to make them compress better 12 years ago
slugimage.pl use #!/usr/bin/env perl instead of #!/usr/bin/perl in openwrt scripts (fixes #2998) 16 years ago
strip-kmod.sh kernel: fix stripping of modules with duplicate symbol names 12 years ago
symlink-tree.sh scripts/symlink-tree.sh: print warnings/errors to stderr 11 years ago
timestamp.pl fix timestamp checks for build system paths which have '.svn' in their directory name 14 years ago
ubinize-image.sh scripts/ubinize-image.sh: fix ubinize-image.sh when used with --kernel 10 years ago
update-package-md5sum update-package-md5sum: A tool to update the md5sum of openwrt packages. Useful when upgrading a set of packages. 15 years ago