From 05ebf4ffcd066b08257938a748237d325381735a Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 24 Sep 2014 12:51:08 -0400 Subject: [PATCH] Rework how including /usr/share/doc/anaconda works. 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 e7fdcd2b..b2b05ac5 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