summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-12-15 15:32:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-12-15 15:32:42 +0000
commit1fb83351026f30fe8d7c374a4e851ae1f30d1987 (patch)
tree7c8ef9585991cd45b749fc71581bff31684f0cc2 /t/data/SPECS
parenta0030562e8b7f9547151ba7e4bcca738f966e68e (diff)
downloadurpmi-1fb83351026f30fe8d7c374a4e851ae1f30d1987.tar
urpmi-1fb83351026f30fe8d7c374a4e851ae1f30d1987.tar.gz
urpmi-1fb83351026f30fe8d7c374a4e851ae1f30d1987.tar.bz2
urpmi-1fb83351026f30fe8d7c374a4e851ae1f30d1987.tar.xz
urpmi-1fb83351026f30fe8d7c374a4e851ae1f30d1987.zip
- adapt tests to rpm 4.6:
o old suggests format is no more handled o buildroot handling changed o build directories for root changed - fix buildroot_default.spec: was broken since %{rpm_version} is not defined
Diffstat (limited to 't/data/SPECS')
-rw-r--r--t/data/SPECS/buildroot_BuildRoot.spec39
-rw-r--r--t/data/SPECS/buildroot_default.spec6
-rw-r--r--t/data/SPECS/buildroot_define.spec36
3 files changed, 1 insertions, 80 deletions
diff --git a/t/data/SPECS/buildroot_BuildRoot.spec b/t/data/SPECS/buildroot_BuildRoot.spec
deleted file mode 100644
index bf686480..00000000
--- a/t/data/SPECS/buildroot_BuildRoot.spec
+++ /dev/null
@@ -1,39 +0,0 @@
-%define macro_using_buildroot $(echo %buildroot)
-
-Summary: x
-Name: buildroot_BuildRoot
-Version: 1
-Release: 1
-License: x
-Group: x
-Url: x
-BuildRoot: %{_tmppath}/TESTING-%{version}-%{release}
-
-%description
-x
-
-%package sub
-
-Summary: x
-Group: x
-Version: 2
-Release: 2
-
-%description sub
-x
-
-%install
-%if %{rpm_version} >= 500
-echo This is Mandriva specific, skipping it for rpm5.org...
-%else
-wanted=$(echo %{_tmppath}/TESTING-1-1 | sed 's!//!/!')
-[ "%buildroot" = $wanted ] || { echo "buildroot should be $wanted instead of %buildroot"; exit 1; }
-[ "$RPM_BUILD_ROOT" = $wanted ] || { echo "RPM_BUILD_ROOT should be $wanted instead of $RPM_BUILD_ROOT"; exit 1; }
-[ "%macro_using_buildroot" = $wanted ] || { echo "macro_using_buildroot should be $wanted instead of %buildroot"; exit 1; }
-%endif
-
-install -d $RPM_BUILD_ROOT/etc
-echo foo > $RPM_BUILD_ROOT/etc/foo
-
-%files
-/etc/foo
diff --git a/t/data/SPECS/buildroot_default.spec b/t/data/SPECS/buildroot_default.spec
index 94f10ded..11d2f686 100644
--- a/t/data/SPECS/buildroot_default.spec
+++ b/t/data/SPECS/buildroot_default.spec
@@ -22,14 +22,10 @@ Release: 2
x
%install
-%if %{rpm_version} >= 500
-echo This is Mandriva specific, skipping it for rpm5.org...
-%else
-wanted=$(echo %{_tmppath}/buildroot-1-1-buildroot | sed 's!//!/!')
+wanted=$(echo %{_buildrootdir}/buildroot-1-1.%{_arch} | sed 's!//!/!')
[ "%buildroot" = $wanted ] || { echo "buildroot should be $wanted instead of %buildroot"; exit 1; }
[ "$RPM_BUILD_ROOT" = $wanted ] || { echo "RPM_BUILD_ROOT should be $wanted instead of $RPM_BUILD_ROOT"; exit 1; }
[ "%macro_using_buildroot" = $wanted ] || { echo "macro_using_buildroot should be $wanted instead of %buildroot"; exit 1; }
-%endif
install -d $RPM_BUILD_ROOT/etc
echo foo > $RPM_BUILD_ROOT/etc/foo
diff --git a/t/data/SPECS/buildroot_define.spec b/t/data/SPECS/buildroot_define.spec
deleted file mode 100644
index bc78ba83..00000000
--- a/t/data/SPECS/buildroot_define.spec
+++ /dev/null
@@ -1,36 +0,0 @@
-%define macro_using_buildroot $(echo %buildroot)
-
-%define buildroot %{_tmppath}/TESTING
-
-Summary: x
-Name: buildroot_define
-Version: 1
-Release: 1
-License: x
-Group: x
-Url: x
-
-%description
-x
-
-%package sub
-
-Summary: x
-Group: x
-Version: 2
-
-%description sub
-x
-
-
-%install
-wanted=%{_tmppath}/TESTING
-[ "%buildroot" = $wanted ] || { echo "buildroot should be $wanted instead of %buildroot"; exit 1; }
-[ "$RPM_BUILD_ROOT" = $wanted ] || { echo "RPM_BUILD_ROOT should be $wanted instead of $RPM_BUILD_ROOT"; exit 1; }
-[ "%macro_using_buildroot" = $wanted ] || { echo "macro_using_buildroot should be $wanted instead of %buildroot"; exit 1; }
-
-install -d $RPM_BUILD_ROOT/etc
-echo foo > $RPM_BUILD_ROOT/etc/foo
-
-%files
-/etc/foo