Changeset 1006


Ignore:
Timestamp:
Feb 19, 2017, 11:55:05 PM (8 years ago)
Author:
dmik
Message:

rpm: Revert r409 as it's not needed.

popen has nothing to do with /@unixroot recognition, it all depends on
the shell used. I.e. if the shell is a posix-like one built against kLIBC
then it will recognize /@unixroot and other things perfectly. The reason
why it really fails w/o EMXSHELL is because kLIBC looks in /@unixroot/bin
for sh.exe (which is "officially" missing from our RPM environment), not
in /@unixroot/usr/bin. So the correct fix for such cases is to either patch
kLIBC to also look in /@unixroot/usr/bin or set EMXSHELL to a proper
location in CONFIG.SYS (or use kLIBC path rewriter to permanently map
/@unixroot/bin to /@unixroot/usr/bin). Fixing kLIBC is actually not a good
idea as it does too many checks already. Scanning the filesystem each
time popen/system is called is not nice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rpm/trunk/rpmio/macro.c

    r594 r1006  
    436436    if (rc)
    437437        goto exit;
    438 
    439 #ifdef __KLIBC__
    440     // FIXME popen() does not recognize unixroot
    441     if (strstr( buf, "/@unixroot") && !getenv("EMXSHELL"))
    442         putenv( "EMXSHELL=sh");
    443 #endif
    444438
    445439    if ((shf = popen(buf, "r")) == NULL) {
Note: See TracChangeset for help on using the changeset viewer.