hrev46218 adds 1 changeset to branch 'master' old head: e2332987bce967387b49c5dce24867688a01317f new head: a427aa2f4a47ae242110e9d98d4bed307f8dad73 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=a427aa2+%5Ee233298 ---------------------------------------------------------------------------- a427aa2: Preserve resources and attributes when copying stripped binaries When asked to strip binaries when copying to containers we now strip to a temporary file, copy over resources to it, copy it to the container, then copy the attributes from the original source. This should allow stripping binaries while preserving attributes and resources even when copying to images. [ François Revol <revol@xxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev46218 Commit: a427aa2f4a47ae242110e9d98d4bed307f8dad73 URL: http://cgit.haiku-os.org/haiku/commit/?id=a427aa2 Author: François Revol <revol@xxxxxxx> Date: Sat Oct 12 00:37:20 2013 UTC ---------------------------------------------------------------------------- 2 files changed, 10 insertions(+), 3 deletions(-) build/jam/ImageRules | 12 +++++++++--- build/jam/images/FloppyBootImage | 1 + ---------------------------------------------------------------------------- diff --git a/build/jam/ImageRules b/build/jam/ImageRules index 91ca1e4..3ff1af8 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -800,11 +800,17 @@ actions AppendToContainerCopyFilesScriptStripFile >> $(2[1]) fi - echo \$cp "\"\${sPrefix}$(2[2])\"" \ + echo "stripped_file=\"\${tmpDir}/stripped_\$\$\"" >> $(2[1]) + + echo \$strip -o "\"\${stripped_file}\"" "\"\${sPrefix}$(2[2])\"" >> $(2[1]) + echo \$xres -o "\"\${stripped_file}\"" "\"\${sPrefix}$(2[2])\"" >> $(2[1]) + + echo \$cp "\"\${stripped_file}\"" \ + "\"\${tPrefix}$(TARGET_DIR)/$(INSTALL_TARGET_NAME)\"" >> $(2[1]) + echo \$copyattr "\"\${sPrefix}$(2[2])\"" \ "\"\${tPrefix}$(TARGET_DIR)/$(INSTALL_TARGET_NAME)\"" >> $(2[1]) - echo \$strip "\"\${tPrefix}$(TARGET_DIR)/$(INSTALL_TARGET_NAME)\"" \ - "2>/dev/null" "|| true" >> $(2[1]) + echo \$rm "\"\${stripped_file}\"" >> $(2[1]) } diff --git a/build/jam/images/FloppyBootImage b/build/jam/images/FloppyBootImage index 61c16ff..db79ea0 100644 --- a/build/jam/images/FloppyBootImage +++ b/build/jam/images/FloppyBootImage @@ -184,6 +184,7 @@ AddVariableToScript $(script) : addBuildCompatibilityLibDir : $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ; AddTargetVariableToScript $(script) : <build>copyattr ; AddTargetVariableToScript $(script) : $(HAIKU_STRIP_$(TARGET_ARCH)) : strip ; +AddTargetVariableToScript $(script) : <build>xres ; # create the other scripts local makeDirsScript = <FloppyBootArchive>haiku-floppyboot-make-dirs ;