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

Update Debian package to "conflict" with cmdtest #5898

Merged
merged 1 commit into from May 28, 2018
Merged

Conversation

Daniel15
Copy link
Member

Summary

The cmdtest package also installs a yarn command, and people often get confused by this (see #2821). If we specify that the Yarn package conflicts with the cmdtest package, installing Yarn will automatically uninstall cmdtest.

Test plan

Will test the package built by CircleCI (since I don't have a functional dev environment right now).

The `cmdtest` package also installs a `yarn` command, and people often get confused by this (see #2821). If we specify that the Yarn package conflicts with the cmdtest package, installing Yarn will automatically uninstall cmdtest.
@Daniel15
Copy link
Member Author

So it looks like with this change, dpkg will throw an error if you try to install yarn when cmdtest is installed:

root@f64c87a6ad83:/tmp# dpkg -i yarn_1.8.0-0_all.deb
Selecting previously unselected package yarn.
dpkg: regarding yarn_1.8.0-0_all.deb containing yarn:
 yarn conflicts with cmdtest
  cmdtest (version 0.22-1) is present and installed.

dpkg: error processing archive yarn_1.8.0-0_all.deb (--install):
 conflicting packages - not installing yarn
Errors were encountered while processing:
 yarn_1.8.0-0_all.deb

I'll try to see if there's a way to automatically remove it.

@benjaoming
Copy link

I'll try to see if there's a way to automatically remove it.

Removing a package silently from the user's system? I think that's impossible but for good reasons :)

But certain interfaces will suggest it in a cleaner way IIRC. Try gdebi.

I think the above dpki error message sounds just fine, nothing to worry about.. people will just have to remove it, that's less confusing than to face a yarn command that isn't Yarn after having installed it.

@Daniel15
Copy link
Member Author

I think the above dpki error message sounds just fine, nothing to worry about.. people will just have to remove it, that's less confusing than to face a yarn command that isn't Yarn after having installed it.

That makes sense. I think I agree with you.

@benjaoming
Copy link

The lesser evil :)

@arcanis arcanis merged commit c640c45 into master May 28, 2018
@Daniel15 Daniel15 deleted the Daniel15-patch-2 branch September 30, 2018 03:58
@benjaoming
Copy link

This is a good intermediate solution - but I just found by reading the Debian ITP for yarnpkg that cmdtest is somewhat used.

The possibly best option would be to

  1. Rename the package to yarnpkg to prepare for the official Debian package by the same name.
  2. Rename the binary in the Debian package to yarnpkg and not have yarn at all in the main package.
  3. Add a new package yarnpkg-legacy, same as nodejs-legacy and include the yarn binary there.

That way, someone can install yarnpkg and invoke yarnpkg without all these silly collisions. Most people will want the yarn binary/shortcut and it's easy to create manually or through the yarnpkg-legacy package.

Please refer to the Debian ITP for yarnpkg before making comments on the proposal.. it is quite detailed.

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.

None yet

3 participants