On Fri, Jun 18, 2010 at 8:17 PM, Andres P <aepd87@gmail.com> wrote:
* Before, calls to sudo were not being word-split, whereas falling back to su, for some reason, meant applying IFS to the arguments. From now on calling either does not mangle any of the operands.
* Instead of recreating the basic bash concept of $? with $ret, opt for stacking the command line into a variable that can later be checked *once* for a return code.
Note that this still has the "using su fucks up the terminal" bug present in 3.4. When makepkg uses su for any reason, fallback or not, the terminal will no longer display stdin and has to be reset(1). To reproduce: # mv /usr/bin/sudo{,~} Then use a makepkg operation that requires root; e.g. -i or -s. I can reproduce outside of makepkg: $ fakeroot bash -c "su -c 'pacman -Q foo'" But this is *just* an example. These calls do not involve fakeroot. Andres P