Browse Source

HUE-565. Hue tarball contains duplicated js libraries

* The installation for core is special, in that the symlink targets are copied
  separately and are guaranteed to be there.
* And do not dereference symlinks when creating the tarball.
bc Wong 14 years ago
parent
commit
a03986ba9a
3 changed files with 8 additions and 4 deletions
  1. 3 2
      Makefile.sdk
  2. 1 1
      Makefile.tarball
  3. 4 1
      desktop/core/Makefile

+ 3 - 2
Makefile.sdk

@@ -54,6 +54,7 @@ APP_ROOT := $(realpath .)
 APP_NAME ?= $(SETUPTOOLS_NAME)
 APP_VERSION ?= $(shell $(ENV_PYTHON) setup.py --version)
 APP_FULL_NAME ?= $(APP_NAME)-$(APP_VERSION)
+RSYNC_OPT ?= --copy-unsafe-links -a
 
 
 BUILD_DIR := $(APP_ROOT)/build
@@ -203,7 +204,7 @@ sdist:
 	@rm -rf $(SDIST_DIR)
 	@mkdir -p $(SDIST_DIR)
 	@# Copy sources of our app
-	@rsync --copy-unsafe-links -a ./ $(SDIST_DIR)/ $(SDIST_EXCLUDES)
+	@rsync $(RSYNC_OPT) ./ $(SDIST_DIR)/ $(SDIST_EXCLUDES)
 	@$(MAKE) -C $(SDIST_DIR) clean
 	@# Also make a tarball
 	@tar -C $(SDIST_DIR)/.. -czf $(SDIST_TGZ) $(APP_FULL_NAME)
@@ -221,7 +222,7 @@ bdist: ext-eggs compile
 	@rm -rf $(BDIST_DIR)
 	@mkdir -p $(BDIST_DIR)
 	@# Copy built sources of our app
-	@rsync --copy-unsafe-links -a ./ $(BDIST_DIR)/ $(BDIST_EXCLUDES)
+	@rsync $(RSYNC_OPT) ./ $(BDIST_DIR)/ $(BDIST_EXCLUDES)
 	@# Copy thirdparty eggs into the ext-eggs dir
 	@mkdir -p $(BDIST_DIR)/ext-eggs
 	@if test -n '$(wildcard ext-py/*/dist)' ; then \

+ 1 - 1
Makefile.tarball

@@ -79,7 +79,7 @@ $(BLD_DIR_PROD): apps crepo docs
 	@echo "--- Preparing general distribution tree at $@"
 	@rm -rf $@
 	@mkdir -p $@
-	tar -h -cf - $(PROD_INCLUDES) | tar -C $(BLD_DIR_PROD) -xf -
+	tar -cf - $(PROD_INCLUDES) | tar -C $(BLD_DIR_PROD) -xf -
 
 	@echo "---- Removing exclusions"
 	@for i in $(PROD_EXCLUDES) ; do rm -rf $(BLD_DIR_PROD)/$$i ; done

+ 4 - 1
desktop/core/Makefile

@@ -20,6 +20,9 @@ ifeq ($(ROOT),)
   $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation")
 endif
 
+# The default RSYNC_OPT copies unsafe links. We don't want that because
+# the symlink targets are always installed (separately). See HUE-565.
+RSYNC_OPT := -a
 include $(ROOT)/Makefile.sdk
 
 default::
@@ -32,4 +35,4 @@ default::
 .PHONY: env-install
 env-install: compile ext-env-install
 	@echo '--- Installing $(APP_NAME) into virtual-env'
-	@$(ENV_PYTHON) setup.py develop -N -q
+	@$(ENV_PYTHON) setup.py develop -N -q