Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/
Date: Mon, 03 Apr 2017 20:57:07
Message-Id: 1491253016.315323499fa5e267317d413318481e7cfec8d7c9.wizardedit@gentoo
1 commit: 315323499fa5e267317d413318481e7cfec8d7c9
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 3 20:51:52 2017 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 3 20:56:56 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31532349
7
8 dev-db/postgresql: respect PG_AUTOCONFIG env variable
9
10 This allows configuring postgresql without further input from the input
11 (i.e., makes it scriptable).
12
13 Gentoo-Bug: https://bugs.gentoo.org/610418
14
15 dev-db/postgresql/postgresql-9.5.5.ebuild | 27 ++++++++++++++++-----------
16 dev-db/postgresql/postgresql-9.5.6.ebuild | 26 +++++++++++++++-----------
17 dev-db/postgresql/postgresql-9.6.1-r1.ebuild | 26 +++++++++++++++-----------
18 dev-db/postgresql/postgresql-9.6.2.ebuild | 26 +++++++++++++++-----------
19 dev-db/postgresql/postgresql-9999.ebuild | 26 +++++++++++++++-----------
20 5 files changed, 76 insertions(+), 55 deletions(-)
21
22 diff --git a/dev-db/postgresql/postgresql-9.5.5.ebuild b/dev-db/postgresql/postgresql-9.5.5.ebuild
23 index b352149ac96..56cafc185c7 100644
24 --- a/dev-db/postgresql/postgresql-9.5.5.ebuild
25 +++ b/dev-db/postgresql/postgresql-9.5.5.ebuild
26 @@ -350,17 +350,22 @@ pkg_config() {
27 einfo "The database cluster will be created in:"
28 einfo " ${DATA_DIR}"
29 einfo
30 - while [ "$correct" != "true" ] ; do
31 - einfo "Are you ready to continue? (y/n)"
32 - read answer
33 - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
34 - correct="true"
35 - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
36 - die "Aborting initialization."
37 - else
38 - echo "Answer not recognized"
39 - fi
40 - done
41 +
42 + if [ -z "$PG_AUTOCONFIG" ] ; then
43 + while [ "$correct" != "true" ] ; do
44 + einfo "Are you ready to continue? (y/n)"
45 + read answer
46 + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
47 + correct="true"
48 + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
49 + die "Aborting initialization."
50 + else
51 + echo "Answer not recognized"
52 + fi
53 + done
54 + else
55 + einfo "PG_AUTOCONFIG set, not prompting"
56 + fi
57
58 if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
59 eerror "The given directory, '${DATA_DIR}', is not empty."
60
61 diff --git a/dev-db/postgresql/postgresql-9.5.6.ebuild b/dev-db/postgresql/postgresql-9.5.6.ebuild
62 index 8e8412b1fc7..eb493f3f392 100644
63 --- a/dev-db/postgresql/postgresql-9.5.6.ebuild
64 +++ b/dev-db/postgresql/postgresql-9.5.6.ebuild
65 @@ -350,17 +350,21 @@ pkg_config() {
66 einfo "The database cluster will be created in:"
67 einfo " ${DATA_DIR}"
68 einfo
69 - while [ "$correct" != "true" ] ; do
70 - einfo "Are you ready to continue? (y/n)"
71 - read answer
72 - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
73 - correct="true"
74 - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
75 - die "Aborting initialization."
76 - else
77 - echo "Answer not recognized"
78 - fi
79 - done
80 + if [ -z "$PG_AUTOCONFIG" ] ; then
81 + while [ "$correct" != "true" ] ; do
82 + einfo "Are you ready to continue? (y/n)"
83 + read answer
84 + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
85 + correct="true"
86 + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
87 + die "Aborting initialization."
88 + else
89 + echo "Answer not recognized"
90 + fi
91 + done
92 + else
93 + einfo "PG_AUTOCONFIG set, not prompting"
94 + fi
95
96 if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
97 eerror "The given directory, '${DATA_DIR}', is not empty."
98
99 diff --git a/dev-db/postgresql/postgresql-9.6.1-r1.ebuild b/dev-db/postgresql/postgresql-9.6.1-r1.ebuild
100 index 0c0ba8278ad..0e4412b472c 100644
101 --- a/dev-db/postgresql/postgresql-9.6.1-r1.ebuild
102 +++ b/dev-db/postgresql/postgresql-9.6.1-r1.ebuild
103 @@ -347,17 +347,21 @@ pkg_config() {
104 einfo "The database cluster will be created in:"
105 einfo " ${DATA_DIR}"
106 einfo
107 - while [ "$correct" != "true" ] ; do
108 - einfo "Are you ready to continue? (y/n)"
109 - read answer
110 - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
111 - correct="true"
112 - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
113 - die "Aborting initialization."
114 - else
115 - echo "Answer not recognized"
116 - fi
117 - done
118 + if [ -z "$PG_AUTOCONFIG" ] ; then
119 + while [ "$correct" != "true" ] ; do
120 + einfo "Are you ready to continue? (y/n)"
121 + read answer
122 + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
123 + correct="true"
124 + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
125 + die "Aborting initialization."
126 + else
127 + echo "Answer not recognized"
128 + fi
129 + done
130 + else
131 + einfo "PG_AUTOCONFIG set, not prompting"
132 + fi
133
134 if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
135 eerror "The given directory, '${DATA_DIR}', is not empty."
136
137 diff --git a/dev-db/postgresql/postgresql-9.6.2.ebuild b/dev-db/postgresql/postgresql-9.6.2.ebuild
138 index 0c0ba8278ad..0e4412b472c 100644
139 --- a/dev-db/postgresql/postgresql-9.6.2.ebuild
140 +++ b/dev-db/postgresql/postgresql-9.6.2.ebuild
141 @@ -347,17 +347,21 @@ pkg_config() {
142 einfo "The database cluster will be created in:"
143 einfo " ${DATA_DIR}"
144 einfo
145 - while [ "$correct" != "true" ] ; do
146 - einfo "Are you ready to continue? (y/n)"
147 - read answer
148 - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
149 - correct="true"
150 - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
151 - die "Aborting initialization."
152 - else
153 - echo "Answer not recognized"
154 - fi
155 - done
156 + if [ -z "$PG_AUTOCONFIG" ] ; then
157 + while [ "$correct" != "true" ] ; do
158 + einfo "Are you ready to continue? (y/n)"
159 + read answer
160 + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
161 + correct="true"
162 + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
163 + die "Aborting initialization."
164 + else
165 + echo "Answer not recognized"
166 + fi
167 + done
168 + else
169 + einfo "PG_AUTOCONFIG set, not prompting"
170 + fi
171
172 if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
173 eerror "The given directory, '${DATA_DIR}', is not empty."
174
175 diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild
176 index b1d33768336..6a995c154ba 100644
177 --- a/dev-db/postgresql/postgresql-9999.ebuild
178 +++ b/dev-db/postgresql/postgresql-9999.ebuild
179 @@ -297,17 +297,21 @@ pkg_config() {
180 einfo "The database cluster will be created in:"
181 einfo " ${DATA_DIR}"
182 einfo
183 - while [ "$correct" != "true" ] ; do
184 - einfo "Are you ready to continue? (y/n)"
185 - read answer
186 - if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
187 - correct="true"
188 - elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
189 - die "Aborting initialization."
190 - else
191 - echo "Answer not recognized"
192 - fi
193 - done
194 + if [ -z "$PG_AUTOCONFIG" ] ; then
195 + while [ "$correct" != "true" ] ; do
196 + einfo "Are you ready to continue? (y/n)"
197 + read answer
198 + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
199 + correct="true"
200 + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
201 + die "Aborting initialization."
202 + else
203 + echo "Answer not recognized"
204 + fi
205 + done
206 + else
207 + einfo "PG_AUTOCONFIG set, not prompting"
208 + fi
209
210 if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
211 eerror "The given directory, '${DATA_DIR}', is not empty."