[PATCH lorax] Rework how including /usr/share/doc/anaconda works.

Chris Lumens clumens at redhat.com
Wed Sep 24 16:54:24 UTC 2014


A string passed to runcmd cannot contain a pipe character.  So instead
of further find magic, I'm just going to move the directory out of the
way, take care of the deletion, and then move it back.
---
 share/runtime-cleanup.tmpl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index e7fdcd2..b2b05ac 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -330,7 +330,14 @@ removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/*
 removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/*
 
 ## Remove everything from /usr/share/doc except for anaconda's help files.
-runcmd find ${root}/usr/share/doc -depth -mindepth 1 -path ${root}/usr/share/doc/anaconda -prune -o -type d -print0 | xargs -0 rm -r
+%if exists(root+"/usr/share/doc/anaconda"):
+    move ${root}/usr/share/doc/anaconda ${root}/usr/
+    remove ${root}/usr/share/doc
+    mkdir ${root}/usr/share/doc
+    move ${root}/usr/anaconda ${root}/usr/share/doc/
+%else:
+    remove ${root}/usr/share/doc
+%endif
 
 ## cleanup_python_files()
 runcmd find ${root} -name "*.pyo" -type f -delete
-- 
1.9.3



More information about the anaconda-patches mailing list