Skip to contentSkip to conversation

rpmbuild: check for rpmbuild working directories

PATCH In review Vishal Verma 2 participants 2 messages Nov 29, 2017 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Vishal Verma

author maintainer
#0 lore raw

PATCH v2 1/1 rpmbuild: check for rpmbuild working directories

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.

---
 rpmbuild.sh | 1 +
 1 file changed, 1 insertion(+)
rpmbuild.sh +1 -0
index 4535b46..fe4154b 100755
@@ -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
Signature · 6 lines
2.14.3

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
#1 lore raw
Quoted 11 lines · Vishal Verma

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.

Looks good, applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm