Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771126 - packages.gentoo.org misidentifies latest version
Summary: packages.gentoo.org misidentifies latest version
Status: RESOLVED FIXED
Alias: None
Product: Websites
Classification: Unclassified
Component: Packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Packages Website
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-17 16:27 UTC by Rick Farina (Zero_Chaos)
Modified: 2023-04-05 18:53 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 Rick Farina (Zero_Chaos) gentoo-dev 2021-02-17 16:27:49 UTC
https://packages.gentoo.org/packages/net-wireless/ubertooth

At the time this bug is filed, the page shows "It seems that version 2020.12.R1 is available upstream, while the latest version in the Gentoo tree is 2018.12.1.", however, just below, it clearly shows "2020.12.1" in available versions.

11:23 <@antarus> Zero_Chaos: hrm, according to the outdated_packages table there is only 1 entry: gentooVersion=2018.12.1 and newestVersion=2020.12.R1
11:23 <@antarus> Zero_Chaos: so seems like a bug in repology data sync
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2021-02-17 16:30:09 UTC
additional example
https://packages.gentoo.org/packages/net-libs/libbtbb
Comment 2 Matt Turner gentoo-dev 2022-01-18 21:42:15 UTC
Unsure if it's the same problem, but currently

https://packages.gentoo.org/packages/dev-libs/folks

shows:

>  Version 0.14.0 is available upstream. Please consider updating!
> It seems that version 0.14.0 is available upstream, while the latest version in the Gentoo tree is 0.15.3.
Comment 3 Matt Turner gentoo-dev 2022-03-24 00:24:41 UTC
(In reply to Matt Turner from comment #2)
> Unsure if it's the same problem, but currently
> 
> https://packages.gentoo.org/packages/dev-libs/folks
> 
> shows:
> 
> >  Version 0.14.0 is available upstream. Please consider updating!
> > It seems that version 0.14.0 is available upstream, while the latest version in the Gentoo tree is 0.15.3.

This is happening again with this package.
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2022-04-27 23:41:54 UTC
        {{ if .UserPreferences.Packages.Overview.ShowOutdated}}
            {{ if .Package.Outdated }}
                {{$outdatedFound := false}}
                {{range .Versions}}
                    {{if eq (index $.Package.Outdated 0).NewestVersion .Version}}
                        {{$outdatedFound = true}}
                    {{end}}
                {{end}}
                {{if not $outdatedFound}}
                    <div class="alert alert-info">
                        <strong><span class="fa fa-fw fa-lightbulb-o"></span> Version {{ (index .Package.Outdated 0).NewestVersion }} is available upstream. Please consider updating!</strong><br>
                        It seems that version {{ (index .Package.Outdated 0).NewestVersion }} is available upstream, while the latest version in the Gentoo tree is {{ (index .Package.Outdated 0).GentooVersion }}.<br/>
                        <small><i>You think this warning is false? Read more about it <a href="https://archives.gentoo.org/gentoo-dev/message/b793f4da5a5b5e20a063ea431500a820">here</a>.</i></small>
                    </div>
                {{end}}
            {{ end }}
        {{ end }}
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2022-04-28 02:04:50 UTC
To follow up on the IRC conversation:

It looks like repology has 42.1.1 out, but its marked devel.

So in gentoo we have 2 sets of records:

RepologyOutdated says:(gentoo: 42.0, repology: 42.1) (This triggers the outdated flag.)
GentooVersions says: (gentoo: [41.2, 42.0, 42.1.1])

Then in our p.g.o code we say: Is package outdated (and our repology record says yes, it is.) and then we look for 42.1 in our gentoo versions list ....and we don't find a match, so we flag it and print the message.

If we could vercmp, then instead of looking for an exact string match in the gentoo versions list (trying to match it to the repology version) we could do a vercmp. E.g. for version in gentoo_versions: if vercmp(version, repology_version) then don't print the message. I think this is a minor code change (to expose the GreaterThan function in the template.)

-A
Comment 6 Larry the Git Cow gentoo-dev 2023-04-05 18:37:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/sites/soko.git/commit/?id=fb4d1832f08cce06bf55c32380f13d87d2c6fc4b

commit fb4d1832f08cce06bf55c32380f13d87d2c6fc4b
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2023-04-05 16:16:58 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2023-04-05 16:16:58 +0000

    update/repology: fix affected packages and latest version
    
    - repology json can combine multiple gentoo packages into one "group"
      (for example normal and "-bin" packages). Mark outdated for all those
      packages.
    - when selecting current latest version, instead of using the last entry
      in array, version compare them and select latest.
    
    Closes: https://bugs.gentoo.org/771126
    Closes: https://bugs.gentoo.org/892591
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 pkg/portage/repology/outdated.go | 108 ++++++++++++++++++++++-----------------
 1 file changed, 61 insertions(+), 47 deletions(-)