unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* util-linux and perl rename
@ 2018-11-20 21:10 Thorsten Wilms
  2018-11-22 19:25 ` Danny Milosavljevic
  2018-11-26  5:12 ` Alex Vong
  0 siblings, 2 replies; 6+ messages in thread
From: Thorsten Wilms @ 2018-11-20 21:10 UTC (permalink / raw)
  To: Guix-devel

Hi Guix!

I already had a "rename" binary via util-linux. Then I installed the 
package "rename", resulting in another "rename" binary, as I prefer the 
Perl version. This was a success in that I got what I wanted.

However, should this name clash be considered a bug?
Is there a policy for such circumstances?
What happens that the newly installed "rename" gets precedence?

The best info I found on the rename vs rename issue in general:
https://unix.stackexchange.com/questions/275254/why-is-the-rename-utility-on-debian-ubuntu-different-than-the-one-on-other-distr


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: util-linux and perl rename
  2018-11-20 21:10 util-linux and perl rename Thorsten Wilms
@ 2018-11-22 19:25 ` Danny Milosavljevic
  2018-11-26  5:12 ` Alex Vong
  1 sibling, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2018-11-22 19:25 UTC (permalink / raw)
  To: Thorsten Wilms; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Hi,

On Tue, 20 Nov 2018 22:10:24 +0100
Thorsten Wilms <t_w_@freenet.de> wrote:

> I already had a "rename" binary via util-linux. Then I installed the 
> package "rename", resulting in another "rename" binary, as I prefer the 
> Perl version. This was a success in that I got what I wanted.
> 
> However, should this name clash be considered a bug?
> Is there a policy for such circumstances?
> What happens that the newly installed "rename" gets precedence?

That depends.  If you installed "util-linux" into your profile and also
"rename" into your profile, you should have gotten a collision warning.

(If we ever get these cleaned up then we should make the remaining ones
collision errors)

I've just tried it with guix master, I get no collision warning.  I think
that's a real bug.

(Didn't those work in the past? *scratches head*)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: util-linux and perl rename
  2018-11-20 21:10 util-linux and perl rename Thorsten Wilms
  2018-11-22 19:25 ` Danny Milosavljevic
@ 2018-11-26  5:12 ` Alex Vong
  2018-11-26  8:53   ` Thorsten Wilms
  2018-11-26  8:58   ` Mark H Weaver
  1 sibling, 2 replies; 6+ messages in thread
From: Alex Vong @ 2018-11-26  5:12 UTC (permalink / raw)
  To: Thorsten Wilms; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

Hi Thorsten,

Thorsten Wilms <t_w_@freenet.de> writes:

> Hi Guix!
>
> I already had a "rename" binary via util-linux. Then I installed the
> package "rename", resulting in another "rename" binary, as I prefer
> the Perl version. This was a success in that I got what I wanted.
>
> However, should this name clash be considered a bug?
> Is there a policy for such circumstances?
> What happens that the newly installed "rename" gets precedence?
>
I think it is chosen based on some random criterions (so the building of
profile is still deterministic). During installation, there should be a
warning showing there's a conflict, and which one is being chosen. So
you get the "right" one by luck.

> The best info I found on the rename vs rename issue in general:
> https://unix.stackexchange.com/questions/275254/why-is-the-rename-utility-on-debian-ubuntu-different-than-the-one-on-other-distr

To eliminate this conflict, I can think of 2 solutions:

  1. Use 2 separate profiles where one has util-linux installed and the
  other has rename installed.

  2. Install util-linux into the default profile, but invoke rename by
  "guix environment --ad-hoc rename -- rename ..." instead of
  "rename ..."

These 2 solutions work in general as well, such as for conflicting
library versions, conflicting language runtimes...

I prefer the 2nd solution since maintaining 2 separate profiles just for
using rename seems too "heavy weight" to me.

Cheers,
Alex

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: util-linux and perl rename
  2018-11-26  5:12 ` Alex Vong
@ 2018-11-26  8:53   ` Thorsten Wilms
  2018-11-26  8:58   ` Mark H Weaver
  1 sibling, 0 replies; 6+ messages in thread
From: Thorsten Wilms @ 2018-11-26  8:53 UTC (permalink / raw)
  To: Guix-devel

On 26/11/2018 06.12, Alex Vong wrote:
> To eliminate this conflict, I can think of 2 solutions:
> 
>    1. Use 2 separate profiles where one has util-linux installed and the
>    other has rename installed.
> 
>    2. Install util-linux into the default profile, but invoke rename by
>    "guix environment --ad-hoc rename -- rename ..." instead of
>    "rename ..."
> 
> These 2 solutions work in general as well, such as for conflicting
> library versions, conflicting language runtimes...
> 
> I prefer the 2nd solution since maintaining 2 separate profiles just for
> using rename seems too "heavy weight" to me.

Thanks for 2 solutions. Luckily, I don't need access to the util-linux 
rename. I have to note, that if I was working on scripts with the 
intention to share them with users of other distributions, the 2nd 
wouldn't be an option. Too bad we don't have command URIs :}

I would have been tempted to put a symlink in /usr/local/bin, but 
there's no "latest-of-package-foo" to link to, right?

Is there a way to get a list of all name clashes on the system?


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: util-linux and perl rename
  2018-11-26  5:12 ` Alex Vong
  2018-11-26  8:53   ` Thorsten Wilms
@ 2018-11-26  8:58   ` Mark H Weaver
  2018-11-26 13:02     ` Alex Vong
  1 sibling, 1 reply; 6+ messages in thread
From: Mark H Weaver @ 2018-11-26  8:58 UTC (permalink / raw)
  To: Alex Vong; +Cc: Guix-devel

Alex Vong <alexvong1995@gmail.com> writes:

> Thorsten Wilms <t_w_@freenet.de> writes:
>
>> I already had a "rename" binary via util-linux. Then I installed the
>> package "rename", resulting in another "rename" binary, as I prefer
>> the Perl version. This was a success in that I got what I wanted.
>>
>> However, should this name clash be considered a bug?
>> Is there a policy for such circumstances?
>> What happens that the newly installed "rename" gets precedence?
>>
> I think it is chosen based on some random criterions

It's not random, but rather a very simple criterion.  The packages
listed first in the package manifest take priority over ones that come
later.  If you don't use manifests, "guix package -i <pkg>" puts <pkg>
at the top of the new manifest, even if it was already present in the
previous manifest.

       Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: util-linux and perl rename
  2018-11-26  8:58   ` Mark H Weaver
@ 2018-11-26 13:02     ` Alex Vong
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Vong @ 2018-11-26 13:02 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

Mark H Weaver <mhw@netris.org> writes:

> Alex Vong <alexvong1995@gmail.com> writes:
>
>> Thorsten Wilms <t_w_@freenet.de> writes:
>>
>>> I already had a "rename" binary via util-linux. Then I installed the
>>> package "rename", resulting in another "rename" binary, as I prefer
>>> the Perl version. This was a success in that I got what I wanted.
>>>
>>> However, should this name clash be considered a bug?
>>> Is there a policy for such circumstances?
>>> What happens that the newly installed "rename" gets precedence?
>>>
>> I think it is chosen based on some random criterions
>
> It's not random, but rather a very simple criterion.  The packages
> listed first in the package manifest take priority over ones that come
> later.  If you don't use manifests, "guix package -i <pkg>" puts <pkg>
> at the top of the new manifest, even if it was already present in the
> previous manifest.
>
I see, so this explains how Thorsten managed to get the right rename
(not because of luck or magic...)

I personally had given up using the imprerative "install" interface and
switched using the declarative "manifest" interface. IMO, it makes it
clearer what I've installed and allows me quickly comment / un-comment
fail-to-build packages. With the imprerative interface, I've to remember
which fail-to-build packages I didn't upgrade last time.

So in fact we have a 3rd solution: to re-order the packages in your
manifest.

>        Mark

Cheers,
Alex

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-26 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 21:10 util-linux and perl rename Thorsten Wilms
2018-11-22 19:25 ` Danny Milosavljevic
2018-11-26  5:12 ` Alex Vong
2018-11-26  8:53   ` Thorsten Wilms
2018-11-26  8:58   ` Mark H Weaver
2018-11-26 13:02     ` Alex Vong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).