Some users read the old message as a request to open a ticket whenever
the message was printed. It's actually printed whenever an error
occurs, which doesn't necessarily signify a bug.
Treat activating an already active port and deactivating an already
inactive port as harmless no-ops. Specifying a port or version of a
port that isn't installed is still an error.
Fixes: https://trac.macports.org/ticket/56817
Using fullfsync should make the registry much less likely to experience
corruption in scenarios like writing to it when power fails.
Write-ahead logging (WAL) should reduce the window in which syncing
needs to occur, hopefully improving reliability further as well as
improving performance. However, WAL is only practical for us to use
with SQLite versions 3.22.0 and newer, because older versions didn't
allow read-only access to the database, which would mean commands like
'port installed' run with normal privileges would not work with a
root-owned installation.
Closes: https://trac.macports.org/ticket/61154
When an SQLite call returned one of the extended result codes (see
https://sqlite.org/rescode.html#extended_result_code_list), the existing
switch/case did not handle that, errPtr remained uninitialized, and
following code crashed with a segmentation fault.
Avoid this by handling the extended result codes just like we're
handling SQLITE_ERROR. Additionally, default-initialize the errPtr
structure to avoid crashes in the future.
This manifested itself when attempting to uninstall ports from
a database that returned SQLITE_CORRUPT_INDEX (779).
This doesn't do a whole lot since this revision of the standard only
fixes errata in the spec, but it does let you guarantee a compiler that
accepts -std=c17 for projects that insist on using it. I guess it's
theoretically possible that following the earlier erroneous spec
results in compiler behaviour that breaks some code, too, though
implementors usually won't follow the letter of the spec if it says to
do something clearly broken.