]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Delete .git after applying patches
authorCole Robinson <crobinso@redhat.com>
Tue, 6 Oct 2015 19:54:47 +0000 (15:54 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 23 Dec 2015 23:19:29 +0000 (18:19 -0500)
I'm hitting this little annoyance in fedora's package repo:

$ fedpkg prep
Downloading libvirt-1.2.20.tar.gz
...
+ /usr/bin/gzip -dc /home/crobinso/src/fedora/libvirt/libvirt-1.2.20.tar.gz
$ git clean -xdf
Removing libvirt-1.2.20.tar.gz
Skipping repository libvirt-1.2.20/

We git-ify the libvirt directory as part of applying patches in the spec
file, but 'git clean' will ignore subfolders that appear to be standalone
git repos.

Let's just delete the .git directory after we're done with it.

(cherry picked from commit 62ff210e5d6542bda3f25ed5e96c5088a840ce1b)

libvirt.spec.in

index 134ba35781ffbd81180c926ccef63d21be53b69a..0c62162d4824eb65ab84f4eb22f82703da1a6545 100644 (file)
@@ -1243,6 +1243,7 @@ if [ $COUNT -gt 0 ]; then
 fi
 echo "Applied $COUNT patches"
 rm -f $PATCHLIST
+rm -rf .git
 
 %build
 %if ! %{with_xen}