diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index 137c944..525b786 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -20,7 +20,9 @@ if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then exit 1 fi -if ! grep -q "$DEP.*$OLD" $CABALFILE; then +BREAK=[^[:alnum:]-] + +if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then echo "$CABALFILE does not match: $DEP $OLD" exit 1 fi @@ -29,4 +31,4 @@ if [ ! -f $CABALFILE.orig ]; then BACKUP=.orig fi -sed -i$BACKUP -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE +sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b4f0aa5..e488727 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.6 +Version: 0.15.6.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,7 +64,11 @@ EOF %changelog -* Fri Jun 8 2012 Jens Petersen - 0.15.6-1 +* Fri Jun 22 2012 Jens Petersen - 0.15.6.1-1 +- cabal-tweak-dep-ver: be careful only to match complete dep name and + do not match beyond "," + +* Fri Jun 22 2012 Jens Petersen - 0.15.6-1 - cabal-tweak-dep-ver: new script to tweak depends version bounds in .cabal from ghc-rpm-macros-0.95.5 - ghc-dep.sh: only use buildroot package.conf.d if it exists