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

Conversation

rkaippully
Copy link
Contributor

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Tested this by running the script against MX Linux 18.2 and Debian Stretch.

During testing I noticed that the dpkg-query check in apt_get_install_pkgs always assumes
that the packages are installed even when they aren't. This happens only on MX and not on
Debian and is probably a subtle behavior change between the /bin/sh versions in MX and Debian testing (I am not entirely sure though). This check was introduced in commit b46e5a7 a few days
back, reverting that to the previous version works fine in MX and Debian stretch. Please let me know if this is a problem, I'll try to find an alternative fix.

MX Linux is based on Debian stable, so it is trivial to add support
for it.

During testing I noticed that the dpkg-query check in
apt_get_install_pkgs always assumes the packages are installed even
when they aren't. This is probably a subtle behavior change between
the /bin/sh versions in MX and Debian testing (I am not entirely sure
though). This check was introduced in commit b46e5a7 a few days
back, reverting that to the previous version works fine in MX and
Debian stretch. Please let me know if this is a problem, I'll try to
find an alternative fix.
@rkaippully rkaippully changed the title Mx linux support MX linux support Apr 23, 2019
@@ -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.

@borsboom borsboom merged commit 83f9a61 into commercialhaskell:master May 2, 2019
@borsboom
Copy link
Contributor

borsboom commented May 2, 2019

Looks good, thanks!

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.

2 participants