Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554518 - app-emacs/emacs-common-gentoo-1.5 incompatible with portage-multilib, pkg_preinst() not idempotent
Summary: app-emacs/emacs-common-gentoo-1.5 incompatible with portage-multilib, pkg_pre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2015-07-11 14:12 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2015-07-11 20:14 UTC (History)
0 users

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


Attachments
emacs-common-gentoo-1.5-portage-multilib.patch (emacs-common-gentoo-1.5-portage-multilib.patch,1.13 KB, patch)
2015-07-11 14:12 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff
emerge--info.txt (emerge--info.txt,6.50 KB, text/plain)
2015-07-11 14:13 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
emacs-common-gentoo-1.5-portage-multilib-indented.patch (emacs-common-gentoo-1.5-portage-multilib-indented.patch,1.36 KB, patch)
2015-07-11 14:20 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff
emacs-common-gentoo-1.5.ebuild.diff (emacs-common-gentoo-1.5.ebuild.diff,878 bytes, patch)
2015-07-11 15:12 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2015-07-11 14:12:41 UTC
Created attachment 406528 [details, diff]
emacs-common-gentoo-1.5-portage-multilib.patch

I am using the portage-multilib fork of portage (#gentoo-multilib-overlay). To most compatibly support multiple ABIs with existing ebuilds in gentoo-x86, it runs many ebuild stages multiple times—once per ABI. This includes pkg_preinst(). The line which deletes `site-gentoo.el.orig` asserts that the file exists and fails if it doesn’t. Since `site-gentoo.el.orig` is not installed to an ABI-specific folder, this line fails when it is run for a second ABI, causing die() to be called:

    rm: cannot remove ‘/var/tmp/portage/app-emacs/emacs-common-gentoo-1.5/image//usr/share/emacs/site-lisp/site-gentoo.el.orig’: No such file or directory

Likewise to the mv line (for if `site-lisp` does not yet exist in ${EROOT}):

    mv: cannot stat ‘/var/tmp/portage/app-emacs/emacs-common-gentoo-1.5/image//usr/share/emacs/site-lisp/site-gentoo.el.orig’: No such file or directory

Please consider making the lines dealing with `site-gentoo.el.orig` idempotent. This logic only needs to be run if `site-gentoo.el` doesn’t yet exist in ${ED}. I have attached a patch which makes this change and makes emacs-common-gentoo work for me.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2015-07-11 14:13:35 UTC
Created attachment 406530 [details]
emerge--info.txt
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2015-07-11 14:20:02 UTC
Created attachment 406532 [details, diff]
emacs-common-gentoo-1.5-portage-multilib-indented.patch

Not sure what people prefer, but I realized the indentation changes were lost because I had followd some guide which told me to put “diff -u -b -B” into my ~/.cvsrc a long time ago. These are the changes I would commit if given the go-ahead, indentation changes included…
Comment 3 Ulrich Müller gentoo-dev 2015-07-11 15:12:23 UTC
Created attachment 406536 [details, diff]
emacs-common-gentoo-1.5.ebuild.diff

Slightly different approach, please test.
Comment 4 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2015-07-11 17:45:10 UTC
Comment on attachment 406532 [details, diff]
emacs-common-gentoo-1.5-portage-multilib-indented.patch

(In reply to Ulrich Müller from comment #3)
> Created attachment 406536 [details, diff] [details, diff]
> emacs-common-gentoo-1.5.ebuild.diff
> 
> Slightly different approach, please test.

This works for me. Tested both with and without preexisting site-lisp.

Thanks!