Commit cd7c081d authored by Christoph Berg's avatar Christoph Berg

* pg_buildext: Support $action-$version when the loop is contained in the

  calling script. (Mostly useful for installcheck-x.y.)
parent 67c73b13
......@@ -13,8 +13,8 @@ postgresql-common (153) UNRELEASED; urgency=medium
* t/020_create_sql_remove.t: Make pipe writes unbuffered.
* pg_buildext: Document the loop action (present since version 141).
* pg_buildext: Add "installcheck" action for use with autopkgtest.
* postgresql-common: In /usr/share/postgresql-common/pgdg/,
install apt.postgresql.org.sh to enable activating the pgdg repository.
* pg_buildext: Support $action-$version when the loop is contained in the
calling script. (Mostly useful for installcheck-x.y.)
* postgresql-server-dev-all: Add "make" to depends because pg_buildext is
mostly useless without it; extensions using autopkgtest would otherwise
need to include it in their debian/tests/control files.
......@@ -22,6 +22,8 @@ postgresql-common (153) UNRELEASED; urgency=medium
".PHONY: debian/control".
* pg_virtualenv: Fix exit code shown with -s.
* pg_createcluster, pg_virtualenv: -o will set postgresql.conf parameters.
* postgresql-common: In /usr/share/postgresql-common/pgdg/,
install apt.postgresql.org.sh to enable activating the pgdg repository.
[ Martin Pitt ]
* testsuite, pg_virtualenv: Don't fail if ifconfig is not installed. We
......
......@@ -19,7 +19,7 @@
set -e
action="$1"
if [ -d "$2" ]; then # compat mode: $2 is source directory
if [ -d "$2" ] && [ "$3" ]; then # compat mode: $2 is source directory
srcdir="$2"
shift
else
......@@ -142,6 +142,22 @@ versions() {
done < debian/pgversions
}
# when a version is included in the action, just act on this one (this is
# useful if some extra work needs to be done per version, so the loop over
# supported-versions needs to be in the script calling pg_buildext)
case $action in
configure-*|build-*|install-*|clean-*|installcheck-*)
a=${action%%-*}
v=${action##$a-}
echo "### $a $v ###"
$a $v
exit
;;
esac
# loop over versions
VERSIONS=`versions`
for v in $VERSIONS
......
......@@ -88,6 +88,11 @@ I<build-dir> is omitted, the top source directory is used.
=back
Sometimes it is desirable to run extra code per version before invoking the
action, in that case the loop over supported versions needs to be in the
calling script. To facilitate this mode, actions can also be called as
I<action>B<->I<version>. See the installcheck example below.
=head1 SUPPORTED VERSIONS
B<pg_buildext> reads C<debian/pgversions> to decide which PostgreSQL to build
......@@ -173,6 +178,14 @@ configure the list of supported versions on your system.
pg_buildext installcheck
# alternatively: pg_buildext installcheck build-%v
# Running extra code before invoking the actual action:
set -e
for v in $(pg_buildext supported-versions); do
test -L build-$v/sql || ln -s ../sql build-$v/
test -L build-$v/expected || ln -s ../expected build-$v/
pg_buildext installcheck-$v build-$v
done
=back
=head1 COMPATIBILITY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment