Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587682 - packages.gentoo.org shows invalid keyword information
Summary: packages.gentoo.org shows invalid keyword information
Status: RESOLVED OBSOLETE
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: 2016-07-01 11:53 UTC by Thomas Deutschmann (RETIRED)
Modified: 2020-05-16 02:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
webkit-gtk screenshot (snapshot_20180303_151809.png,82.76 KB, image/png)
2018-03-03 02:19 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details
webkit-gtk-tidy.json (webkit-gtk-tidy.json,4.40 KB, application/json)
2018-03-03 02:22 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2016-07-01 11:53:55 UTC
https://packages.gentoo.org/packages/media-video/ffmpeg lists every media-video/ffmpeg atom as masked on every architecture which is wrong.

Comparing with eshowkw:

> $ eshowkw media-video/ffmpeg
> Keywords for media-video/ffmpeg:
>          |                                 |   u            |
>          | a a         p s     a   n r     |   n            |
>          | l m   h i   p p   m r m i i s   | e u s          | r
>          | p d a p a p c a x i m 6 o s 3   | a s l          | e
>          | h 6 r p 6 p 6 r 8 p 6 8 s c 9 s | p e o          | p
>          | a 4 m a 4 c 4 c 6 s 4 k 2 v 0 h | i d t          | o
> ---------+---------------------------------+----------------+-------
>    2.8.6 | + + + + + + + + + ~ o o o o o o | 5 o 0/54.56.56 | gentoo
>    2.8.7 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o o o o o o | 5 o            | gentoo
> ---------+---------------------------------+----------------+-------
> [M]3.0.1 | o ~ o o o o o o o ~ o o o o o o | 6 o 0/55.57.57 | gentoo
> [M]3.0.2 | o ~ o o o o o o o ~ o o o o o o | 6 o            | gentoo
>   [M]3.1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o o o o o o | 6 o            | gentoo
>  [M]9999 | o o o o o o o o o o o o o o o o | 6 o            | gentoo


> Timestamp of repository gentoo: Fri, 01 Jul 2016 09:42:25 +0000
Comment 1 Derk W te Bokkel 2016-07-15 12:09:48 UTC
happened in the past with icedtea and icedtea-bin as well .. is there a general algorithm fault .. I and I've noticed similar issues before
Comment 2 Mart Raudsepp gentoo-dev 2016-12-07 05:14:33 UTC
Right now I can see something like this on https://packages.gentoo.org/packages/dev-qt/qtwebkit
Also in https://packages.gentoo.org/packages/dev-qt/qtwebkit.json things are relatedly exported wrong.
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-10-09 07:04:09 UTC
It looks like its not handling the mask syntax in package.mask right, and is interpreting an entry in package.mask as masking the *whole package*, not specific version ranges.

https://packages.gentoo.org/packages/dev-lang/perl
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2018-03-02 02:23:16 UTC
I mean this is the code:

# Provides low-level access to a mask file
class Portage::Util::Maskfile
  attr_reader :masks

  def initialize(path)
    @path = path
    @masks = []
    parse!
  end

  def parse!
    File.read(@path).split("\n\n").each do |raw_mask|
      comments = []
      atoms = []

      raw_mask.each_line do |line|
        line.strip!

        if line.start_with? '#'
          comments << line
        else
          atoms << line unless line == ''
        end
      end

      # Skip examples or other comment-only entries
      next if atoms.empty?

      author = nil
      date = nil

      if comments.first =~ /^#\s+(.*)\s+<([^>]+)>\s\(([^)]+)\)/
        author = '%s <%s>' % [$1, $2]
        date = $3
      end

      # Strip the newlines, we don't want to carry over the ASCII art
      reason = comments[1..-1].map { |l| l.gsub(/^# /, '') }.join ' '

      @masks << Portage::Util::Mask.new(author, date, reason, atoms)
    end
  end
end

I wouldn't be shocked by any bugs in it; but I'm not sure if we have a good test case to clearly show a bug. Please re-open if you spot a case where it goes wrong.
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-03-03 02:19:19 UTC
Created attachment 521978 [details]
webkit-gtk screenshot

I suspect the code has changed since this bug was filed. At least, it appears different: Now the mistake is the other way around, masked packages *arent* obvious from the matrix.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-03-03 02:22:36 UTC
Created attachment 521980 [details]
webkit-gtk-tidy.json
Comment 7 Alec Warner (RETIRED) archtester gentoo-dev Security 2018-03-03 21:03:58 UTC
Ok so we recorded a mask, the mask is on 2 atoms, but we failed to somehow identify that the atoms are slots, and that the slots match 2 of the 3 available versions. Thanks for the report.

-A
Comment 8 Alec Warner (RETIRED) archtester gentoo-dev Security 2020-05-16 02:34:55 UTC
We rewrote the entire application.