Skip to content

Commit b6c9690

Browse files
committed
---
yaml --- r: 105189 b: refs/heads/snap-stage3 c: 92d0ec2 h: refs/heads/master i: 105187: f8b72d9 v: v3
1 parent de2370a commit b6c9690

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ce1e48a52be07f39291848aa17b8666b7165e804
4+
refs/heads/snap-stage3: 92d0ec2ec7d71c5e42f6a6682b081b8ef6212913
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/dist.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
199199
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
200200
dist-install-dir-$(1): PREPARE_CLEAN=true
201201
dist-install-dir-$(1): prepare-base-dir-$(1)
202+
# Write the install manifest, making sure the manifest contains itself
203+
$$(Q)touch $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest-$(1).in
202204
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find -type f | sed 's/^\.\///') \
203-
> tmp/manifest-$(1) # NB Use a tmp file so `find` doesn't *find the manifest*
204-
$$(Q)cp tmp/manifest-$(1) $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest
205+
> $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest-$(1).in
206+
# Add remaining non-installed files
205207
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
206208
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
207209
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)

branches/snap-stage3/mk/install.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
install: dist-install-dir-$(CFG_BUILD)
1313
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"
14+
# Remove tmp files while we can because they may have been created under sudo
15+
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD/
1416

1517
uninstall: dist-install-dir-$(CFG_BUILD)
1618
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"

branches/snap-stage3/src/etc/install.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,16 @@ validate_opt
229229

230230
# Sanity check: can we can write to the destination?
231231
umask 022 && mkdir -p "${CFG_LIBDIR}"
232-
need_ok "directory creation failed"
232+
need_ok "can't write to destination. consider `sudo`."
233233
touch "${CFG_LIBDIR}/rust-install-probe" 2> /dev/null
234234
if [ $? -ne 0 ]
235235
then
236-
err "can't write to destination. try again with 'sudo'."
236+
err "can't write to destination. consider `sudo`."
237237
fi
238238
rm "${CFG_LIBDIR}/rust-install-probe"
239239
need_ok "failed to remove install probe"
240240

241+
# The file name of the manifest we're going to create during install
241242
INSTALLED_MANIFEST="${CFG_LIBDIR}/rustlib/manifest"
242243

243244
# First, uninstall from the installation prefix.
@@ -267,6 +268,7 @@ then
267268
warn "failed to remove rustlib"
268269
fi
269270
else
271+
# There's no manifest. If we were asked to uninstall, then that's a problem.
270272
if [ -n "${CFG_UNINSTALL}" ]
271273
then
272274
err "unable to find installation manifest at ${CFG_LIBDIR}/rustlib"
@@ -304,7 +306,7 @@ while read p; do
304306
FILE_INSTALL_PATH="${CFG_MANDIR}/$pp"
305307
fi
306308

307-
# Make sure ther's a directory for it
309+
# Make sure there's a directory for it
308310
umask 022 && mkdir -p "$(dirname ${FILE_INSTALL_PATH})"
309311
need_ok "directory creation failed"
310312

@@ -330,7 +332,7 @@ while read p; do
330332
need_ok "failed to update manifest"
331333

332334
# The manifest lists all files to install
333-
done < "${CFG_SRC_DIR}/lib/rustlib/manifest"
335+
done < "${CFG_SRC_DIR}/lib/rustlib/manifest.in"
334336

335337
echo
336338
echo " Rust is ready to roll."

0 commit comments

Comments
 (0)