From b9cd6b87a2bc690ad8baf875509d0da2f98899ed Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Wed, 8 Apr 2009 23:16:21 +0000 Subject: 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 --- data/ncurses/_metadata/preinst.c | 2 +- data/ncurses/_metadata/prerm.c | 9 ++------- 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"); -- cgit v1.2.3