Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910381 - app-emacs/magit-3.3.0: remove app-emacs/libegit from RDEPEND
Summary: app-emacs/magit-3.3.0: remove app-emacs/libegit from RDEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-15 05:31 UTC by John Turner
Modified: 2023-07-20 16:22 UTC (History)
1 user (show)

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


Attachments
emerge --info output (emerge-info.txt,6.39 KB, text/plain)
2023-07-15 05:31 UTC, John Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Turner 2023-07-15 05:31:45 UTC
Created attachment 865512 [details]
emerge --info output

magit-3.3.0 doesn't actually depend on libegit, it will not fail or lose any functionality if it's not available.

In this version of magit, the behavior when loaded is to attempt to load ligegit if it's available, when it's not available it doesn't try to load libegit and continues as normal.

Along with the dependency not being required for the package to function, for certain configurations of emacs, magit will call a function in libegit that prompts the user to build it on each start. 

In more recent versions of magit, the default behavior is to *not* attempt to load ligegit at all, regardless of whether it's available.

The commit linked below contains a little bit more information about the current situation and corroborates the information reported in this bug.

https://github.com/magit/magit/commit/451cbe5c24f2af7ed505f1422af6ad4e8f05205b
Comment 1 John Turner 2023-07-15 05:35:03 UTC
The dependency is actually app-emacs/libegit2, and app-emacs/libegit isn't in ::gentoo (or anywhere?).
Comment 2 Maciej Barć gentoo-dev 2023-07-15 10:29:47 UTC
(In reply to John Turner from comment #1)
> The dependency is actually app-emacs/libegit2, and app-emacs/libegit isn't
> in ::gentoo (or anywhere?).

In the source code they pull in libedit2.
... but they also check for libgit.

John, have you tried running magit w/o libegit2 and performing some repository maintenance (commit, rebase, tag, pull, push, etc.)?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-15 10:30:35 UTC
https://github.com/magit/magit/commit/451cbe5c24f2af7ed505f1422af6ad4e8f05205b implies that it doesn't sue libgit at all though?
Comment 4 Maciej Barć gentoo-dev 2023-07-15 10:34:24 UTC
(In reply to Sam James from comment #3)
> https://github.com/magit/magit/commit/
> 451cbe5c24f2af7ed505f1422af6ad4e8f05205b implies that it doesn't sue libgit
> at all though?

Oh, yea, did not notice that.

So looks like now magit can now:
1. run bare git
2. use libegit2 lib
3. not actually use libgit but might in the future.
Comment 5 Larry the Git Cow gentoo-dev 2023-07-15 14:39:43 UTC
The bug has been closed via the following commit(s):

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

commit dc03c98faaa80c670c878830b161aac92cdb162a
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2023-07-15 11:48:57 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2023-07-15 14:39:31 +0000

    app-emacs/magit: drop libegit2 dependency
    
    Closes: https://bugs.gentoo.org/910381
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-emacs/magit/magit-3.3.0-r1.ebuild | 54 +++++++++++++++++++++++++++++++++++
 app-emacs/magit/magit-3.3.0.ebuild    | 33 ---------------------
 app-emacs/magit/magit-9999.ebuild     |  9 +++++-
 3 files changed, 62 insertions(+), 34 deletions(-)
Comment 6 Maciej Barć gentoo-dev 2023-07-15 18:31:08 UTC
(In reply to Maciej Barć from comment #4)
> (In reply to Sam James from comment #3)
> > https://github.com/magit/magit/commit/
> > 451cbe5c24f2af7ed505f1422af6ad4e8f05205b implies that it doesn't sue libgit
> > at all though?
> 
> Oh, yea, did not notice that.
> 
> So looks like now magit can now:
> 1. run bare git
> 2. use libegit2 lib
> 3. not actually use libgit but might in the future.

I was wrong libegit2 (elisp native module) provides libgit (lisp library).
Comment 7 Larry the Git Cow gentoo-dev 2023-07-15 18:40:03 UTC
The bug has been referenced in the following commit(s):

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

commit f2e7a10d5a9bc99c0a67d5878be4ecf4a13bd0a2
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2023-07-15 18:35:22 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2023-07-15 18:40:00 +0000

    app-emacs/magit: nonfatal if failing to load libgit
    
    Bug: https://bugs.gentoo.org/910381
    Closes: https://bugs.gentoo.org/910402
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-emacs/magit/files/magit-3.3.0-magit-libgit.patch | 11 +++++++++++
 app-emacs/magit/magit-3.3.0-r1.ebuild                |  2 ++
 app-emacs/magit/magit-9999.ebuild                    |  2 ++
 3 files changed, 15 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2023-07-16 05:35:39 UTC
The bug has been referenced in the following commit(s):

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

commit f0855a8be53e52bb54c4652d8f0ac9840cb9434a
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-07-16 05:26:36 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-07-16 05:34:25 +0000

    app-emacs/magit: New flag "libgit"
    
    Make libegit2 dependency and installation of magit-libgit
    use-conditional on it.
    
    Bug: https://bugs.gentoo.org/910381
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/magit/files/magit-3.3.0-magit-libgit.patch          | 11 -----------
 .../magit/{magit-3.3.0-r1.ebuild => magit-3.3.0-r2.ebuild}    |  6 +++---
 app-emacs/magit/magit-9999.ebuild                             |  5 ++---
 app-emacs/magit/metadata.xml                                  |  3 +++
 4 files changed, 8 insertions(+), 17 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=756af0d0f6368c1dadfb42dc7b9612a718f923f3

commit 756af0d0f6368c1dadfb42dc7b9612a718f923f3
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-07-16 05:16:50 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-07-16 05:34:24 +0000

    app-emacs/magit: Restore stable 3.3.0, drop -r1 to unstable
    
    Fix assignment of S.
    
    This partially reverts dc03c98faaa80c670c878830b161aac92cdb162a
    
    Bug: https://bugs.gentoo.org/910381
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/magit/magit-3.3.0-r1.ebuild |  4 ++--
 app-emacs/magit/magit-3.3.0.ebuild    | 33 +++++++++++++++++++++++++++++++++
 app-emacs/magit/magit-9999.ebuild     |  2 +-
 3 files changed, 36 insertions(+), 3 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2023-07-16 05:46:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=389180e9c3d1adff23b8317701cca711f8690c3c

commit 389180e9c3d1adff23b8317701cca711f8690c3c
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-07-16 05:42:18 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-07-16 05:46:00 +0000

    app-emacs/magit: Enable libgit per IUSE default
    
    magit-inhibit-libgit is still nil in version 3.3.0. The default was
    changed in upstream commit
    https://github.com/magit/magit/commit/451cbe5c24f2af7ed505f1422af6ad4e8f05205b
    which is not in this release.
    
    Bug: https://bugs.gentoo.org/910381
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/magit/magit-3.3.0-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)