5

I have moreutils installed which provides /usr/bin/parallel, which is not useful for me. If I now want to install the parallel package (GNU Parallel) I have learnt from this answer that it would rename the existing /usr/bin/parallel of moreutils to /usr/bin/parallel.moreutils.

I was wondering what would happen if the opposite is done. For example, I have the parallel package installed and later on someone uninstalls moreutils and then reinstalls it again, will it rename /usr/bin/parallel to /usr/bin/parallel.gnu or what name would it get?

And if it does the renaming, how to avoid that?

My current Ubuntu version is:

$ lsb_release -a
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 18.04.3 
LTS Release: 18.04 
Codename: bionic

I also use Ubuntu 16.04 on other machines.

dessert
  • 39,392
  • 12
  • 115
  • 163
Rakib Fiha
  • 266
  • 1
  • 11
  • 1
    I *think* the answer is no, it does not rename GNU `parallels` to `parallels.gnu` because the renaming is done by the `parallel` package itself, using the `dpkg-divert` mechanism. There's a long thread involving the `moreutils` maintainer here: [parallel: /usr/bin/parallel conflicts with moreutils' parallel](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749355) – steeldriver Nov 25 '19 at 19:29
  • 1
    Just tried you are right. It does not change `parallel` to another name. – Rakib Fiha Nov 26 '19 at 01:42

1 Answers1

2

Ubuntu 18.04 and later

If you install any one of the packages, it will provide /usr/bin/parallel. If you install both in any order, you will get

  • /usr/bin/parallel with GNU Parallel
  • /usr/bin/parallel.moreutils with moreutilsparallel

See: How can I install GNU Parallel alongside Moreutils on Ubuntu/Debian?

Ubuntu 16.04

It will not be automatically renamed. I can’t test it, but my guess is that either will the parallel package be removed or – worse – the file will be overwritten.

A workaround to prevent the moreutils package from being accidentally removed or installed is a hold:

hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.

sudo apt-mark hold moreutils

This will prevent any automatic installation, however it can easily be overridden with apt-get’s --ignore-hold flag.

A similar alternative (but maybe not so easy to override?) is pinning as explained in this answer to the relevant question How to forbid a specific package to be installed?.

dessert
  • 39,392
  • 12
  • 115
  • 163