[PATCH 2/3] Let the excludedocs test pass if there are only directories left.

David Shea dshea at redhat.com
Thu Jun 4 20:23:44 UTC 2015


On 06/04/2015 04:07 PM, Chris Lumens wrote:
> This means there's packaging bugs, but anaconda's done its job.  I don't
> think we need to have this test forever fail just because some packages
> have problems.
> ---
>   tests/kickstart_tests/packages-excludedocs.ks | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kickstart_tests/packages-excludedocs.ks b/tests/kickstart_tests/packages-excludedocs.ks
> index 4f12ca7..fd31b71 100644
> --- a/tests/kickstart_tests/packages-excludedocs.ks
> +++ b/tests/kickstart_tests/packages-excludedocs.ks
> @@ -29,11 +29,11 @@ if [ ! -d /usr/share/doc ]; then
>       echo SUCCESS > /root/RESULT
>   else
>       cd /usr/share/doc
> -    count=$(find . | grep -v -E "^\.$" | wc -l)
> +    count=$(find . -type f | grep -v -E "^\.$" | wc -l)
>       if [ $count -eq 0 ]; then
> -        echo "SUCCESS - but the /usr/share/doc directory still exists" > /root/RESULT
> +        echo "SUCCESS - but directories still exist under /usr/share/doc" > /root/RESULT
>       else
> -        echo "there are files and possibly directories in /usr/share/doc" > /root/RESULT
> +        echo "there are files in /usr/share/doc" > /root/RESULT
>           echo >> /root/RESULT
>           find /usr/share/doc >> /root/RESULT
>       fi

I think you need a separate find call to count directories. 
/usr/share/doc is always going to be there even if empty, since it's 
owned by the filesystem package and not considered a %doc in that context.

Other than that these look fine.


More information about the anaconda-patches mailing list