summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@laptop.org>2008-12-19 12:56:49 -0500
committerDeepak Saxena <dsaxena@laptop.org>2008-12-19 10:41:06 -0800
commit7e2ccbbc5144106a12b5f635239f7f7fb9c6394a (patch)
treeec3a703cb733182f3ac10c6e3261560ac1423869
parent4cedc549f809a2ecc0f1849c477555858916ee7c (diff)
downloadlwn-8.2.1.tar.gz
lwn-8.2.1.zip
Do not build RPM if changes are not commited8.2.1
This is a safety precaution to ensure that two RPMS with the same commit hash are not built out of differing source trees. All changes must be commited, creating a new commit ID, or discarded before an RPM can be built. Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
-rw-r--r--olpc/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/olpc/Makefile b/olpc/Makefile
index 55991eacfcd3..c1a7751598a9 100644
--- a/olpc/Makefile
+++ b/olpc/Makefile
@@ -49,7 +49,13 @@ $(RPMCONFIGFILE) : $(CONFIG_SRC)
# Create a tarball out of the gittree
#
$(TARBALL):
- make distclean; \
+ @make distclean; \
+ git-status | grep --quiet modified || git-status | grep --quiet Untracked; \
+ if [ $$? -eq 0 ]; then \
+ echo "*** TREE IS NOT CLEAN. PLEASE COMMMIT CHANGES FIRST ***"; \
+ git-status; \
+ exit -1;\
+ fi; \
mkdir -p $(SOURCESDIR); \
cd $(SOURCESDIR); \
ln -s $(srctree) $(KERNELDIR); \