Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539928 - sys-libs/glibc - devpts check in eblit should be done earlier, rather than in pkg_preinst.eblit
Summary: sys-libs/glibc - devpts check in eblit should be done earlier, rather than in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 06:02 UTC by Teika kazura
Modified: 2015-05-27 13:55 UTC (History)
0 users

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


Attachments
eblit.patch (eblit.patch,2.10 KB, patch)
2015-02-13 06:02 UTC, Teika kazura
Details | Diff
eblit.patch (eblit.patch,2.64 KB, patch)
2015-02-24 00:51 UTC, Teika kazura
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Teika kazura 2015-02-13 06:02:14 UTC
Created attachment 396312 [details, diff]
eblit.patch

In pkg_preinst.eblit of sys-libs/glibc, devpts mount check is done, and if it fails, emerge aborts, **after compiling all**. It's better to do it earlier; it's not a bug, but for slow PCs, it's a pain.

I attached a patch which moves that part of the code to the function eblit-glibc-pkg_setup(), defined in eblits/pkg_setup.eblit. I don't know what's "just_header", but at least this patch correctly works for me.

I know the failure of devpts check is a rare case. (A failure happened to me in a chroot setup, mounting devpts /to/another/path.) But at least it's better, right? :)

Thanks beforehand.
Comment 1 SpanKY gentoo-dev 2015-02-13 21:50:31 UTC
Comment on attachment 396312 [details, diff]
eblit.patch

this breaks `emerge -B glibc` where the binpkg is merely created.  pkg_preinst is the first step where we know when the code is going to be deployed.
Comment 2 Teika kazura 2015-02-15 11:31:22 UTC
I see. Do you think it'll be acceptable by adding this,
------------------------------------------------------------------------
if [[ ${MERGE_TYPE} != buildonly ]]; then
------------------------------------------------------------------------
just like pkg_setup() of the ebuilds of sys-fs/udev?
Comment 3 SpanKY gentoo-dev 2015-02-15 17:56:27 UTC
(In reply to teika from comment #2)

historically this wouldn't work because the EAPI wasn't new enough.  once the versions in the tree get updated though, we can cut over.
Comment 4 Teika kazura 2015-02-24 00:51:21 UTC
Created attachment 397358 [details, diff]
eblit.patch

In this patch, I moved the checker code to common.eblit, and let pkg_{preinst,setup}.eblit call them. In pkg_setup, it reads:
------------------------------------------------------------------------
  if [[ ( ${EAPI:-0} -ge 4 ) && ( ${MERGE_TYPE} != buildonly ) ]] ; then
          check_devpts
  fi
------------------------------------------------------------------------
EAPI version check is correct, but I'm not sure of "MERGE_TYPE" check part; "check_devpts" is called even if you do:
$ export MERGE_TYPE=buildonly
$ ebuild /home/te/gentoo/portage-overlay/sys-libs/glibc/glibc-2.20.ebuild unpack
(you know, glibc-2.20 has EAPI=4). I thought ebuild (1) respected environment variables...

In common.eblit, I annotated:
------------------------------------------------------------------------
# Once all ebuilds have EAPI >=4, move this to pkg_preinst.eblit. See bug #539928.
------------------------------------------------------------------------
but you may want to revise it.

Thanks.