[opensuse-packaging] how to I cd to correct location after /bin/tar -xf -

Hello How this error be fixed [1] ? Spec file at [2] Full Log at [3] It needs to cd to the correct location #cd CodeAnalyst-2_13_2_0156-Public instead of #cd: CodeAnalyst-2_13_2_0156-Public.tar.gz: No such file or directory Thanks Glenn [1] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.h2OzIK + umask 022 + cd /usr/src/packages/BUILD + cd /usr/src/packages/BUILD + rm -rf CodeAnalyst-2_13_2_0156-Public.tar.gz + /usr/bin/gzip -dc /usr/src/packages/SOURCES/CodeAnalyst-2_13_2_0156-Public.tar.gz + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd CodeAnalyst-2_13_2_0156-Public.tar.gz /var/tmp/rpm-tmp.h2OzIK: line 32: cd: CodeAnalyst-2_13_2_0156-Public.tar.gz: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.h2OzIK (%prep) [2] spec file https://build.opensuse.org/package/view_file?file=CA-test.spec&package=CA-te... [3] log https://build.opensuse.org/package/live_build_log?arch=x86_64&package=CA-tes... [4] content of CodeAnalyst-2_13_2_0156-Public/ # ls CodeAnalyst-2_13_2_0156-Public AUTHORS COPYING INSTALL Makefile.am README autogen.sh careport.sh debian m4 mkNda.sh samples CAInstaller.sh ChangeLog INSTALLATION NEWS RELEASENOTES ca_manual_install.sh configure.in doc mkInternal.sh mkPublic.sh src -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Wed, 2011-05-04 at 15:03 +1000, doiggl@velocitynet.com.au wrote:
It needs to cd to the correct location #cd CodeAnalyst-2_13_2_0156-Public instead of #cd: CodeAnalyst-2_13_2_0156-Public.tar.gz: No such file or directory Thanks Glenn
Hi, You wrongly use the %setup macro. %setup alone, without parameter, will unpack your tarball, and go to the folder called %{name}-%{version} In your case that does not do the right thin, is it will miss the -Public behind, so simply use: %setup -n %{name}-%{version}-Public (-n does not refer to the tarball, but to the folder to chdir too). Hth, Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Dimstar / Dominique Leuenberger
-
doiggl@velocitynet.com.au