Re: [jenkins-ci PATCH 04/10] guests: Move ccache configuration to shell profile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 05, 2018 at 02:22:14PM +0200, Andrea Bolognani wrote:
> Now that we have our custom shell profile, making sure ccache
> is used is way simpler.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  guests/tasks/users.yml  | 18 ------------------
>  guests/templates/bashrc |  2 ++
>  2 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml
> index 8e59fa9..e691b32 100644
> --- a/guests/tasks/users.yml
> +++ b/guests/tasks/users.yml
> @@ -65,24 +65,6 @@
>      owner: '{{ flavor }}'
>      group: '{{ flavor }}'
>  
> -- name: '{{ flavor }}: Enable ccache'
> -  lineinfile:
> -    path: /home/{{ flavor }}/.profile
> -    line: 'which ccache >/dev/null 2>&1 && export CC="ccache cc"'
> -    state: present
> -    owner: '{{ flavor }}'
> -    group: '{{ flavor }}'
> -    create: yes
> -
> -- name: '{{ flavor }}: Enable ccache'
> -  lineinfile:
> -    path: /home/{{ flavor }}/.bashrc
> -    line: 'which ccache >/dev/null 2>&1 && export CC="ccache cc"'
> -    state: present
> -    owner: '{{ flavor }}'
> -    group: '{{ flavor }}'
> -    create: yes
> -
>  - name: '{{ flavor }}: Create shell profile'
>    template:
>      src: templates/{{ item }}
> diff --git a/guests/templates/bashrc b/guests/templates/bashrc
> index 6640da6..51d0e64 100644
> --- a/guests/templates/bashrc
> +++ b/guests/templates/bashrc
> @@ -1 +1,3 @@
>  export PS1="[\u@\h \w]\$ "
> +
> +which ccache >/dev/null 2>&1 && export CC="ccache cc"

IIUC, this appears to have broken the Go compiler. Unsetting 'CC' makes
it work again. IIUC this wasn't a problem with normal Fedora setup for
ccache, because that doesn't set 'CC', it just puts the ccache 'gcc'
binary into $PATH.

It looks like its a limitation of "Go" - it doesn't like it when
"CC" contains multiple words - it drops everything except the first
word. So when we set CC="ccache cc", go just runs "ccache $args"
instead of "ccache cc $args"


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux