Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53988 closed defect (fixed)

sqlite3 no longer links to readline

Reported by: posita (Matt Bogosian) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc:
Port: sqlite3

Description

At some point (I'm not sure when), sqlite3 stopped linking to readline, which is really annoying if you have (and value) ~/.sqlite_history.

% port info sqlite3
sqlite3 @3.18.0 (databases)
Sub-ports:            sqlite3-tools
Variants:             universal

Description:          SQLite3 is an SQL database engine in a C library. Programs that link the SQLite3 library can have SQL database access without
                      running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite3) that can be
                      used to administer an SQLite3 database and which serves as an example of how to use the SQLite3 library.
Homepage:             http://www.sqlite.org/

Library Dependencies: libedit, ncurses
Platforms:            darwin
License:              public-domain
Maintainers:          Email: mps@macports.org, GitHub: Schamschula
                      Policy: openmaintainer
% otool -Lv $( which sqlite3 )
/Users/matt/.site/bin/sqlite3:
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
        time stamp 2 Wed Dec 31 16:00:02 1969

Change History (11)

comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)

Well, there are reasons why we use libedit, rather than readline, see #52866

If you are willing to deal with those issues, we can always add a readline variant.

comment:2 Changed 7 years ago by Schamschula (Marius Schamschula)

Type: defectrequest

comment:3 Changed 7 years ago by Schamschula (Marius Schamschula)

Owner: set to Schamschula
Status: newassigned

comment:4 Changed 7 years ago by posita (Matt Bogosian)

Does libedit not provide command history/editing? Because I have libedit installed, and have rebuilt sqlite3, but I am unable to edit/see historical commands.

comment:5 Changed 7 years ago by Schamschula (Marius Schamschula)

Cc: mps@… removed

comment:6 Changed 7 years ago by Schamschula (Marius Schamschula)

Since when are you having this problem?

I just saw #31747 (5 years ago) where Ryan Schmidt mentions a licensing issue as the reason for changing to libedit.

comment:7 Changed 7 years ago by posita (Matt Bogosian)

I know that it was working as desired about a month ago. Maybe readline is a red herring, but I did have access to interactive command-line editing and command history last month. Here's what I get now:

% sqlite3 --version
3.18.0 2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37
[matt:~] % sqlite3
SQLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> ^P
   ...> ;
Error: unrecognized token: ""
sqlite> ^D

In other words, ^P doesn't work anymore to go back through command line history.

comment:8 Changed 7 years ago by Schamschula (Marius Schamschula)

comment:9 Changed 7 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In 6142fdfc661c9232b58e045a9b10b2ce285ca70e/macports-ports:

sqlite3: fix issue with command history

Closes: #53988

comment:10 Changed 7 years ago by mf2k (Frank Schima)

Type: requestenhancement

Note that a "request" ticket type is only for requesting a new port.

comment:11 in reply to:  10 Changed 7 years ago by Schamschula (Marius Schamschula)

Type: enhancementdefect

Replying to mf2k:

Note that a "request" ticket type is only for requesting a new port.

True enough. The first label actually turned out to be correct: the problem was indeed related to building sqlite3 against libedit, see above links.

Note: See TracTickets for help on using tickets.