Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 791613 - app-admin/diamond: package uses Python 2 code, bad ebuild quality
Summary: app-admin/diamond: package uses Python 2 code, bad ebuild quality
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2021-05-23 09:37 UTC by Michał Górny
Modified: 2021-07-06 07:06 UTC (History)
1 user (show)

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


Attachments
/var/log/portage/app-admin:diamond-4.0.515.20200620-r1:20210523-093242.log (app-admin:diamond-4.0.515.20200620-r1:20210523-093242.log,67.75 KB, text/plain)
2021-05-23 09:37 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-23 09:37:55 UTC
Created attachment 710514 [details]
/var/log/portage/app-admin:diamond-4.0.515.20200620-r1:20210523-093242.log

1. Missing PYTHON_USEDEPs all over the place.

2. Multiple tests fail and the failures indicate Python 2 code, e.g.:

```
======================================================================                                                                            
ERROR: test_should_publish_stats_with_long_type (testmongodb.TestMongoMultiHostDBCollector)                                                       
----------------------------------------------------------------------
Traceback (most recent call last):                                       
  File "/usr/lib/python3.7/site-packages/mock/mock.py", line 1346, in patched                                                                     
    return func(*newargs, **newkeywargs)                                                                                                          
  File "/tmp/portage/app-admin/diamond-4.0.515.20200620-r1/work/Diamond-8d8a2e49d80d44968a34d43e36c1d864695a29c1/src/collectors/mongodb/test/testm
ongodb.py", line 268, in test_should_publish_stats_with_long_type                                                                                 
    self.collector.collect()                                                                                                                      
  File "/tmp/portage/app-admin/diamond-4.0.515.20200620-r1/work/Diamond-8d8a2e49d80d44968a34d43e36c1d864695a29c1/src/collectors/mongodb/mongodb.py
", line 203, in collect                                                                                                                           
    self._publish_dict_with_prefix(data, base_prefix)                                                                                             
  File "/tmp/portage/app-admin/diamond-4.0.515.20200620-r1/work/Diamond-8d8a2e49d80d44968a34d43e36c1d864695a29c1/src/collectors/mongodb/mongodb.py
", line 335, in _publish_dict_with_prefix                                                                                                         
    self._publish_metrics(prefix, key, dict, publishfn)                                                                                           
  File "/tmp/portage/app-admin/diamond-4.0.515.20200620-r1/work/Diamond-8d8a2e49d80d44968a34d43e36c1d864695a29c1/src/collectors/mongodb/mongodb.py
", line 351, in _publish_metrics    
    elif isinstance(value, long):                                                                                                                 
NameError: name 'long' is not defined
```

(long's been removed in Python 3)

3. Misleading version for snapshot -- we generally use Gentoo-specific _pDATE instead of appending components that aren't present in upstream version.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-23 09:38:41 UTC
4. Missing || die after rm

5. Awful hacks in python_install.
Comment 2 Fabian Groffen gentoo-dev 2021-05-23 09:40:08 UTC
yup, it should die, just need to get it out of production
Comment 3 Larry the Git Cow gentoo-dev 2021-05-24 09:54:08 UTC
The bug has been referenced in the following commit(s):

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

commit 89bad4c3548d91796fa842f25102d0f8dbe2e952
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2021-05-24 09:53:41 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2021-05-24 09:53:41 +0000

    package.mask: mask app-admin/diamond for removal
    
    Bug: https://bugs.gentoo.org/791613
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 4 Fabian Groffen gentoo-dev 2021-07-06 07:06:41 UTC
package removed from tree