Red Hat Bugzilla – Bug 328641
rpmrebuild --help displays full path, instead of basename
Last modified: 2008-04-04 12:33:51 EDT
Description of problem:
rpmrebuild --help shows full path name in help info, instead of just basename
Version-Release number of selected component (if applicable):
How reproducible: every time
Steps to Reproduce:
1. rpmrebuild --help
/usr/lib/rpmrebuild/rpmrebuild.sh is a tool to rebuild an rpm file from the rpm
Usage: /usr/lib/rpmrebuild/rpmrebuild.sh [options] package
rpmrebuild is a tool to rebuild an rpm file from the rpm database
Usage: rpmrebuild [options] package
This is more than likely the result of using $0 ....
[smilner@arc ~]$ cat test.sh
[smilner@arc ~]$ sh test.sh
[smilner@arc ~]$ sh ./././test.sh
[smilner@arc ~]$ cat test2.sh
echo `basename $0`
[smilner@arc ~]$ sh ./././test2.sh
[smilner@arc ~]$ sh test2.sh
Anderson Silva wrote:
> > by the way:
> > I am sure you know this, but here:
> > basename $0
> > should fix the issue.
not exactly, because 'rpmrebuild' is in the path, and not 'rpmrebuild.sh'
So I will not use $0 any more : the problem is fixed in svn, and will be
integrated in next release.