void-packages/srcpkgs/rustup/patches/dont-copy-rustup-bin.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

15 lines
598 B
Diff

Upstream: No, not upstreamable like this
Reason: We want the rustup binary in $CARGO_HOME/bin to be of the
same version as the one we distribute in this rustup package.
--- a/src/cli/self_update.rs 2019-05-27 16:17:21.432715136 +0200
+++ b/src/cli/self_update.rs 2019-05-27 16:18:56.537718683 +0200
@@ -619,8 +619,7 @@
if rustup_path.exists() {
utils::remove_file("rustup-bin", &rustup_path)?;
}
- utils::copy_file(&this_exe_path, &rustup_path)?;
- utils::make_executable(&rustup_path)?;
+ utils::symlink_file(&this_exe_path, &rustup_path)?;
install_proxies()
}