public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 03/18] pg_restore: "must be specified" and --list
2+ messages / 2 participants
[nested] [flat]
* [PATCH 03/18] pg_restore: "must be specified" and --list
@ 2020-12-06 04:43 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Justin Pryzby @ 2020-12-06 04:43 UTC (permalink / raw)
This was discussed here, but the idea got lost.
https://www.postgresql.org/message-id/flat/20190612170201.GA11881%40alvherre.pgsql#2984347ab074e6f19...
---
src/bin/pg_dump/pg_restore.c | 2 +-
src/bin/pg_dump/t/001_basic.pl | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 589b4aed53..f6e6e41329 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -305,7 +305,7 @@ main(int argc, char **argv)
/* Complain if neither -f nor -d was specified (except if dumping TOC) */
if (!opts->cparams.dbname && !opts->filename && !opts->tocSummary)
{
- pg_log_error("one of -d/--dbname and -f/--file must be specified");
+ pg_log_error("one of -d/--dbname, -f/--file, or -l/--list must be specified");
exit_nicely(1);
}
diff --git a/src/bin/pg_dump/t/001_basic.pl b/src/bin/pg_dump/t/001_basic.pl
index 083fb3ad08..8280914c2a 100644
--- a/src/bin/pg_dump/t/001_basic.pl
+++ b/src/bin/pg_dump/t/001_basic.pl
@@ -63,8 +63,8 @@ command_fails_like(
command_fails_like(
['pg_restore'],
- qr{\Qpg_restore: error: one of -d/--dbname and -f/--file must be specified\E},
- 'pg_restore: error: one of -d/--dbname and -f/--file must be specified');
+ qr{\Qpg_restore: error: one of -d/--dbname, -f/--file, or -l/--list must be specified\E},
+ 'pg_restore: error: one of -d/--dbname, -f/--file, or -l/--list must be specified');
command_fails_like(
[ 'pg_restore', '-s', '-a', '-f -' ],
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0004-typos-in-master.patch"
^ permalink raw reply [nested|flat] 2+ messages in thread
* meson: Stop using deprecated way getting path of files
@ 2023-11-29 18:50 Andres Freund <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Andres Freund @ 2023-11-29 18:50 UTC (permalink / raw)
To: pgsql-hackers; +Cc: Peter Eisentraut <[email protected]>; Tristan Partin <[email protected]>
Hi,
The just released meson 1.3 strongly deprecated a hack we were using, emitting
a noisy warning (the hack basically depended on an implementation detail to
work). Turns out there has been a better way available for a while, I just
hadn't found it. 1.4 added a more convenient approach, but we can't rely on
that.
Everything continues to work, but the warning is annoying.
The warning:
Message: checking for file conflicts between source and build directory
../home/andres/src/postgresql/meson.build:2972: DEPRECATION: Project uses feature that was always broken, and is now deprecated since '1.3.0': str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof..
[...]
WARNING: Broken features used:
* 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'}
I plan to apply this soon, unless I hear some opposition / better ideas / ....
Greetings,
Andres Freund
Attachments:
[text/x-diff] v1-0001-meson-Stop-using-deprecated-way-getting-path-of-f.patch (1.3K, ../../[email protected]/2-v1-0001-meson-Stop-using-deprecated-way-getting-path-of-f.patch)
download | inline diff:
From d296c088ceadeac281a54d6f7f748112c5efb33a Mon Sep 17 00:00:00 2001
From: Andres Freund <[email protected]>
Date: Wed, 29 Nov 2023 10:47:20 -0800
Subject: [PATCH v1] meson: Stop using deprecated way getting path of files
The just released meson 1.3 strongly deprecated a hack we were using, emitting
a noisy warning (the hack basically depended on an implementation detail to
work). Turns out there has been a better way available for a while, I just
hadn't found it. 1.4 added a more convenient approach, but we can't rely on
that.
Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch: 16-, where the meson build was added.
---
meson.build | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 0095fb183af..d8ff5cb51f0 100644
--- a/meson.build
+++ b/meson.build
@@ -2924,8 +2924,12 @@ potentially_conflicting_files = []
foreach t : potentially_conflicting_files_t
potentially_conflicting_files += t.full_path()
endforeach
-foreach t : configure_files
- t = '@0@'.format(t)
+foreach t1 : configure_files
+ if meson.version().version_compare('>=0.59')
+ t = fs.parent(t1) / fs.name(t1)
+ else
+ t = '@0@'.format(t1)
+ endif
potentially_conflicting_files += meson.current_build_dir() / t
endforeach
foreach sub, fnames : generated_sources_ac
--
2.38.0
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-11-29 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 04:43 [PATCH 03/18] pg_restore: "must be specified" and --list Justin Pryzby <[email protected]>
2023-11-29 18:50 meson: Stop using deprecated way getting path of files Andres Freund <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox