Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 440454

Summary: x11-apps/xinit-1.3.2: some elog messages should only be shown for the first install.
Product: Gentoo Linux Reporter: poletti.marco
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: enhancement CC: gentoo_eshoes, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 440214    

Description poletti.marco 2012-10-31 10:58:54 UTC
Disclaimer: this bug has been filed in a semi-automated manner.

When emerging the package x11-apps/xinit-1.3.2, the following elog messages are displayed:

 * If you use startx to start X instead of a login manager like gdm/kdm,
 * you can set the XSESSION variable to anything in /etc/X11/Sessions/ or
 * any executable. When you run startx, it will run this as the login session.
 * You can set this in a file in /etc/env.d/ for the entire system,
 * or set it per-user in ~/.bash_profile (or similar for other shells).
 * Here's an example of setting it for the whole system:
 *     echo XSESSION="Gnome" > /etc/env.d/90xsession
 *     env-update && source /etc/profile

Such messages should only be displayed when the package is a new install.
These situations can be checked in the ebuild as follows:

if ! has_version 'x11-apps/xinit'; then

See the tracker bug 440214 for more details.
Comment 1 Pacho Ramos gentoo-dev 2013-10-06 17:35:31 UTC
You can also use readme.gentoo.eclass for this, if you prefer, I can do the work for you
Comment 2 PaweĊ‚ Hajdan, Jr. (RETIRED) gentoo-dev 2014-01-19 19:47:28 UTC
(In reply to Pacho Ramos from comment #1)
> You can also use readme.gentoo.eclass for this, if you prefer, I can do the
> work for you

+1
Comment 3 Larry the Git Cow gentoo-dev 2019-03-03 05:45:35 UTC
The bug has been closed via the following commit(s):

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

commit 78925d7a2cdac37e74219558419b862d81e6a9c5
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-03-03 05:44:12 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-03-03 05:45:23 +0000

    x11-apps/xinit: Only print postinst messages first time
    
    Closes: https://bugs.gentoo.org/440454
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-apps/xinit/xinit-1.4.0-r1.ebuild | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
Comment 4 inactive 2020-02-20 12:04:48 UTC
Unless I'm missing something, the message is not displayed the "first" time xinit is installed, even though that code is still there: https://github.com/gentoo/gentoo/blob/1799bd53b7a5d2a3e7da6a4b6324eee80fc00171/x11-apps/xinit/xinit-1.4.1.ebuild#L56

Thus seen by:

# emerge -av --unmerge xinit
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

>>> These are the packages that would be unmerged:

 x11-apps/xinit
    selected: 1.4.1 
   protected: none 
     omitted: none 

All selected packages: =x11-apps/xinit-1.4.1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] y
>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) x11-apps/xinit-1.4.1...

 * GNU info directory index is up-to-date.

# time emerge -av xinit

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] x11-apps/xinit-1.4.1::gentoo  USE="-twm" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-apps/xinit-1.4.1::gentoo
>>> Installing (1 of 1) x11-apps/xinit-1.4.1::gentoo
>>> Recording x11-apps/xinit in "world" favorites file...
>>> Jobs: 1 of 1 complete                           Load avg: 0.19, 0.10, 0.03
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

real	0m10.580s
user	0m6.784s
sys	0m2.364s

See also:
https://bugs.gentoo.org/show_bug.cgi?id=710294
https://bugs.gentoo.org/440214#c8