summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2009-04-08 23:16:21 +0000
committerJay Freeman <saurik@saurik.com>2009-04-08 23:16:21 +0000
commitb9cd6b87a2bc690ad8baf875509d0da2f98899ed (patch)
treef673c03ceda102b41831f967cb986dfc57d1c5c1
parent910283bcacd869d4b8cfd655f00d5d87ceb3cf72 (diff)
This is a slightly simpler (and therefore safer: easier to prove right, more difficult to break, etc.) de-essential-izing control set for ncurses.
git-svn-id: http://svn.telesphoreo.org/trunk@568 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r--data/ncurses/_metadata/preinst.c2
-rw-r--r--data/ncurses/_metadata/prerm.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/data/ncurses/_metadata/preinst.c b/data/ncurses/_metadata/preinst.c
index 2c33ad71d..a2e8d5641 100644
--- a/data/ncurses/_metadata/preinst.c
+++ b/data/ncurses/_metadata/preinst.c
@@ -9,7 +9,7 @@ int main(int argc, char *argv[]) {
))) return 0;
unlink("/usr/lib/_ncurses");
- if (symlink("/usr/lib/", "/usr/lib/_ncurses") != 0)
+ if (symlink("/usr/lib", "/usr/lib/_ncurses") != 0)
return 1;
return 0;
diff --git a/data/ncurses/_metadata/prerm.c b/data/ncurses/_metadata/prerm.c
index 1bcb72a4c..cd60db0c7 100644
--- a/data/ncurses/_metadata/prerm.c
+++ b/data/ncurses/_metadata/prerm.c
@@ -9,13 +9,8 @@ int main(int argc, char *argv[]) {
if (unlink("/usr/lib/_ncurses") == -1)
return 1;
- if (mkdir("/usr/lib/_ncurses", 0755) == -1) {
- symlink("/usr/lib/", "/usr/lib/_ncurses");
- return 2;
- }
-
- rename("/usr/lib/libcurses.dylib", "/usr/lib/_ncurses/libcurses.dylib");
- rename("/usr/lib/libncurses.dylib", "/usr/lib/_ncurses/libncurses.dylib");
+ unlink("/usr/lib/libcurses.dylib");
+ unlink("/usr/lib/libncurses.dylib");
if (access("/usr/lib/libcurses.dylib", F_OK) != 0)
symlink("libncurses.5.4.dylib", "/usr/lib/libcurses.dylib");