Allow re-execution of the %prep section 57/24957/2
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Thu, 24 Jul 2014 11:30:19 +0000 (13:30 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Mon, 4 Aug 2014 06:54:41 +0000 (08:54 +0200)
With Yocto, when building rpm a second time, the do_prep() function
fails because it assumes it hasn't already ran but will be re-using the
previous build directory which hasn't been cleaned. This patch prevent
such a situation to fail.

This issue is not present when building with GBS since every new build
is made in a clean directory but since the yocto recipes are generated
from spec file, it is better to directly correct the spec file.
This patch has no impact on the GBS build.

Bug-Tizen: BTY-15
Change-Id: I1e992b63b41ae76a4d6706046e741dc2d25b15eb
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
packaging/rpm.spec

index 07fdb8c..1868d12 100644 (file)
@@ -38,16 +38,16 @@ BuildRequires:  fdupes
 Provides:       rpminst
 Provides:       rpm-libs
 
-Source1:       db-4.8.30.tar.bz2
-Source2:       db-4.8.30-integration.dif
-Source4:       rpm-tizen_macros
-Source8:       rpmconfigcheck
-Source13:      find-docs.sh
-Source22:      device-sec-policy
-Source23:      find-provides.ksyms
-Source1001:    rpm.manifest
+Source1:        db-4.8.30.tar.bz2
+Source2:        db-4.8.30-integration.dif
+Source4:        rpm-tizen_macros
+Source8:        rpmconfigcheck
+Source13:       find-docs.sh
+Source22:       device-sec-policy
+Source23:       find-provides.ksyms
+Source1001:     rpm.manifest
 Source0:        rpm-%{version}.tar.bz2
-#
+
 # avoid bootstrapping problem
 %define _binary_payload w9.bzdio
 
@@ -118,7 +118,7 @@ that will manipulate RPM packages and databases.
 cp %{SOURCE1001} .
 rm -rf sqlite
 tar xjf %{S:1}
-ln -s db-4.8.30 db
+ln -sfn db-4.8.30 db
 chmod -R u+w db/*
 # will get linked from db3
 rm -f rpmdb/db.h