summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--src/ob-applypatches.sh5
-rw-r--r--src/ob-buildenv.sh5
-rw-r--r--src/ob-buildopk.sh5
-rw-r--r--src/ob-checkbuilddeps.sh5
-rw-r--r--src/ob-genchanges.sh5
-rw-r--r--src/ob-gencontrol.sh5
-rw-r--r--src/ob-installdocs.sh5
-rw-r--r--src/ob-installplatconf.sh5
-rw-r--r--src/ob-unpacksource.sh5
-rw-r--r--src/opkbuild.sh5
11 files changed, 40 insertions, 12 deletions
diff --git a/TODO b/TODO
index 2690e9c..0438ee9 100644
--- a/TODO
+++ b/TODO
@@ -38,8 +38,6 @@ Tasks
* `src:foo` is the whole package.
* Upload everything always.
* Drop mksysconf.
- * In executables, print error (using `printf`) and exit if
- `ob_set_text_domain()` fails.
* Support xz upstream archive decompression.
* Maybe call separate decompressor utilities instead of using tar's seamless
decompression. This enables support for xz with BusyBox < 1.21.0 (commit
diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh
index 165c426..0ab3308 100644
--- a/src/ob-applypatches.sh
+++ b/src/ob-applypatches.sh
@@ -55,7 +55,10 @@ apply_patches()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-buildenv.sh b/src/ob-buildenv.sh
index 14ae813..685852a 100644
--- a/src/ob-buildenv.sh
+++ b/src/ob-buildenv.sh
@@ -85,7 +85,10 @@ setup_build_flags()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index 0e9aa6f..41db005 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -40,7 +40,10 @@ build_opk()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-checkbuilddeps.sh b/src/ob-checkbuilddeps.sh
index 7cc1fbd..aea3d9a 100644
--- a/src/ob-checkbuilddeps.sh
+++ b/src/ob-checkbuilddeps.sh
@@ -83,7 +83,10 @@ check_build_deps()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh
index 211993e..42e2633 100644
--- a/src/ob-genchanges.sh
+++ b/src/ob-genchanges.sh
@@ -87,7 +87,10 @@ write_files_bin()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh
index 738ac9e..822dda6 100644
--- a/src/ob-gencontrol.sh
+++ b/src/ob-gencontrol.sh
@@ -166,7 +166,10 @@ gen_md5sums()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index f48134d..06707ee 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -58,7 +58,10 @@ install_docs()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh
index 80b9831..d81628a 100644
--- a/src/ob-installplatconf.sh
+++ b/src/ob-installplatconf.sh
@@ -69,7 +69,10 @@ copy_config()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh
index 1202ce0..4a95aec 100644
--- a/src/ob-unpacksource.sh
+++ b/src/ob-unpacksource.sh
@@ -132,7 +132,10 @@ unpack_upstream()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
ob_init_package '..' || return 1
ob_parse_package_metadata -c '.opkbuild.cache' || return 1
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index d76c568..b7bc160 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -374,7 +374,10 @@ clean()
main()
{
- ob_set_text_domain 'opkbuild'
+ if ! ob_set_text_domain 'opkbuild'; then
+ printf '%s: Error: Failed to load locale messages\n' >&2
+ return 1
+ fi
get_options "${@}" || return 1
shift $(($OPTIND - 1))