summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-05-29 01:56:34 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2021-05-29 02:11:49 +0200
commit0d7a599f002cce26b9e30ffb5a0456546d40e3cb (patch)
tree32af2515dd8f7a425829c19bde8878be51db1456
parentf9df0c99a3f7ebf16a1d393d59ef13ec25c82876 (diff)
Disable package upgrades by default and add option to build,sh
Upgrading openwrt-keyring fails because a file conflicts with base-files. * check_data_file_clashes: Package openwrt-keyring wants to install file /tmp/build.759637/rootfs/etc/opkg/keys/f94b9dd6febac963 But that file is already provided by package * base-files Disable upgrades for now since upgrades aren't fully supported by OpenWrt anyway and other packages might break in the future. Closes: #29
-rw-r--r--README2
-rwxr-xr-xbuild.sh11
2 files changed, 9 insertions, 4 deletions
diff --git a/README b/README
index da2fb9a..d0e0066 100644
--- a/README
+++ b/README
@@ -15,7 +15,7 @@ Refer to the top of build.sh.
Usage
-----
-./build.sh [-a|--arch x86_64|i686|aarch64] [-v|--version <version>] [-p|--packages <packages>] [-f|--files] [-t|--type lxd|plain] [-s|--super fakeroot|sudo] [--help]
+./build.sh [-a|--arch x86_64|i686|aarch64] [-v|--version <version>] [-p|--packages <packages>] [-f|--files] [-t|--type lxd|plain] [-s|--super fakeroot|sudo] [-u|--upgrade] [--help]
Example
-------
diff --git a/build.sh b/build.sh
index db1c1fc..81f2b25 100755
--- a/build.sh
+++ b/build.sh
@@ -9,16 +9,17 @@ type=lxd
super=fakeroot
# iptables-mod-checksum is required by the work-around inserted by files/etc/uci-defaults/70_fill-dhcp-checksum.
packages=iptables-mod-checksum
+upgrade=
# Workaround for Debian/Ubuntu systems which use C.UTF-8 which is unsupported by OpenWrt
export LC_ALL=C
usage() {
- echo "Usage: $0 [-a|--arch x86_64|i686|aarch64|aarch32] [-v|--version <version>] [-p|--packages <packages>] [-f|--files] [-t|--type lxd|plain] [-s|--super fakeroot|sudo] [--help]"
+ echo "Usage: $0 [-a|--arch x86_64|i686|aarch64|aarch32] [-v|--version <version>] [-p|--packages <packages>] [-f|--files] [-t|--type lxd|plain] [-s|--super fakeroot|sudo] [-u|--upgrade] [--help]"
exit 1
}
-temp=$(getopt -o "a:v:p:f:t:s:" -l "arch:,version:,packages:,files:,type:,super:,help" -- "$@")
+temp=$(getopt -o "a:v:p:f:t:s:u" -l "arch:,version:,packages:,files:,type:,super:,upgrade,help" -- "$@")
eval set -- "$temp"
while true; do
case "$1" in
@@ -50,6 +51,10 @@ while true; do
*)
usage;;
esac;;
+ -u|--upgrade)
+ upgrade="1"
+ shift 1
+ ;;
--help)
usage;;
--)
@@ -240,7 +245,7 @@ build_tarball() {
if test ${type} = lxd; then
opts="$opts -m $metadata"
fi
- if test ${ver} != snapshot; then
+ if test "${upgrade}" = "1"; then
opts="$opts --upgrade"
fi
local allpkgs="${packages}"