On Mon, Jul 07, 2008 at 01:31:55AM -0400, Jeff Johnson wrote:
> Here's the flaw (from the edos-test*.src.rpm build):
>
> ...
> re --nodeps edos-test-*.src.rpm
> (cd edos-test && /X/src/wdj/rpm --macros /X/src/wdj/macros:/X/src/wdj/
> tests/macros -q --specfile edos-test.spec && /X/src/wdj/rpm --macros /
> X/src/wdj/macros:/X/src/wdj/tests/macros -q --specsrpm edos-test.spec
> && /X/src/wdj/rpm --macros /X/src/wdj/macros:/X/src/wdj/tests/macros -
> q --specfile --specedit edos-test.spec && /X/src/wdj/rpm --macros /X/
> src/wdj/macros:/X/src/wdj/tests/macros -bb --nodeps edos-test.spec)
> > /dev/null
> /usr/lib/rpm/check-files: line 11: cd: /X/src/wdj/tests/tmp//edos-
> test-root: No such file or directory
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^
> /X/src/wdj/rpm --macros /X/src/wdj/macros:/X/src/wdj/tests/macros -i
> --nosignature --nodeps probes-test-*.src.rpm
Hmm, in tests/edos-test.spec, there is no %install section,
and %buildroot is not created at all. Also, all %files sections
are empty there.
And so, there is simply no buildroot.
Here is how check-files changed:
-RPM_BUILD_ROOT=`echo $1 | sed 's://*:/:g'`
-
-if [ ! -d "$RPM_BUILD_ROOT" ] ; then
- cat > /dev/null
+RPM_BUILD_ROOT=$1
+if ! cd "${RPM_BUILD_ROOT:?}"; then
+ cat >/dev/null
exit 1
Old behaviour was: test for buildroot or exit 1.
New behaviour: cd to buildroot, or fail noisily and exit 1.
Let me think!
- application/pgp-signature attachment: stored
Received on Mon Jul 7 09:36:20 2008