Revert "iop: feeds_update: return 1 on failure and add -i to update index only"

This reverts commit 0e1ac637ac.

It breaks build for people who do not have access to all feeds.
This commit is contained in:
Mikhail Kshevetskiy 2023-05-24 21:47:24 +03:00
parent c6c7d1177e
commit c02eff7d9d

View file

@ -1,26 +1,15 @@
#!/bin/bash
#! /bin/bash
function feeds_update {
heads=1
developer=0
override=1
while getopts "inh" opt; do
start=$(date -u +'%s')
while getopts "n" opt; do
case $opt in
i)
heads=0
;;
n)
override=0
;;
h|\?)
echo "Usage: ./iop feeds_update [-i] [-n] [-h]"
echo
echo "OPTIONS:"
echo " -i - Only update index. Do not change HEAD in feeds."
echo " -n - Do not replace core packages with iopsys versions."
echo " -h - Display this help message and exit."
exit 1
;;
esac
done
@ -28,18 +17,17 @@ function feeds_update {
cp .config .genconfig_config_bak
if [ $heads == 1 ]; then
if [ $developer == 1 ]; then
./scripts/feeds update -g || exit 1
else
./scripts/feeds update || exit 1
fi
#if -d argument is passed, clone feeds with ssh instead of http
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
fi
./scripts/feeds update -ai || exit 1
./scripts/feeds update -ai
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a || exit 1
./scripts/feeds install -f -p openwrt_core -a
fi
(
@ -50,20 +38,20 @@ function feeds_update {
# targets need to be installed explicitly
for target in $(ls ./feeds/targets); do
./scripts/feeds install -f -p targets $target || exit 1
./scripts/feeds install -f -p targets $target
done
# install all packages
./scripts/feeds install -a || exit 1
./scripts/feeds install -a
# remove broken symlinks ( for packages that are no longer in the feed )
find -L package/feeds -maxdepth 2 -type l -delete || exit 1
find -L package/feeds -maxdepth 2 -type l -delete
cp .genconfig_config_bak .config
make defconfig || exit 1
make defconfig
# record when we last run this script
touch tmp/.iop_bootstrap || exit 1
touch tmp/.iop_bootstrap
# always return true
exit 0