diff --git a/scripts/admin/build-package-tarballs.sh b/scripts/admin/build-package-tarballs.sh index 3a2b343a7f..0a912965f3 100755 --- a/scripts/admin/build-package-tarballs.sh +++ b/scripts/admin/build-package-tarballs.sh @@ -60,8 +60,10 @@ do # Create the tarball from the built package. In the tarball, the root # directory should be $ROOTDIR, so we replace the "." with that, using - # --transform (a GNU tar extension). - "$GNUTAR" czf "$TARBALL" -C "$PACKAGE/.build" --transform 's/^\./'"$ROOTDIR"'/' . + # --transform (a GNU tar extension). Leave out the buildinfo.json file, + # which contains local paths and is only used to decide if we should rebuild + # a package from its corresponding source tree. + "$GNUTAR" czf "$TARBALL" -C "$PACKAGE/.build" --exclude buildinfo.json --transform 's/^\./'"$ROOTDIR"'/' . # this is used in build-release.sh, which constructs the release json. echo -n " \"$PACKAGE\": \"$PACKAGE_VERSION\"" >> "$TOPDIR/.package_manifest_chunk" diff --git a/tools/packages.js b/tools/packages.js index a732487ea8..9ca418b082 100644 --- a/tools/packages.js +++ b/tools/packages.js @@ -1790,7 +1790,7 @@ _.extend(Package.prototype, { if (options.onlyIfUpToDate) { // Do we think we'll generate different contents than the tool that built // this package? - if (mainJson.buildVersion !== exports.BUILD_VERSION) + if (buildInfoJson.builtBy !== exports.BUILD_VERSION) return false; if (options.buildOfPath && @@ -1961,7 +1961,6 @@ _.extend(Package.prototype, { var mainJson = { format: "unipackage-pre1", - buildVersion: exports.BUILD_VERSION, summary: self.metadata.summary, internal: self.metadata.internal, slices: [], @@ -1971,6 +1970,7 @@ _.extend(Package.prototype, { }; var buildInfoJson = { + buildVersion: exports.BUILD_VERSION, dependencies: { files: {}, directories: {} }, source: options.buildOfPath || undefined };