mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 22:26:31 +00:00
support/scripts/pkg-stats: set developers info
Use the function 'parse_developers' function from getdeveloperlib that collect the information about the developers and the files they maintain. Then set the maintainer(s) to each package. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
b1916b0a8d
commit
c1fc827934
@ -30,10 +30,14 @@ import certifi
|
|||||||
import distutils.version
|
import distutils.version
|
||||||
import time
|
import time
|
||||||
import gzip
|
import gzip
|
||||||
|
import sys
|
||||||
from urllib3 import HTTPSConnectionPool
|
from urllib3 import HTTPSConnectionPool
|
||||||
from urllib3.exceptions import HTTPError
|
from urllib3.exceptions import HTTPError
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
|
|
||||||
|
sys.path.append('utils/')
|
||||||
|
from getdeveloperlib import parse_developers
|
||||||
|
|
||||||
NVD_START_YEAR = 2002
|
NVD_START_YEAR = 2002
|
||||||
NVD_JSON_VERSION = "1.0"
|
NVD_JSON_VERSION = "1.0"
|
||||||
NVD_BASE_URL = "https://nvd.nist.gov/feeds/json/cve/" + NVD_JSON_VERSION
|
NVD_BASE_URL = "https://nvd.nist.gov/feeds/json/cve/" + NVD_JSON_VERSION
|
||||||
@ -171,6 +175,16 @@ class Package:
|
|||||||
"""
|
"""
|
||||||
return cve in self.all_ignored_cves.get(self.pkgvar(), [])
|
return cve in self.all_ignored_cves.get(self.pkgvar(), [])
|
||||||
|
|
||||||
|
def set_developers(self, developers):
|
||||||
|
"""
|
||||||
|
Fills in the .developers field
|
||||||
|
"""
|
||||||
|
self.developers = [
|
||||||
|
dev.name
|
||||||
|
for dev in developers
|
||||||
|
if dev.hasfile(self.path)
|
||||||
|
]
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.path == other.path
|
return self.path == other.path
|
||||||
|
|
||||||
@ -894,6 +908,8 @@ def __main__():
|
|||||||
'HEAD']).splitlines()[0].decode()
|
'HEAD']).splitlines()[0].decode()
|
||||||
print("Build package list ...")
|
print("Build package list ...")
|
||||||
packages = get_pkglist(args.npackages, package_list)
|
packages = get_pkglist(args.npackages, package_list)
|
||||||
|
print("Getting developers ...")
|
||||||
|
developers = parse_developers()
|
||||||
print("Getting package make info ...")
|
print("Getting package make info ...")
|
||||||
package_init_make_info()
|
package_init_make_info()
|
||||||
print("Getting package details ...")
|
print("Getting package details ...")
|
||||||
@ -905,6 +921,7 @@ def __main__():
|
|||||||
pkg.set_check_package_warnings()
|
pkg.set_check_package_warnings()
|
||||||
pkg.set_current_version()
|
pkg.set_current_version()
|
||||||
pkg.set_url()
|
pkg.set_url()
|
||||||
|
pkg.set_developers(developers)
|
||||||
print("Checking URL status")
|
print("Checking URL status")
|
||||||
check_package_urls(packages)
|
check_package_urls(packages)
|
||||||
print("Getting latest versions ...")
|
print("Getting latest versions ...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user