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

MX linux support #4770

Merged
merged 5 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Behavior changes:

Other enhancements:

* Support MX Linux in get-stack.sh. Fixes
[#4769](https://github.com/commercialhaskell/stack/issues/4769).
* Defer loading up of files for local packages. This allows us to get
plan construction errors much faster, and avoid some unnecessary
work when only building a subset of packages. This is especially
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/get-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ GETDISTRO
ubuntu|linuxmint|elementary|neon)
do_ubuntu_install "$VERSION"
;;
debian|kali|raspbian)
debian|kali|raspbian|mx)
do_debian_install "$VERSION"
;;
fedora)
Expand Down Expand Up @@ -609,7 +609,7 @@ try_install_pkgs() {

# Install packages using apt-get
apt_get_install_pkgs() {
if ! dpkg-query -W "$@"|grep -v '^\S\+\s\+.\+$' > /dev/null; then
if dpkg-query -W "$@" > /dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason you changed this? I believe the reason for the grep was to make it detect if only some of the required packages are missing. That said, it could be more intelligent by only trying to install the actually missing dependencies (rather than all of them, even if only some are missing).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above. This is somehow broken in the version of /bin/sh that MX uses (which is based on Debian stable). I can try to figure out a better way to handle it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sorry I didn't read the description well enough. I'm OK with the revert, but how about adding a comment with what you reverted and why (and a link to this discussion) so that if we change it again we won't accidentally break MX.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment and verified this in both Debian and MX.

info "Already installed!"
elif ! sudocmd "install required system dependencies" apt-get install -y ${QUIET:+-qq} "$@"; then
die "Installing apt packages failed. Please run 'apt-get update' and try again."
Expand Down