#14123 closed defect (fixed)
base-1.6.0 "port uninstall" left installed files at case-sensitive FS
Reported by: | ononon@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Low | Milestone: | MacPorts 1.9.0 |
Component: | base | Version: | 1.6.0 |
Keywords: | Cc: | jmroot (Joshua Root), pguyot (Paul Guyot), raimue (Rainer Müller), dhaines@…, ruud@… | |
Port: |
Description
At HFS+ (case sensitive),
port install ncursesw port uninstall ncursesw
make errors and some installed files are not deleted.
This is because "filemap" in Pextlib.dylib is a case-insensitive function, so
filemap set testmap "/A/Apple_Terminal" "casetest" filemap set testmap "/a/appleII" "casetest" puts [filemap list testmap "casetest"]
show "/A/Apple_Terminal /A/appleII". (Note that path 'a' of 'appleII' was touppered !)
To fix this, you have only to substitute 'strncasecmp' with 'strncmp' in src/pextlib1.0/filemap.c . I guess that this fix make little influence to case-insensitive users, then expect that it is applied for our case-sensitive users.
Thanks in advance.
Attachments (1)
Change History (21)
Changed 16 years ago by jmroot (Joshua Root)
Attachment: | filemap_file_case.diff added |
---|
comment:1 Changed 16 years ago by jmroot (Joshua Root)
Cc: | jmr@… pguyot@… added |
---|
The attached patch should do what you're asking for. Paul, you wrote this code—will this break anything?
comment:3 follow-up: 6 Changed 16 years ago by jmroot (Joshua Root)
To answer my own question, yes, applying just this patch breaks deactivation.
comment:4 Changed 16 years ago by tobypeterson
Milestone: | MacPorts base bugs → MacPorts Future |
---|
Milestone MacPorts base bugs deleted
comment:6 Changed 15 years ago by dhaines@…
Replying to jmr@…:
To answer my own question, yes, applying just this patch breaks deactivation.
From what I can tell, replacing the three instances of strncasecmp in src/pextlib1.0/filemap.c with strncmp works just fine in 1.8.1. I've tested it on both a case-sensitive filesystem and a case-insensitive disk image, and it seems to handle activation, deactivation, installation, and deinstallation of various ports, including ncursesw and qt4-mac, just fine. Unless someone else finds an error with this, I'd ask that the change be included with the next released version of MacPorts.
comment:7 follow-up: 8 Changed 15 years ago by jmroot (Joshua Root)
Have you tested on Tiger, Leopard and Snow Leopard?
comment:8 follow-up: 9 Changed 15 years ago by dhaines@…
comment:9 Changed 15 years ago by dhaines@…
comment:10 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:11 follow-up: 13 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts 1.9.0 → MacPorts Future |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Reverted in r60247, still breaks deactivation of some ports (e.g. ncursesw).
comment:13 follow-up: 14 Changed 15 years ago by dhaines@…
Replying to jmr@…:
Reverted in r60247, still breaks deactivation of some ports (e.g. ncursesw).
In which situations did it break things? I know that I tested it on 10.5, 10.6, both case sensitive and case insensitive. Is this a 10.4 issue? At worst, we could include an #ifdef for, say, 10.5 and 10.6. Thoughts?
comment:14 follow-up: 15 Changed 15 years ago by jmroot (Joshua Root)
Replying to dhaines@…:
In which situations did it break things?
Install without patch, apply patch, try deactivating.
comment:15 Changed 15 years ago by dhaines@…
comment:16 Changed 15 years ago by jmroot (Joshua Root)
This is probably fixed in the sqlite registry.
comment:17 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.9.0 |
---|
comment:18 follow-up: 19 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Seems fine to me, reopen if you still have this problem when using portdbformat sqlite.
comment:19 follow-up: 20 Changed 15 years ago by dhaines@…
Replying to jmr@…:
Seems fine to me, reopen if you still have this problem when using portdbformat sqlite.
Isn't that an unsupported option?
comment:20 Changed 15 years ago by raimue (Rainer Müller)
Replying to dhaines@…:
Isn't that an unsupported option?
sqlite will be the new default registry format as of MacPorts 1.9. Please do not enable it yet with 1.8.x.
implementation of the requested change