From 9f35fb43733452c2e979dec182347e0b250567ea Mon Sep 17 00:00:00 2001 From: jbj Date: Tue, 11 Jan 2000 15:22:35 +0000 Subject: configurable PATH for install %pre/%post et al scriptlets. use only %_install_langs, not LINGUAS/LANG when deciding to install. CVS patchset: 3514 CVS date: 2000/01/11 15:22:35 --- lib/transaction.c | 2 ++ lib/uninstall.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/transaction.c b/lib/transaction.c index ace8f98a0..860473da7 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1091,9 +1091,11 @@ static void skipFiles(TFI_t * fi, int noDocs) if (s) { languages = (const char **) splitString(s, strlen(s), ':'); xfree(s); +#ifdef DYING /* XXX LINGUAS/LANG is used by the installer so leave alone for now */ } else if ((s = getenv("LINGUAS")) || (s = getenv("LANG")) || (s = "en")) { languages = (const char **) splitString(s, strlen(s), ':'); +#endif } else languages = NULL; diff --git a/lib/uninstall.c b/lib/uninstall.c index 87c8230d5..874f1279f 100644 --- a/lib/uninstall.c +++ b/lib/uninstall.c @@ -353,7 +353,14 @@ static int runScript(Header h, const char * root, int progArgc, const char ** pr } } - doputenv(SCRIPT_PATH); + { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); + const char *path = SCRIPT_PATH; + + if (ipath && ipath[5] != '%') + path = ipath; + doputenv(path); + if (ipath) xfree(ipath); + } for (i = 0; i < numPrefixes; i++) { sprintf(prefixBuf, "RPM_INSTALL_PREFIX%d=%s", i, prefixes[i]); -- cgit v1.2.3