Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[terminfo-db] Add a builder for the terminfo database #9165

Merged
merged 12 commits into from
Aug 6, 2024
Merged

Conversation

ararslan
Copy link
Member

This uses the directory-based database rather than the single Berkeley database (terminfo.db). The license is from ncurses, which is close enough; see https://invisible-island.net/ncurses/terminfo.src.html.

Ideally this would be shipped as one of Julia's dependencies to ensure that the custom terminfo parser actually works on all platforms, as not all have the terminfo database.

This uses the directory-based database rather than the single Berkeley
database (terminfo.db). The license is from ncurses, which is close
enough; see https://invisible-island.net/ncurses/terminfo.src.html.

Ideally this would be shipped as one of Julia's dependencies to ensure
that the custom terminfo parser actually works on all platforms, as not
all have the terminfo database.
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make log more verbose.

T/TermInfoDB/build_tarballs.jl Outdated Show resolved Hide resolved
T/TermInfoDB/build_tarballs.jl Outdated Show resolved Hide resolved
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
@giordano
Copy link
Member

I'm confused now: find doesn't seem to find (nor delete) anything, so how come the duplicate directories disappear?

@ararslan
Copy link
Member Author

I wish I knew...

@ararslan
Copy link
Member Author

Okay wtf:

---> mv -fv "${dir}/${file}" "${lcdir}/${lcfile}"
'2/2621A' -> '2/2621a'

But then

├── 2
│   ├── 2621
│   ├── 2621-wl
│   ├── 2621A
│   └── 2621a

and

┌ Warning: share/terminfo/2/2621a causes a case-sensitivity ambiguity!

@ararslan
Copy link
Member Author

Am I going crazy or does this make no sense? (I guess those aren't mutually exclusive...) Also very possible that how I've gone about the case handling is incorrect but it seems like it should work as written.

@giordano
Copy link
Member

giordano commented Aug 5, 2024

For the record, it turns out the database contains lots of hardlinked files which share the same inodes (you can check it out with ls -li), which makes moving or copying them harder than it should be...

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
T/TermInfoDB/build_tarballs.jl Outdated Show resolved Hide resolved
T/TermInfoDB/build_tarballs.jl Outdated Show resolved Hide resolved
ararslan and others added 2 commits August 5, 2024 15:15
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
@ararslan ararslan merged commit e8ff21b into master Aug 6, 2024
4 checks passed
@ararslan ararslan deleted the aa/terminfo-db branch August 6, 2024 02:01
# I'd rather not list out >2k individual `FileProduct`s so let's just call the entry
# for xterm our "product" and hope the rest are there
products = [
FileProduct("share/terminfo/x/xterm", :terminfo_xterm),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can share/terminfo be the "file" product?

Copy link
Member Author

@ararslan ararslan Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered that as well. I had assumed not but I just checked the implementation of FileProduct and it only requires ispath, not isfile, which suggests that it could potentially work. @giordano, is there any reason why we couldn't do what @tecosaur noted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that'd work as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does versioning work if we change this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't change the version number, Pkg will only install the latest one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants