Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variety of improvements #20

Merged
merged 22 commits into from
Feb 11, 2015
Merged

Variety of improvements #20

merged 22 commits into from
Feb 11, 2015

Conversation

brson
Copy link
Contributor

@brson brson commented Feb 11, 2015

Highlights:

  • Installation components are each stored in their own directory, which simplifies tools that want to pick the installer apart again, and eventually will allow components to include the same file.
  • Installs an uninstall.sh script.
  • Adds a --components flag for selecting which components to install/uninstall, as well as a --list-components flag.
  • Reduces output spew to a few lines unless --verbose is provided.
  • Don't pass -f where it isn't needed.
  • Consistently overwrite existing files while creating backups.
  • Reorders some operations to improve failure recovery.
  • Adds a log of actions taken during installation for troubleshooting.

Output of installing rust currently looks like

install: creating uninstall script at /home/brian/.multirust/toolchains/rust-packaging/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rust-docs'

    Rust is ready to roll

Closes #15, #13, #12, #9, #8, #6, #5

…lled-prefix

Required to distingish component files from other files in future commits.
Current design isn't right - needs to be per-component. Questionable feature.
This was introduced by earlier destdir fixes, and was due to
extra slashes being prepended to paths in non-destdir cases.
It's possible for multiple components to contain the same file. Keeping
the components separate is more convenient for other purposes.
It only takes a dir copy now to merge in components.
By marking the component installed before installing, an uninstall
should succeed at rolling back a partially-successful install.

Similar rationale for setting the installer version number before
installing.
@rust-highfive
Copy link

@brson: no appropriate reviewer found, use r? to override

@brson
Copy link
Contributor Author

brson commented Feb 11, 2015

The one thing I wanted but decided not to add because of complexity is 'negative component deps', which would allow multirust to uninstall existing rust's without causing havok.

alexcrichton added a commit that referenced this pull request Feb 11, 2015
Variety of improvements
@alexcrichton alexcrichton merged commit 6963192 into rust-lang:master Feb 11, 2015
@alexcrichton
Copy link
Member

👾

@brson
Copy link
Contributor Author

brson commented Feb 11, 2015

@alexcrichton For the record, no. The installer normally uninstalls everything it's previously installed before upgrading. The backups only happen in exceptional circumstances when some other agent has put files in our way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install.sh verify-install step does not honor ${CFG_DESTDIR}
3 participants