Bug 168386 - Strange newline in app-emulation/emul-linux-x86-baselibs-10.1
Bug#: 168386 Product:  Gentoo Linux Version: unspecified Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: amd64@gentoo.org Reported By: michael@smith-li.com
Component: Ebuilds
URL: 
Summary: Strange newline in app-emulation/emul-linux-x86-baselibs-10.1
Keywords:  
Status Whiteboard: 
Opened: 2007-02-25 22:13 0000
Description:   Opened: 2007-02-25 22:13 0000
There's a bit of odd code in app-emulation/emul-linux-x86-10.1.ebuild. Here's
an alternative solution that IMO is a bit cleaner.

Reproducible: Always

Steps to Reproduce:

------- Comment #1 From Michael A. Smith 2007-02-25 22:14:41 0000 -------
Created an attachment (id=111238) [details]
emul-linux-x86-baselibs-10.1.ebuild

---
app-emulation/emul-linux-x86-baselibs/emul-linux-x86-baselibs-10.1.ebuild.orig 
      2007-02-19 17:05:33.000000000 -0500
+++ app-emulation/emul-linux-x86-baselibs/emul-linux-x86-baselibs-10.1.ebuild  
  2007-02-23 13:45:23.000000000 -0500
@@ -64,13 +64,16 @@
        unpack ${A}
        cd ${S}

+       # rm these first so find has less to do
+       rm -r "${S}/etc/env.d/binutils/" \
+             "${S}/usr/lib32/binutils/" \
+             "${S}/usr/lib32/engines/"  \
+             "${S}/usr/lib32/openldap/" \
+             "${S}/usr/lib32/python2.4/"
+
+       # Not POSIX compliant, but it should work on amd64
        WHITELIST="(${S}/lib32/security/pam_filter/upperLOWER|${S}/etc/env.d)"
-       # the following line is broken up because we have files with spaces in
the filename
-       find ${S} ! -type d ! -name '*.so*' | egrep -v "${WHITELIST}" | xargs
-d '
-' rm -f
-       rm -rf ${S}/etc/env.d/binutils/ ${S}/usr/lib32/binutils/
-       rm -rf ${S}/usr/lib32/engines/ ${S}/usr/lib32/openldap/
-       rm -rf ${S}/usr/lib32/python2.4/
+       find ${S} ! -type d ! -name '*.so*' -print0 | egrep --null -v
"${WHITELIST}" | xargs -0 rm

        ln -s ../share/terminfo ${S}/usr/lib32/terminfo
 }

------- Comment #2 From Simon Stelling (RETIRED) 2007-02-26 10:02:47 0000 -------
Actually 10.1-r1 was already put in the tree which uses the eclass so looks
much cleaner, but i merged the rm calls together. Thanks.