[Libreoffice-commits] core.git: solenv/gbuild
Tor Lillqvist
tml at collabora.com
Tue Nov 25 01:14:23 PST 2014
solenv/gbuild/UnpackedTarball.mk | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit a9a81a23009b2fc9b1552f367cb04996a99bf704
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Nov 25 10:50:47 2014 +0200
Add comment about a bug but how this stuff still works by luck
The 'suffix' GNU Make function returns the file name suffix including
the period. The test comparing to the string 'zip' will thus never
match, and gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT will not be
used, but gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT. But as most
of the Zip archives we unpack do have a top-level with a single
directory anyway, that we want to "strip", that works out
fine. Apparently those that don't have a such directory level pass a 0
as second argument to gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT
which has the effect of avoiding the "stripping".
Not sure what to actually do here, so I just commented the
situation... Should the code be fixed to do what it thinks it is
doing, but then to keep things working as before, should
gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT be changed to 1?
Change-Id: I6436865dafe47e21e1365a602889cedab3c09784
diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk
index da2e967..b9070b5 100644
--- a/solenv/gbuild/UnpackedTarball.mk
+++ b/solenv/gbuild/UnpackedTarball.mk
@@ -16,9 +16,17 @@
# NOTE: only for commands; targets should use TARFILE_LOCATION directly
gb_UnpackedTarget_STRIP_COMPONENTS_TAR_DEFAULT := 1
+
+# Note that because of a bug in
+# gb_UnpackedTarget__get_strip_components, this _ZIP_DEFAULT is
+# actually not used, but the above _TAR_DEFAULT is used for .zip
+# archives, too.
gb_UnpackedTarget_STRIP_COMPONENTS_ZIP_DEFAULT := 0
# gb_UnpackedTarget__get_strip_components target strip-components?
+# Note: the suiffix function returns also the period, like ".zip",
+# so the condition below is never true. I don't dare fix this as this
+# stuff seems to work anyway by accident...
define gb_UnpackedTarget__get_strip_components
$(strip $(if $(2),\
$(2),\
More information about the Libreoffice-commits
mailing list