public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schmidt <michich@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/icecream] epel10: - Rewritten the profile scripts to make icecream work together with ccache.
Date: Thu, 30 Jul 2026 15:15:21 GMT	[thread overview]
Message-ID: <178542452147.1.4060631838521806511.rpms-icecream-4570b1222c89@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/icecream
Branch : epel10
Commit : 4570b1222c89944cf5386dae814b37296ab54fca
Author : Michal Schmidt <michich@fedoraproject.org>
Date   : 2007-11-30T00:07:18+00:00
Stats  : +31/-13 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/icecream/c/4570b1222c89944cf5386dae814b37296ab54fca?branch=epel10

Log:
- Rewritten the profile scripts to make icecream work together with ccache.

---
diff --git a/icecream.csh.in b/icecream.csh.in
index 444194f..d6a118c 100644
--- a/icecream.csh.in
+++ b/icecream.csh.in
@@ -1,7 +1,21 @@
-# If icecream and ccache are installed, we must not put both in PATH
-# to prevent recursive invocations.
-# Note: ccache.csh (if present) will be sourced before icecream.csh
+# Leaves path unchanged if icecc is already there.
+# If ccache is there, adds icecc _after_ it.
+# Otherwise adds icecc to the beginning.
 
-if ( "$path" !~ *@LIBDIR@/icecc/bin* && "$path" !~ *@LIBDIR@/ccache* ) then
-	set path = ( @LIBDIR@/icecc/bin "$path" )
+if ( "$path" !~ *@LIBDIR@/icecc/bin* ) then
+	if ( "$path" !~ *@LIBDIR@/ccache* ) then
+		set path = ( @LIBDIR@/icecc/bin "$path" )
+	else
+		@ pos = 0
+		foreach item ( $path )
+			@ pos = $pos + 1
+			if ( $item == @LIBDIR@/ccache ) break
+		end
+		@ next_pos = $pos + 1
+		set path = ( $path[1-$pos] @LIBDIR@/icecc/bin \
+			$path[$next_pos-])
+		unset next_pos
+		unset pos
+		unset item
+	endif
 endif

diff --git a/icecream.sh.in b/icecream.sh.in
index f42d2a3..d637a6a 100644
--- a/icecream.sh.in
+++ b/icecream.sh.in
@@ -1,8 +1,9 @@
-# If icecream and ccache are installed, we must not put both in PATH
-# to prevent recursive invocations.
-# Note: ccache.sh (if present) will be sourced before icecream.sh
+# Leaves PATH unchanged if icecc is already there.
+# If ccache is there, adds icecc _after_ it.
+# Otherwise adds icecc to the beginning.
 
-if ! echo "$PATH" | /bin/grep -q "@LIBDIR@/icecc/bin\|@LIBDIR@/ccache"
-then
-	PATH="@LIBDIR@/icecc/bin:$PATH"
-fi
+PATH=`echo $PATH | /bin/sed -e \
+	'\%@LIBDIR@/icecc/bin% b
+	s%@LIBDIR@/ccache%&:@LIBDIR@/icecc/bin%
+	t
+	s%^%@LIBDIR@/icecc/bin:%'`

diff --git a/icecream.spec b/icecream.spec
index 0782250..75d5f9f 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -1,6 +1,6 @@
 Name:		icecream
 Version:	0.8.0
-Release:	5.20071101svn%{?dist}
+Release:	6.20071101svn%{?dist}
 Summary:	Distributed compiler
 
 Group:		Development/Tools
@@ -210,6 +210,9 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/icecc.pc
 
 %changelog
+* Thu Nov 29 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-6.20071101svn
+- Rewritten the profile scripts to make icecream work together with ccache.
+
 * Tue Nov 27 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-5.20071101svn
 - SELinux: Allow iceccd to contact the scheduler via UDP.
 - Don't add icecream to PATH in the profile scripts if ccache is installed

                 reply	other threads:[~2026-07-30 15:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178542452147.1.4060631838521806511.rpms-icecream-4570b1222c89@fedoraproject.org \
    --to=michich@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox