Commit 23b64f8357f9a605eae9c153a5fe10e2135eb355
1 parent
12396702
Remove qpdf.cc version check
Remove comparison of qpdf CLI version with library. With almost all the functionality moving into the library, this check is no longer meaningful.
Showing
3 changed files
with
0 additions
and
36 deletions
README-maintainer
| @@ -223,7 +223,6 @@ RELEASE PREPARATION | @@ -223,7 +223,6 @@ RELEASE PREPARATION | ||
| 223 | * configure.ac | 223 | * configure.ac |
| 224 | * libqpdf/QPDF.cc | 224 | * libqpdf/QPDF.cc |
| 225 | * manual/conf.py | 225 | * manual/conf.py |
| 226 | - * qpdf/qpdf.cc | ||
| 227 | `make_dist` verifies this consistency. | 226 | `make_dist` verifies this consistency. |
| 228 | 227 | ||
| 229 | * Update release notes in manual. Look at diffs and ChangeLog. | 228 | * Update release notes in manual. Look at diffs and ChangeLog. |
make_dist
| @@ -64,7 +64,6 @@ cd($tmpdir); | @@ -64,7 +64,6 @@ cd($tmpdir); | ||
| 64 | my $config_version = get_version_from_configure(); | 64 | my $config_version = get_version_from_configure(); |
| 65 | my $code_version = get_version_from_source(); | 65 | my $code_version = get_version_from_source(); |
| 66 | my $doc_version = get_version_from_manual(); | 66 | my $doc_version = get_version_from_manual(); |
| 67 | -my $cli_version = get_version_from_cli(); | ||
| 68 | 67 | ||
| 69 | my $version_error = 0; | 68 | my $version_error = 0; |
| 70 | if ($version ne $config_version) | 69 | if ($version ne $config_version) |
| @@ -82,11 +81,6 @@ if ($version ne $doc_version) | @@ -82,11 +81,6 @@ if ($version ne $doc_version) | ||
| 82 | print "$whoami: doc version = $doc_version\n"; | 81 | print "$whoami: doc version = $doc_version\n"; |
| 83 | $version_error = 1; | 82 | $version_error = 1; |
| 84 | } | 83 | } |
| 85 | -if ($version ne $cli_version) | ||
| 86 | -{ | ||
| 87 | - print "$whoami: qpdf.cc version = $cli_version\n"; | ||
| 88 | - $version_error = 1; | ||
| 89 | -} | ||
| 90 | if ($version_error) | 84 | if ($version_error) |
| 91 | { | 85 | { |
| 92 | die "$whoami: version numbers are not consistent\n"; | 86 | die "$whoami: version numbers are not consistent\n"; |
| @@ -157,22 +151,6 @@ sub get_version_from_manual | @@ -157,22 +151,6 @@ sub get_version_from_manual | ||
| 157 | $doc_version; | 151 | $doc_version; |
| 158 | } | 152 | } |
| 159 | 153 | ||
| 160 | -sub get_version_from_cli | ||
| 161 | -{ | ||
| 162 | - my $fh = safe_open("qpdf/qpdf.cc"); | ||
| 163 | - my $cli_version = 'unknown'; | ||
| 164 | - while (<$fh>) | ||
| 165 | - { | ||
| 166 | - if (m/expected_version = \"([^\"]+)\"/) | ||
| 167 | - { | ||
| 168 | - $cli_version = $1; | ||
| 169 | - last; | ||
| 170 | - } | ||
| 171 | - } | ||
| 172 | - $fh->close(); | ||
| 173 | - $cli_version; | ||
| 174 | -} | ||
| 175 | - | ||
| 176 | sub safe_open | 154 | sub safe_open |
| 177 | { | 155 | { |
| 178 | my $file = shift; | 156 | my $file = shift; |
qpdf/qpdf.cc
| @@ -24,8 +24,6 @@ static int constexpr EXIT_CORRECT_PASSWORD = 3; | @@ -24,8 +24,6 @@ static int constexpr EXIT_CORRECT_PASSWORD = 3; | ||
| 24 | 24 | ||
| 25 | static char const* whoami = 0; | 25 | static char const* whoami = 0; |
| 26 | 26 | ||
| 27 | -static std::string expected_version = "10.5.0"; | ||
| 28 | - | ||
| 29 | class ArgParser | 27 | class ArgParser |
| 30 | { | 28 | { |
| 31 | public: | 29 | public: |
| @@ -445,17 +443,6 @@ ArgParser::argPositional(char* arg) | @@ -445,17 +443,6 @@ ArgParser::argPositional(char* arg) | ||
| 445 | void | 443 | void |
| 446 | ArgParser::argVersion() | 444 | ArgParser::argVersion() |
| 447 | { | 445 | { |
| 448 | - if (expected_version != QPDF::QPDFVersion()) | ||
| 449 | - { | ||
| 450 | - std::cerr << "***\n" | ||
| 451 | - << "WARNING: qpdf CLI from version " << expected_version | ||
| 452 | - << " is using library version " << QPDF::QPDFVersion() | ||
| 453 | - << ".\n" | ||
| 454 | - << "This probably means you have multiple versions of qpdf installed\n" | ||
| 455 | - << "and don't have your library path configured correctly.\n" | ||
| 456 | - << "***" | ||
| 457 | - << std::endl; | ||
| 458 | - } | ||
| 459 | std::cout | 446 | std::cout |
| 460 | << whoami << " version " << QPDF::QPDFVersion() << std::endl | 447 | << whoami << " version " << QPDF::QPDFVersion() << std::endl |
| 461 | << "Run " << whoami << " --copyright to see copyright and license information." | 448 | << "Run " << whoami << " --copyright to see copyright and license information." |