@@ -33,6 +33,12 @@ def pick_project_candidates(client, projects, since):
33
33
Magazine article). By such projects we consider those with at least one
34
34
succeeded build and at least some project information filled.
35
35
"""
36
+ rawhide_pks_resp = subprocess .run (
37
+ ["dnf" , "repoquery" , "rawhide" , "--queryformat" , "%{name}" , "*" ],
38
+ stdout = subprocess .PIPE ,
39
+ )
40
+ fedora_rawhide_pkgs = {x for x in rawhide_pks_resp .stdout .decode ().split ("\n " )}
41
+
36
42
picked = []
37
43
for project in projects :
38
44
if project .unlisted_on_hp :
@@ -55,7 +61,9 @@ def pick_project_candidates(client, projects, since):
55
61
continue
56
62
57
63
builds = filter_unique_package_builds (builds )
58
- builds = [b for b in builds if not is_in_fedora (b .source_package ["name" ])]
64
+ builds = [
65
+ b for b in builds if b .source_package ["name" ] not in fedora_rawhide_pkgs
66
+ ]
59
67
if not builds :
60
68
print ("Skipping {}, all packages already in Fedora" .format (project .full_name ))
61
69
continue
@@ -81,14 +89,6 @@ def filter_unique_package_builds(builds):
81
89
return unique .values ()
82
90
83
91
84
- def is_in_fedora (packagename ):
85
- """
86
- Check if a given package is already provided by Fedora official repositories
87
- """
88
- cmd = ["koji" , "search" , "package" , packagename ]
89
- return bool (subprocess .check_output (cmd ))
90
-
91
-
92
92
def get_parser ():
93
93
description = ("This tool lists new packages in Copr, that are not yet "
94
94
"available in Fedora. It's main purpose is to help us pick "
0 commit comments