Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941780 - net-misc/unison-2.53.5-r1 does not start GUI version anymore
Summary: net-misc/unison-2.53.5-r1 does not start GUI version anymore
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-18 18:09 UTC by Klaus Ethgen
Modified: 2024-11-02 09:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Ethgen 2024-10-18 18:09:36 UTC
Today I updated from net-misc/unison-2.53.3-r1 to net-misc/unison-2.53.5-r1 and unison, the eselect target, does not start graphical version anymore. I have to use unison-gui-2.53 (the full string).

Reproducible: Always

Steps to Reproduce:
1. run unison
Actual Results:  
It starts in text mode only

Expected Results:  
starting in GUI mode when DISPLAY is set
Comment 1 Maciej Barć gentoo-dev 2024-10-18 18:23:31 UTC
This is "intended" - what I mena by this is that unison GUI should be started via the desktop file it installs.

Currently the unison eselect tool does not create a symlink for unison's GUI.

> Expected Results:  
> starting in GUI mode when DISPLAY is set

I think that's because this Unison version just does not work this way anymore...? Dunno.
Comment 2 Maciej Barć gentoo-dev 2024-10-18 18:25:01 UTC
> > Expected Results:  
> > starting in GUI mode when DISPLAY is set
> 
> I think that's because this Unison version just does not work this way
> anymore...? Dunno.

See also: https://bugs.gentoo.org/935398#c0
Comment 3 Klaus Ethgen 2024-10-18 18:38:54 UTC
Well, the problem is, there is no way to start a .desktop file. It is not in path and even if, there is nothing that handles desktop files.

For informations, I use fvwm and start every application via xterm.
Comment 4 Marty Eggers 2024-10-18 20:39:02 UTC
(In reply to Klaus Ethgen from comment #3)
> For informations, I use fvwm and start every application via xterm.

Same here, same problem.  Earlier versions made with the gui flag created a single version of unison which would start with the graphical interface by default but which could be told to start with the text interface at the command line.  It would also automatically start in text mode in the absence of a graphical environment.

In 2.53.5-r1 two versions are created:  unison and unison-gui.  The unison-gui version is all I need and I prefer that it be called just, unison, as before.  This is now least because eselect doesn't seem to see unison-gui.  Rather than try to changed eselect-unison, I changed the 2.53.5-r1 ebuild, calling it 2.53.5-r2, with differences shown below:

diff -C 2 /usr/portage/net-misc/unison/unison-2.53.5-r1.ebuild /usr/local/portage/net-misc/unison/unison-2.53.5-r2.ebuild
*** /usr/portage/net-misc/unison/unison-2.53.5-r1.ebuild        2024-10-15 08:40:52.000000000 -0700
--- /usr/local/portage/net-misc/unison/unison-2.53.5-r2.ebuild  2024-10-17 21:18:03.256333199 -0700
***************
*** 102,106 ****
  
        if use gui ; then
!               bins+=( unison-gui )
        fi
  
--- 102,109 ----
  
        if use gui ; then
!               bins=(
!                       unison-gui
!                       unison-fsmonitor
!               )
        fi
  
***************
*** 108,112 ****
        for binname in "${bins[@]}" ; do
                exeinto /usr/bin
!               newexe "${binname}" "${binname}-${SLOT}"
        done
  
--- 111,115 ----
        for binname in "${bins[@]}" ; do
                exeinto /usr/bin
!               newexe "${binname}" "${binname/-gui/}-${SLOT}"
        done
  

Apologies if I'm not presenting this information in the preferred manner.  I have no experience writing ebuilds nor addressing bugs.  I'm sure there's a more elegant way to do this, but it got me what I wanted, which is

ls -l /usr/bin/unison*
lrwxrwxrwx 1 root root   11 Oct 17 22:39 /usr/bin/unison -> unison-2.53
-rwxr-xr-x 1 root root 6.3M Oct 17 22:39 /usr/bin/unison-2.53
lrwxrwxrwx 1 root root   21 Oct 17 22:39 /usr/bin/unison-fsmonitor -> unison-fsmonitor-2.53
-rwxr-xr-x 1 root root 1.3M Oct 17 22:39 /usr/bin/unison-fsmonitor-2.53

File /usr/bin/unison-2.53 is the same unison-gui-2.53.  It gives me a graphical interface when I call it from xterm.  I can explicitly make it run in text mode from the command line and it runs in text mode automatically if I'm not in a graphical environment, all the same as in earlier versions.  I hope this helps.
Comment 5 Marty Eggers 2024-10-18 20:41:05 UTC
(In reply to Marty Eggers from comment #4)
> This is now least because eselect doesn't seem to see
> unison-gui.  

This is NOT least because eselect doesn't seem to see unison-gui.  
Sorry for the typo.
Comment 6 Maciej Barć gentoo-dev 2024-10-18 20:48:57 UTC
(In reply to Marty Eggers from comment #4)
> *** 108,112 ****
>         for binname in "${bins[@]}" ; do
>                 exeinto /usr/bin
> !               newexe "${binname}" "${binname}-${SLOT}"
>         done
>   
> --- 111,115 ----
>         for binname in "${bins[@]}" ; do
>                 exeinto /usr/bin
> !               newexe "${binname}" "${binname/-gui/}-${SLOT}"
>         done

This helps a lot. So that happens here in fact is that the non-GUI version of unison is never installed ince it is "shadowed" over by unison-gui.
So, it means that we cna ignore "unison" binary and instead install "unison-gui".

Marty, have you tested synchronization and it works ok for you?
Comment 7 Marty Eggers 2024-10-18 21:09:00 UTC
(In reply to Maciej Barć from comment #6)
> Marty, have you tested synchronization and it works ok for you?

Since emerging 2.53.5-r2 on my desktop I've run unison to sync with a thumb drive and an external hard drive plugged in to it.  I also ran version 2.53.3-r1 from a laptop (as a client, I guess) over my home network and synced to my same desktop running 2.53.5-r2.  That's about all I do with unison, but yes, for me at least, everything has gone as expected.
Comment 8 Maciej Barć gentoo-dev 2024-10-18 21:10:06 UTC
(In reply to Marty Eggers from comment #7)
> (In reply to Maciej Barć from comment #6)
> > Marty, have you tested synchronization and it works ok for you?
> 
> Since emerging 2.53.5-r2 on my desktop I've run unison to sync with a thumb
> drive and an external hard drive plugged in to it.  I also ran version
> 2.53.3-r1 from a laptop (as a client, I guess) over my home network and
> synced to my same desktop running 2.53.5-r2.  That's about all I do with
> unison, but yes, for me at least, everything has gone as expected.

Thanks!
Comment 9 Larry the Git Cow gentoo-dev 2024-10-18 21:19:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ae024ce4a31cc63c0df3ba55e756129dc8d65d8

commit 3ae024ce4a31cc63c0df3ba55e756129dc8d65d8
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2024-10-18 21:11:59 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2024-10-18 21:19:24 +0000

    net-misc/unison: for USE=gui install unison-gui exe as unison
    
    Closes: https://bugs.gentoo.org/941780
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 .../unison/{unison-2.53.5-r1.ebuild => unison-2.53.5-r2.ebuild}    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 10 Robin Bankhead 2024-11-02 09:27:46 UTC
This change broke the .desktop file because it fails to revert the change made in #935398.