lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5409] Don't assume 'md5sum' output is sorted


From: Greg Chicares
Subject: [lmi-commits] [5409] Don't assume 'md5sum' output is sorted
Date: Tue, 28 Feb 2012 10:50:37 +0000

Revision: 5409
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5409
Author:   chicares
Date:     2012-02-28 10:50:37 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Don't assume 'md5sum' output is sorted

Modified Paths:
--------------
    lmi/trunk/install_miscellanea.make

Modified: lmi/trunk/install_miscellanea.make
===================================================================
--- lmi/trunk/install_miscellanea.make  2012-02-28 09:54:14 UTC (rev 5408)
+++ lmi/trunk/install_miscellanea.make  2012-02-28 10:50:37 UTC (rev 5409)
@@ -92,6 +92,7 @@
 MV     := mv
 PATCH  := patch
 RM     := rm
+SORT   := sort
 TAR    := tar
 TOUCH  := touch
 WGET   := wget
@@ -134,7 +135,8 @@
 # For some targets,
 #  - fresh md5sums are generated, then
 #  - saved md5sums are checked, then
-#  - the fresh and saved md5sums are compared against each other.
+#  - the fresh and saved md5sums are compared against each other
+#    (after sorting, because 'md5sum' output order is unspecified).
 # This may seem redundant. The first step is not removed because it
 # makes both sets of md5sums available for comparison in case they
 # differ, and also because it guides regeneration of the saved md5sums
@@ -157,7 +159,9 @@
        $(MV) scratch/$(stem)/cgicc/*.cpp $(third_party_source_dir)/cgicc/
        cd $(destination) && $(MD5SUM) include/cgicc/* src/cgicc/* 
>$(stem).md5sums
        cd $(destination) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
-       $(DIFF) $(stem).md5sums $(destination)/$(stem).md5sums && $(RM) 
$(destination)/$(stem).md5sums
+       $(SORT) --key=2 --output=$(stem).X                $(stem).md5sums
+       $(SORT) --key=2 --output=$(stem).Y $(destination)/$(stem).md5sums
+       $(DIFF) --unified $(stem).X $(stem).Y && $(RM) 
$(destination)/$(stem).md5sums $(stem).X $(stem).Y
 
 # When the 'fop' tarball is extracted, this message:
 #   tar: A lone zero block at 20398
@@ -206,7 +210,9 @@
        $(MV) scratch/$(stem)/src/libxslt/* $(third_party_source_dir)/libxslt/
        cd $(destination) && $(MD5SUM) include/xmlwrapp/* include/xsltwrapp/* 
src/libxml/* src/libxslt/* >$(stem).md5sums
        cd $(destination) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
-       $(DIFF) $(stem).md5sums $(destination)/$(stem).md5sums && $(RM) 
$(destination)/$(stem).md5sums
+       $(SORT) --key=2 --output=$(stem).X                $(stem).md5sums
+       $(SORT) --key=2 --output=$(stem).Y $(destination)/$(stem).md5sums
+       $(DIFF) --unified $(stem).X $(stem).Y && $(RM) 
$(destination)/$(stem).md5sums $(stem).X $(stem).Y
 
 $(file_list): initial_setup
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]