Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504284 - please consider migrating from einfo (in prefix-baselayout) to sys-apps/gentoo-functions
Summary: please consider migrating from einfo (in prefix-baselayout) to sys-apps/gento...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 504422 504424 504426 504428 (view as bug list)
Depends on: init.d_functions.sh
Blocks:
  Show dependency tree
 
Reported: 2014-03-12 02:01 UTC by William Hubbs
Modified: 2015-02-28 14:10 UTC (History)
4 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 William Hubbs gentoo-dev 2014-03-12 02:01:16 UTC
prefix team:
We now have a simple shell script, sys-apps/gentoo-functions, which
implements the e* functions used by tools outside of OpenRc.

I am asking you to consider removing the einfo package from
baselayout-prefix and using gentoo-functions instead. The script puts
this file in /lib/gentoo/functions.sh which means that some migration
will have to happen. The ebuild uses eapi 5, so it is already prefix
aware.

The migration is already starting to happen on bug #504116.

Do you have any thoughts on this for prefix?

Thanks,

William
Comment 1 Fabian Groffen gentoo-dev 2014-03-12 16:26:49 UTC
This surely is on the radar!  We need to try and see what happens.  I hope the implementation is not relying on paths and all that stuff to fine tools.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2014-03-12 17:03:51 UTC
Also, more specifically, since the various tools (outside of openrc) that currently use /etc/init.d/functions.sh are going to be migrated to use the new gentoo-functions' /lib/gentoo/functions.sh (and so the functions.sh einfo provides won't even be used by these tools), we need to get confirmation that gentoo-functions will work in prefix.

Given it is a shell script and afaik a POSIX sh (or perhaps even bash itself) is a hard dependency of a prefix install, there is probably no reason why it wouldn't work; confirmation would still be appreciated. :)
Comment 3 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-03-12 19:18:28 UTC
This looks like it is no problem at all. sys-apps/gentoo-functions is perfectly prefix compatible, and there shouldn't be bootstrapping problems either.

The only question is whether there are any packages using einfo.h or libeinfo.so, but I rather doubt that is the case.

Unless the above is the case, prefix should be able to switch without any problems once the tracked tools are migrated.
Comment 4 Mike Gilbert gentoo-dev 2014-03-12 21:34:18 UTC
(In reply to Ruud Koolen from comment #3)
> This looks like it is no problem at all. sys-apps/gentoo-functions is
> perfectly prefix compatible, and there shouldn't be bootstrapping problems
> either.
> 

I assume we would want to use @GENTOO_PORTAGE_PREFIX@ / eprefixify in any consumers (like python-updater)?
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-03-13 05:24:41 UTC
*** Bug 504422 has been marked as a duplicate of this bug. ***
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-03-13 05:25:36 UTC
*** Bug 504428 has been marked as a duplicate of this bug. ***
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-03-13 05:26:15 UTC
*** Bug 504424 has been marked as a duplicate of this bug. ***
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-13 05:27:25 UTC
*** Bug 504426 has been marked as a duplicate of this bug. ***
Comment 9 Fabian Groffen gentoo-dev 2014-03-13 13:55:10 UTC
(In reply to Mike Gilbert from comment #4)
> (In reply to Ruud Koolen from comment #3)
> > This looks like it is no problem at all. sys-apps/gentoo-functions is
> > perfectly prefix compatible, and there shouldn't be bootstrapping problems
> > either.
> > 
> 
> I assume we would want to use @GENTOO_PORTAGE_PREFIX@ / eprefixify in any
> consumers (like python-updater)?

Yes, as well as that gentoo-functions should use that itself to specify the bash/sh shell it uses.  POSIX shell != /bin/sh no matter how hard you try in Prefix.
Comment 10 William Hubbs gentoo-dev 2014-03-13 14:29:43 UTC
(In reply to Fabian Groffen from comment #9)
> (In reply to Mike Gilbert from comment #4)
> > (In reply to Ruud Koolen from comment #3)
> > > This looks like it is no problem at all. sys-apps/gentoo-functions is
> > > perfectly prefix compatible, and there shouldn't be bootstrapping problems
> > > either.
> > > 
> > 
> > I assume we would want to use @GENTOO_PORTAGE_PREFIX@ / eprefixify in any
> > consumers (like python-updater)?
> 
> Yes, as well as that gentoo-functions should use that itself to specify the
> bash/sh shell it uses.  POSIX shell != /bin/sh no matter how hard you try in
> Prefix.

Gentoo-functions.sh is not a standalone script, It gets sourced, so it doesn't specify the shell it uses.
Comment 11 Fabian Groffen gentoo-dev 2014-04-06 12:20:50 UTC
I've keyworded gentoo-functions, I guess now is the time to wait for everything to be converted, then remove einfo from baselayout-prefix in a revbump or something?
Comment 12 Fabian Groffen gentoo-dev 2015-02-28 13:30:58 UTC
(In reply to William Hubbs from comment #0)
> prefix team:
> We now have a simple shell script, sys-apps/gentoo-functions, which
> implements the e* functions used by tools outside of OpenRc.

because this has apparently emerged into some C-code, I've "fixed" 0.8 to provide a simple shell script for consoletype to get this compiling on our platforms.
Comment 13 Fabian Groffen gentoo-dev 2015-02-28 14:10:09 UTC
baselayout-prefix-2.2-r4 now depends on gentoo-functions to provide /etc/init.d/functions.sh (backwards compat symlink).