[MacPorts] #70846: macports.sqlext may need patching and could have more complete usage instructions (was: macports.sqlext should be updated to current extension APIs)

MacPorts noreply at macports.org
Sat Sep 21 13:13:47 UTC 2024


#70846: macports.sqlext may need patching and could have more complete usage
instructions
------------------------------+----------------------
  Reporter:  RJVB             |      Owner:  (none)
      Type:  enhancement      |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:                   |   Keywords:  haspatch
      Port:  macports.sqlext  |
------------------------------+----------------------
Changes (by RJVB):

 * keywords:   => haspatch
 * type:  defect => enhancement


Old description:

> The macports.sqlext extension provided by port:macports.sqlext no longer
> works, idem for the version of the code in the git master branch.
>
> As already posted in a comment in #62365:
>
> {{{
> > port installed macports.sqlext
> The following ports are currently installed:
>   macports.sqlext @2.6.3_0 (active)
>
> > sudo cp -p /opt/local/var/macports/registry/registry{,-20240920}.db
> > sqlite3
> SQLite version 3.41.0 2023-02-21 18:09:37
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> .load /opt/local/lib/sqlite3/macports.sqlext
> sqlite> .open /opt/local/var/macports/registry/registry-20240920.db
> sqlite> VACUUM;
> Runtime error: no such collation sequence: VERSION
> }}}
>
> Indeed, looking at the sqlext.c code one explanation is obvious: the
> `HAVE_SQLITE3EXT_H` macro has been replaced by `SQLITE3EXT_H`(and I don't
> find any evidence of `HAVE_SQLITE3EXT_H` being set by the build system
> either).
> A better check would a simple `#ifdef sqlite3_create_collation` but even
> with that change made it seems that the `sqlite3_extension_init()`
> function is simply not being called when the extension is loaded.

New description:

 As a database n00b it wasn't exactly clear to me how to use this extension

 ----

 The macports.sqlext extension provided by port:macports.sqlext no longer
 works, idem for the version of the code in the git master branch.

 As already posted in a comment in #62365:

 {{{
 > port installed macports.sqlext
 The following ports are currently installed:
   macports.sqlext @2.6.3_0 (active)

 > sudo cp -p /opt/local/var/macports/registry/registry{,-20240920}.db
 > sqlite3
 SQLite version 3.41.0 2023-02-21 18:09:37
 Enter ".help" for usage hints.
 Connected to a transient in-memory database.
 Use ".open FILENAME" to reopen on a persistent database.
 sqlite> .load /opt/local/lib/sqlite3/macports.sqlext
 sqlite> .open /opt/local/var/macports/registry/registry-20240920.db
 sqlite> VACUUM;
 Runtime error: no such collation sequence: VERSION
 }}}

 Indeed, looking at the sqlext.c code one explanation is obvious: the
 `HAVE_SQLITE3EXT_H` macro has been replaced by `SQLITE3EXT_H`(and I don't
 find any evidence of `HAVE_SQLITE3EXT_H` being set by the build system
 either).
 A better check would a simple `#ifdef sqlite3_create_collation` but even
 with that change made it seems that the `sqlite3_extension_init()`
 function is simply not being called when the extension is loaded.

--

-- 
Ticket URL: <https://trac.macports.org/ticket/70846#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list