Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710294 - x11-apps/xinit-1.4.1 uses "if has_version "<${CATEGORY}/${PN}-1.4.1"" inside pkg_postinst()
Summary: x11-apps/xinit-1.4.1 uses "if has_version "<${CATEGORY}/${PN}-1.4.1"" inside ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-20 11:22 UTC by inactive
Modified: 2020-03-09 02:05 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 inactive 2020-02-20 11:22:22 UTC
x11-apps/xinit/xinit-1.4.1.ebuild
is trying to detect whether the just xinit was updated from a version prior to 1.4.1
by making this check:
if has_version "<${CATEGORY}/${PN}-1.4.1"; then
inside the function pkg_postinst() {
but this will not work because at pkg_postinst() time, the current version is the just merged one: 1.4.1

The check should probably be moved into a pkg_preinst() just like it is for 
www-client/surfraw/surfraw-2.3.0-r2.ebuild

I'm not sure what other packages are suffering from this same issue. But I'd recommend someone who's good at regexps(or something) find them, maybe? well, if you want.

Initially started from https://bugs.gentoo.org/709748#c5


Reproducible: Always



Expected Results:  
messages appear when they were intended to
Comment 1 inactive 2020-02-20 11:57:28 UTC
for reference: https://bugs.gentoo.org/440214#c8
Comment 2 Brian Evans (RETIRED) gentoo-dev 2020-02-20 13:41:56 UTC
Even better if it used ver_test against $REPLACING_VERSIONS
Comment 3 Larry the Git Cow gentoo-dev 2020-03-09 02:05:57 UTC
The bug has been closed via the following commit(s):

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

commit db0db442ab5220efe9ab11ea8f931ff9b83d460a
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-03-09 01:50:51 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-03-09 02:05:42 +0000

    x11-apps/xinit: Fix postinstall message
    
    Closes: https://bugs.gentoo.org/710294
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-apps/xinit/xinit-1.4.1.ebuild | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)