Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690996 - app-emacs/ledger-mode: New ebuild
Summary: app-emacs/ledger-mode: New ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 691004
  Show dependency tree
 
Reported: 2019-07-29 15:09 UTC by Thomas Schneider
Modified: 2019-08-11 08:53 UTC (History)
3 users (show)

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


Attachments
Git patch w/ ebuild and other files (file_690996.txt,3.44 KB, patch)
2019-07-29 15:09 UTC, Thomas Schneider
Details | Diff
Git patch w/ ebuild and other files (file_690996.txt,3.44 KB, patch)
2019-07-29 15:23 UTC, Thomas Schneider
Details | Diff
Git patch w/ ebuild and other files (file_690996.txt,3.43 KB, patch)
2019-07-29 16:11 UTC, Thomas Schneider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schneider 2019-07-29 15:09:40 UTC
Created attachment 584982 [details, diff]
Git patch w/ ebuild and other files

The Emacs mode has been split from the main package (app-office/ledger) by upstream, see comments in bug #690190.

This introduces app-emacs/ledger-mode, containing said split package.
Comment 1 Thomas Schneider 2019-07-29 15:23:02 UTC
Created attachment 584986 [details, diff]
Git patch w/ ebuild and other files
Comment 2 Ulrich Müller gentoo-dev 2019-07-29 15:48:05 UTC
The ebuild and the site file look quite good. (But I haven't done any runtime testing yet.)

Some nitpicks:

+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit elisp
+
+DESCRIPTION="An Emacs major mode for editing ledger files"
+HOMEPAGE="https://github.com/ledger/ledger-mode"
+SRC_URI="https://github.com/ledger/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"

AFAICS, this should be "GPL-2+ BSD" (BSD for the texinfo documentation).

+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+SITEFILE="50${PN}-gentoo.el"
+ELISP_TEXINFO="doc/*.texi"

Maybe install the README file too: DOCS="README.md"

+BYTECOMPFLAGS="${BYTECOMPFLAGS} -l ledger-regex.el"

This could be shortened by using the += operator.

+
+DEPEND="${DEPEND} sys-apps/texinfo"

Should be BDEPEND in EAPI 7. Also, dependencies are accumulated automatically between eclasses, so appending is not necessary here.
Comment 3 Thomas Schneider 2019-07-29 16:10:28 UTC
(In reply to Ulrich Müller from comment #2)
> Some nitpicks:
>
> +LICENSE="GPL-2"
> 
> AFAICS, this should be "GPL-2+ BSD" (BSD for the texinfo documentation).

Oops, missed that, I’ve only looked at LICENSE.md

> +ELISP_TEXINFO="doc/*.texi"
> 
> Maybe install the README file too: DOCS="README.md"

I don’t find it very interesting, but it shouldn’t really hurt.

> +BYTECOMPFLAGS="${BYTECOMPFLAGS} -l ledger-regex.el"
> 
> This could be shortened by using the += operator.

TIL.

> +DEPEND="${DEPEND} sys-apps/texinfo"
> 
> Should be BDEPEND in EAPI 7. Also, dependencies are accumulated
> automatically between eclasses, so appending is not necessary here.

TIL, again.
Comment 4 Thomas Schneider 2019-07-29 16:11:02 UTC
Created attachment 584990 [details, diff]
Git patch w/ ebuild and other files
Comment 5 Ulrich Müller gentoo-dev 2019-08-04 14:16:41 UTC
(In reply to Thomas Schneider from comment #3)
> (In reply to Ulrich Müller from comment #2)
> > Maybe install the README file too: DOCS="README.md"
> 
> I don’t find it very interesting, but it shouldn’t really hurt.

I take that back. README.md is in the upstream git repo, but not in the distributed tarball.
Comment 6 Larry the Git Cow gentoo-dev 2019-08-04 14:18:05 UTC
The bug has been closed via the following commit(s):

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

commit df3d4c4420226ba1d512dbc567e5034909256949
Author:     Thomas Schneider <qsx@qsx.re>
AuthorDate: 2019-07-29 14:58:09 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2019-08-04 14:17:20 +0000

    app-emacs/ledger-mode: New ebuild
    
    Closes: https://bugs.gentoo.org/690996
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Thomas Schneider <qsx@qsx.re>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/ledger-mode/Manifest                      |  1 +
 app-emacs/ledger-mode/files/50ledger-mode-gentoo.el | 10 ++++++++++
 app-emacs/ledger-mode/ledger-mode-3.1.1.ebuild      | 20 ++++++++++++++++++++
 app-emacs/ledger-mode/metadata.xml                  | 12 ++++++++++++
 4 files changed, 43 insertions(+)
Comment 7 Ulrich Müller gentoo-dev 2019-08-04 14:21:48 UTC
Merged with two small changes:
- Added missing space in BYTECOMPFLAGS.
- Dropped DOCS (see comment #5).

I have also dropped keywords to those of app-office/ledger, where this has been split off. (And yes, our policy isn't entirely consistent there.)
Comment 8 Ulrich Müller gentoo-dev 2019-08-04 14:32:21 UTC
app-emacs/ledger-mode-3.1.1 added to stabilisation list:
https://wiki.gentoo.org/wiki/Project:Emacs/Stabilisations#New_stabilisations
Are the regular 30 days in ~arch o.k.? We could speed it up if there's a good reason.

Also, I presume that you're more familiar with this package than I. So, could I ask you to provide a short test plan for arch teams? Like the examples here:
https://wiki.gentoo.org/wiki/Project:Emacs/Test_plans
Comment 9 David Fellows 2019-08-11 00:12:48 UTC
Not sure if I should report this here or open a new bug, but here is easier for me.

I copied this package to my personal overlay and also copied app-office/ledger to my overlay and applied the patch referenced in bug 691004. 

I currently have ledger-3.1.1-r2[emacs] installed.

I tried emerge -uv ledger and it failed.

The emerge order was ledger-mode followed by ledger.

ledger-mode failed  to install due to file conflicts with the installed lisp files.


My fix was to add the line

DEPEND="!<app-office/ledger-3.1.2[emacs]"

to ledger-mode-3.1.1.ebuild

This forced portage to emerge ledger first and get rid of the conflicting files.
Comment 10 Ulrich Müller gentoo-dev 2019-08-11 07:21:22 UTC
(In reply to David Fellows from comment #9)
> ledger-mode failed  to install due to file conflicts with the installed lisp
> files.

Unfortunately, I cannot reproduce, because ledger-3.1.1-r2 fails to build for me. According to the Emacs site-init file (50ledger-gentoo.el), app-office/ledger should install its Elisp files in /usr/share/emacs/site-lisp/ledger/ while app-emacs/ledger-mode installs them in /usr/share/emacs/site-lisp/ledger-mode/. So there shouldn't be any conflicts (?).

> My fix was to add the line
> 
> DEPEND="!<app-office/ledger-3.1.2[emacs]"
> 
> to ledger-mode-3.1.1.ebuild
> 
> This forced portage to emerge ledger first and get rid of the conflicting
> files.

Which files exactly are in conflict? Please attach your build.log (or paste the relevant part).
Comment 11 Ulrich Müller gentoo-dev 2019-08-11 08:50:26 UTC
Never mind, I see that ledger-3.1.1-r2 installs into /usr/share/emacs/site-lisp/ledger-mode/ (and the path in its site-init file is wrong). So, I am going to add the blocker to app-emacs/ledger-mode.
Comment 12 Larry the Git Cow gentoo-dev 2019-08-11 08:53:04 UTC
The bug has been referenced in the following commit(s):

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

commit d7fdb4e83347351d69e3afef8eaec82be2b736fc
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2019-08-11 08:52:13 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2019-08-11 08:52:54 +0000

    app-emacs/ledger-mode: Block against old versions of app-office/ledger.
    
    Avoiding a file collision in /usr/share/emacs/site-lisp/ledger-mode/.
    
    Bug: https://bugs.gentoo.org/690996#c9
    Package-Manager: Portage-2.3.71, Repoman-2.3.17
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/ledger-mode/ledger-mode-3.1.1.ebuild | 1 +
 1 file changed, 1 insertion(+)