Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784614 - app-misc/nnn cannot install on gentoo prefix
Summary: app-misc/nnn cannot install on gentoo prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-21 01:09 UTC by xuelinye9
Modified: 2021-04-22 21:15 UTC (History)
2 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 xuelinye9 2021-04-21 01:09:16 UTC
Installation prefix is a fixed string, which makes it incompatible with gentoo prefix.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-21 02:27:27 UTC
A log and emerge —-info is polite in general to help us find the issue faster even if we can’t reproduce.
Comment 2 xuelinye9 2021-04-21 05:51:38 UTC
(In reply to Sam James from comment #1)
> A log and emerge —-info is polite in general to help us find the issue
> faster even if we can’t reproduce.

It's my first time to post a bug on gentoo, and I'm sorry for the incorrect bug post. I think it can be easy to locate the problem. The error output is below (my gentoo prefix is installed under home directory)

```
 * QA Notice: the following files are outside of the prefix:
 * /usr
 * /usr/bin
 * /usr/bin/nnn
 * /usr/share
 * /usr/share/icons
 * /usr/share/icons/hicolor
 * /usr/share/icons/hicolor/64x64
 * /usr/share/icons/hicolor/64x64/apps
 * /usr/share/icons/hicolor/64x64/apps/nnn.png
 * /usr/share/icons/hicolor/scalable
 * /usr/share/icons/hicolor/scalable/apps
 * /usr/share/icons/hicolor/scalable/apps/nnn.svg
 * /usr/share/man
 * /usr/share/man/man1
 * /usr/share/man/man1/nnn.1
 * /usr/share/applications
 * /usr/share/applications/nnn.desktop
 * ERROR: app-misc/nnn-3.6::gentoo failed:
 *   Aborting due to QA concerns: there are files installed outside the prefix
 *
```

I think it is beacause the ebuild script has a fixed string of installation:

```
src_install() {
	emake PREFIX="/usr" DESTDIR="${D}" install

	emake PREFIX="/usr" DESTDIR="${D}" install-desktop

	newbashcomp misc/auto-completion/bash/nnn-completion.bash nnn

	insinto /usr/share/fish/vendor_completions.d
	doins misc/auto-completion/fish/nnn.fish

	insinto /usr/share/zsh/site-functions
	doins misc/auto-completion/zsh/_nnn

	einstalldocs
}
```
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-21 05:55:58 UTC
No worries, basically most Gentoo developers don’t use Prefix. They will however fix things if it’s clear how.

The problem is, some variables already take into account Prefix and so on so if we simply add EPREFIX to all of them, you may get a double Prefix being installed.

I’ve seen it quite often where the main build system is fine but you need to pretend the docdir path for example. Anyway, I do have a Prefix setup so I’ll have a look in a few days.

In future, attach the build.log and emerge —-info for completeness. You are right though, it is largely obvious, but it’s to help people who can’t easily reproduce to verify their fix is probably right.
Comment 4 Larry the Git Cow gentoo-dev 2021-04-22 21:15:30 UTC
The bug has been closed via the following commit(s):

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

commit 4c2568c7fa9da91667da1862ea687938b5967cc5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-04-22 21:09:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-04-22 21:14:58 +0000

    app-misc/nnn: respect EPREFIX
    
    Closes: https://bugs.gentoo.org/784614
    Signed-off-by: Sam James <sam@gentoo.org>

 app-misc/nnn/nnn-3.6.ebuild | 5 ++---
 app-misc/nnn/nnn-4.0.ebuild | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)