diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-04 21:05:56 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-05 01:16:14 +0200 |
commit | 4090c2f3558e71c52a0f99c0b259330268f11824 (patch) | |
tree | 33b3ec6c13e27078acc522197f4d3f1554250a0e /main | |
parent | 0eff1dfe6a4b135eab277b09a793b808e0d9028b (diff) | |
download | aports-4090c2f3558e71c52a0f99c0b259330268f11824.tar.bz2 aports-4090c2f3558e71c52a0f99c0b259330268f11824.tar.xz |
main/postgresql: remove explicit return
Diffstat (limited to 'main')
-rw-r--r-- | main/postgresql/APKBUILD | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD index 72e4846daa..71d281be0a 100644 --- a/main/postgresql/APKBUILD +++ b/main/postgresql/APKBUILD @@ -43,11 +43,11 @@ builddir="$srcdir/$pkgname-$pkgver" # - CVE-2017-7486 prepare() { - default_prepare || return 1 + default_prepare cd "$builddir" local file; for file in $pkgname.initd $pkgname.confd; do - sed "s|@VERSION@|${pkgver%.*}|" "$srcdir"/$file > $file || return 1 + sed "s|@VERSION@|${pkgver%.*}|" "$srcdir"/$file > $file done cp -al "$builddir" "$builddir"~py3 @@ -63,9 +63,9 @@ build() { cd "$builddir"~py3 export PYTHON=/usr/bin/python3 - _configure || return 1 - make -C src/backend submake-errcodes || return 1 - make -C src/pl/plpython all || return 1 + _configure + make -C src/backend submake-errcodes + make -C src/pl/plpython all msg "Building all" @@ -73,7 +73,7 @@ build() { cd "$builddir" export PYTHON=/usr/bin/python2 - _configure && make world || return 1 + _configure && make world unset PYTHON } @@ -98,32 +98,31 @@ _configure() { package() { cd "$builddir" - make DESTDIR="$pkgdir" install install-docs || return 1 + make DESTDIR="$pkgdir" install install-docs install -d -m750 -o postgres -g postgres \ "$pkgdir"/var/lib/postgresql \ - "$pkgdir"/var/log/$pkgname || return 1 + "$pkgdir"/var/log/$pkgname install -D -m755 postgresql.initd \ - "$pkgdir"/etc/init.d/postgresql || return 1 + "$pkgdir"/etc/init.d/postgresql install -D -m644 postgresql.confd \ - "$pkgdir"/etc/conf.d/postgresql || return 1 + "$pkgdir"/etc/conf.d/postgresql install -D -m755 "$srcdir"/pg-restore.initd \ - "$pkgdir"/etc/init.d/pg-restore || return 1 + "$pkgdir"/etc/init.d/pg-restore install -D -m644 "$srcdir"/pg-restore.confd \ - "$pkgdir"/etc/conf.d/pg-restore || return 1 + "$pkgdir"/etc/conf.d/pg-restore } dev() { - default_dev || return 1 + default_dev mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/postgresql mv "$pkgdir"/usr/bin/pg_config \ "$pkgdir"/usr/bin/ecpg \ - "$subpkgdir"/usr/bin/ || return 1 - mv "$pkgdir"/usr/lib/postgresql/pgxs \ - "$subpkgdir"/usr/lib/postgresql/ || return 1 + "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/lib/postgresql/pgxs "$subpkgdir"/usr/lib/postgresql/ } libpq() { @@ -175,12 +174,12 @@ contrib() { # installed into separate subpackages. sed -Ei -e 's/(.*_plperl)/#\1/' \ -e 's/(.*_plpython)/#\1/' \ - contrib/Makefile || return 1 + contrib/Makefile - make -C contrib DESTDIR="$subpkgdir" install || return 1 + make -C contrib DESTDIR="$subpkgdir" install mv "$subpkgdir"/usr/share/doc/postgresql/extension \ - "$pkgdir"/usr/share/doc/postgresql/ || return 1 + "$pkgdir"/usr/share/doc/postgresql/ rmdir -p "$subpkgdir"/usr/share/doc/postgresql || true } @@ -192,7 +191,7 @@ pltcl() { _submv usr/bin/pltcl* \ usr/lib/postgresql/pltcl.so \ usr/share/postgresql/unknown.pltcl \ - usr/share/postgresql/extension/pltcl* || return 1 + usr/share/postgresql/extension/pltcl* install -m 644 "$srcdir"/pltcl_create_tables.sql \ "$subpkgdir"/usr/share/postgresql/ @@ -227,8 +226,8 @@ plpython2_contrib() { _plcontrib plpython2 "PL/Python 2" cd "$builddir" - make -C contrib/hstore_plpython DESTDIR="$subpkgdir" install || return 1 - make -C contrib/ltree_plpython DESTDIR="$subpkgdir" install || return 1 + make -C contrib/hstore_plpython DESTDIR="$subpkgdir" install + make -C contrib/ltree_plpython DESTDIR="$subpkgdir" install rm "$subpkgdir"/usr/share/postgresql/extension/*plpython3* } @@ -238,7 +237,7 @@ plpython3() { depends="python3" cd "$builddir"~py3 - make -C src/pl/plpython DESTDIR="$subpkgdir" install || return 1 + make -C src/pl/plpython DESTDIR="$subpkgdir" install rm -R "$subpkgdir"/usr/include } @@ -246,8 +245,8 @@ plpython3_contrib() { _plcontrib plpython3 "PL/Python 3" cd "$builddir"~py3 - make -C contrib/hstore_plpython DESTDIR="$subpkgdir" install || return 1 - make -C contrib/ltree_plpython DESTDIR="$subpkgdir" install || return 1 + make -C contrib/hstore_plpython DESTDIR="$subpkgdir" install + make -C contrib/ltree_plpython DESTDIR="$subpkgdir" install cd "$subpkgdir"/usr/share/postgresql/extension/ rm *plpython2* *plpythonu* @@ -263,7 +262,7 @@ _plcontrib() { _submv() { local path; for path in "$@"; do mkdir -p "$subpkgdir/${path%/*}" - mv "$path" "$subpkgdir/$path" || return 1 + mv "$path" "$subpkgdir/$path" done } |