openSUSE/obs-service-git_tarballs — pull request #6 by vuntz (2013-01-22 13:52:48+00:00)
Title: Keep intact parameters to %setup (except old '-n foo')

openstack-keystone has a %setup line like this:
%setup -q -T -D -b0 -a6 -n keystone-2012.2.3

(this is for the hybrid backend)

We don't want to replace it with:
%setup -q -n keystone-2012.2.3

So use two regexps: one to remove "-n oldfoo", and then one to add "-n
newfoo". Note that we have to be careful to avoid matching that is too
greedy (to not match on multiline and then eat the -n option from
"%files -n foo").