Message ID | 20171129171100.6654-1-vishal.l.verma@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4db2ec8d8dde |
Headers | show |
On Wed, Nov 29, 2017 at 9:11 AM, Vishal Verma <vishal.l.verma@intel.com> wrote: > The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/* > directories are present. In case they weren't, git-archive would fail > with something like: > > /root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such file or directory > > Add a check to make sure they are present, and exit out with a relevant > message. > > Cc: Dan Williams <dan.j.williams@intel.com> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Looks good, applied.
diff --git a/rpmbuild.sh b/rpmbuild.sh index 4535b46..fe4154b 100755 --- a/rpmbuild.sh +++ b/rpmbuild.sh @@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +[ ! -d ~/rpmbuild/SOURCES ] && echo "rpmdev tree not found" && exit 1 ./make-git-snapshot.sh popd > /dev/null rpmbuild -ba $(dirname $0)/rhel/ndctl.spec
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/* directories are present. In case they weren't, git-archive would fail with something like: /root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such file or directory Add a check to make sure they are present, and exit out with a relevant message. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)