Ansgar pushed to branch master at Debian FTP Team / dak
Commits:
-
95474e42
by Ansgar at 2020-10-28T17:02:59+01:00
-
46a8e273
by Ansgar at 2020-10-28T17:03:21+01:00
-
7b9e39fd
by Ansgar at 2020-10-28T17:09:56+01:00
3 changed files:
Changes:
... | ... | @@ -109,9 +109,9 @@ def do_update(self): |
109 | 109 |
""")
|
110 | 110 |
|
111 | 111 |
for section in sections:
|
112 |
- c.execute("UPDATE section SET description='{1}', longdesc='' WHERE section='{0}'".format(section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
113 |
- c.execute("UPDATE section SET description='{1}', longdesc='' WHERE section='contrib/{0}'".format(section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
114 |
- c.execute("UPDATE section SET description='{1}', longdesc='' WHERE section='non-free/{0}'".format(section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
112 |
+ c.execute("UPDATE section SET description=%s, longdesc="" WHERE section=%s", (section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
113 |
+ c.execute("UPDATE section SET description=%s, longdesc="" WHERE section=CONCAT('contrib/', %s)", (section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
114 |
+ c.execute("UPDATE section SET description=%s, longdesc="" WHERE section=CONCAT('non-free/', %s)", (section, sections[section]["desc"], sections[section]["longdesc"]))
|
|
115 | 115 |
|
116 | 116 |
c.execute("UPDATE config SET value = '124' WHERE name = 'db_revision'")
|
117 | 117 |
self.db.commit()
|
... | ... | @@ -234,6 +234,8 @@ Updates dak's database schema to the lastest version. You should disable crontab |
234 | 234 |
except IOError as e:
|
235 | 235 |
if e.errno in (errno.EACCES, errno.EAGAIN):
|
236 | 236 |
utils.fubar("Couldn't obtain lock, looks like archive is doing something, try again later.")
|
237 |
+ else:
|
|
238 |
+ raise
|
|
237 | 239 |
|
238 | 240 |
self.update_db()
|
239 | 241 |
|
... | ... | @@ -17,6 +17,9 @@ |
17 | 17 |
# You should have received a copy of the GNU General Public License
|
18 | 18 |
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19 | 19 |
|
20 |
+set -e
|
|
21 |
+set -u
|
|
22 |
+set -o pipefail
|
|
20 | 23 |
|
21 | 24 |
dak-setup() {
|
22 | 25 |
# Get the parent directory of the current script
|