Description of problem:
If you invoke rpmdev-extract on multiple rpms with only a relative path, then it will extract the first and then fail to find the rest.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rpmdev-extract [multiple relative rpms]
$ ls -s1 rpm*.rpm
$ rpmdev-extract -q rpm*.rpm
Error: file does not exist: 'rpmdevtools-8.1-1.fc15.noarch.rpm'
All rpms extracted, as it works with full paths, e.g.
$ rpmdev-extract -q $PWD/rpm*.rpm"
I believe the issue is simply that the original working directory is lost when unarch() opens an rpm. The chain of "cd" in that case is:
cd "$2" # the output dir ($PWD or -Cdir)
cd "$name" # the rpm package's name
cd .. # back to the base output dir
cd - >/dev/null 2>&1 # back to $OLDPWD, which is $name !
There are number of ways to solve this. You could normalize all the rpm paths ahead of time, so they're always found, but I think that's not quite enough to get the output in the right place too. You could explicitly remember and restore the starting path rather than relying on "cd -". Or you could invoke that function in a () subshell so the main working directory is not affected, e.g. (unarch "$file" "$dir")
Thanks for the report. I chose the prenormalization approach "upstream":
rpmdevtools-8.2-1.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpmdevtools-8.2-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
rpmdevtools-8.2-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.