Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727190 - Packages json feed strips bare hyphens
Summary: Packages json feed strips bare hyphens
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: 2020-06-05 06:40 UTC by Johannes Willem (Hans) Fernhout
Modified: 2023-02-20 13:51 UTC (History)
1 user (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 Johannes Willem (Hans) Fernhout 2020-06-05 06:40:38 UTC
An author of a wiki page can make use of a USEflag template, which will automagically create a table with the USE flags and the descriptions in the wiki page. When a description of a used USE flag contains a single dash surrounded by spaces (" - ") then the spaces and the dash are not shown in the table.

So far I have found two examples, but there may be more:
1) https://wiki.gentoo.org/wiki/Squid#USE_flags 
   qos: shows " conntracksee" instead of "conntrack - see" 
2) https://wiki.gentoo.org/wiki/Motion#USE_flags
   sqlite: shows "sqliteembedded" instead of "sqlite - embedded"

This is not something a wiki author can change. It either needs to be changed in the wiki USEFlag template (preferred), or USE flag descriptions need to avoid " - " in their descriptions.

Note that https://www.gentoo.org/support/use-flags is able to render " - " in USE flag descriptions properly.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2020-06-05 12:41:12 UTC
(In reply to Hans Fernhout from comment #0)
> An author of a wiki page can make use of a USEflag template, which will
> automagically create a table with the USE flags and the descriptions in the
> wiki page. When a description of a used USE flag contains a single dash
> surrounded by spaces (" - ") then the spaces and the dash are not shown in
> the table.
> 
> So far I have found two examples, but there may be more:
> 1) https://wiki.gentoo.org/wiki/Squid#USE_flags 
>    qos: shows " conntracksee" instead of "conntrack - see" 
> 2) https://wiki.gentoo.org/wiki/Motion#USE_flags
>    sqlite: shows "sqliteembedded" instead of "sqlite - embedded"
> 
> This is not something a wiki author can change. It either needs to be
> changed in the wiki USEFlag template (preferred), or USE flag descriptions
> need to avoid " - " in their descriptions.
> 
> Note that https://www.gentoo.org/support/use-flags is able to render " - "
> in USE flag descriptions properly.

The data we are given is what we display.

The feed https://packages.gentoo.org/packages/net-proxy/squid.json (for example) is the source of the first example and has the same problem with sqlite as well and more flags too.

If the json is fixed, the wiki will be too.
Comment 2 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-02-19 21:23:46 UTC
Fix pushed to staging area [1]. Will close when pushed to main p.g.o.

[1] https://packagestest.gentoo.org/
Comment 3 Larry the Git Cow gentoo-dev 2023-02-20 13:51:31 UTC
The bug has been closed via the following commit(s):

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

commit 3423e4e6fe40f72ca3aca3eed560856b9aef8a3f
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2023-02-19 21:20:07 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2023-02-19 21:20:07 +0000

    useflags: correct parsing of USE's descriptions with " - "
    
    Closes: https://bugs.gentoo.org/727190
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 pkg/portage/repository/use.go | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)