public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Owen W. Taylor <otaylor@fishsoup.net>
To: git-commits@fedoraproject.org
Subject: [flatpaks/flatpak-runtime] f45: Allow adding "extra packages" in package-notes.txt
Date: Fri, 11 Sep 2026 14:40:19 GMT [thread overview]
Message-ID: <178913761903.1.8595467144102696125.flatpaks-flatpak-runtime-75b2f241059f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : flatpaks/flatpak-runtime
Branch : f45
Commit : 75b2f241059fe1962fe9542449700b0e8e489444
Author : Owen W. Taylor <otaylor@fishsoup.net>
Date : 2018-02-05T14:27:28-05:00
Stats : +100/-50 in 4 file(s)
URL : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/75b2f241059fe1962fe9542449700b0e8e489444?branch=f45
Log:
Allow adding "extra packages" in package-notes.txt
Add flags EB/EB_SDK/E/E_SDK for marking a package as an "extra package" -
something that we want in the runtime even though it isn't in the upstream
runtimes.
---
diff --git a/package-notes.txt b/package-notes.txt
index 8ad049a..7ea16e5 100644
--- a/package-notes.txt
+++ b/package-notes.txt
@@ -3,6 +3,10 @@
# BINARY-PACKAGE-NAME: FREE FORM NOTES
# BINARY-PACKAGE-NAME: FLAG: FREE FORM NOTES
# Where flag is one of
+# EB: Extra package to include in base runtime
+# EB_SDK: Extra package to include in base sdk
+# E: Extra package to include in runtime
+# E_SDK: Extra package to include in sdk
# F: flag this package as a problem
# F?: flag this package as questionable
# FD: flag that this package is only being pulled in as a dependency of a problem package
diff --git a/report-template.html b/report-template.html
index c02dae1..2539e9e 100644
--- a/report-template.html
+++ b/report-template.html
@@ -28,6 +28,7 @@
<tr><td class="root"></td><td> - Root package, only included because of files in runtime</td></tr>
<tr><td class="files"></td><td> - Included because of files in runtime, also depended upon</td></tr>
<tr><td class="dep"></td><td> - Included because of dependencies</td></tr>
+ <tr><td class="extra"></td><td> - Listed as an extra package in package-notes.txt</td></tr>
</table>
<div class="note">Mouse over shaded squares for details.</div>
</div>
diff --git a/report.css b/report.css
index 65f3cea..ae56c53 100644
--- a/report.css
+++ b/report.css
@@ -82,6 +82,11 @@ td.root {
border: 1px solid #666666;
padding: 0px;
}
+td.extra {
+ background: #8888bb;
+ border: 1px solid #666666;
+ padding: 0px;
+}
td.present, td.files {
background: #aaaaaa;
border: 1px solid #666666;
@@ -111,6 +116,9 @@ tr.flagged-dep {
tr.waived {
color: #006600;
}
+tr.extra {
+ color: #000066;
+}
.hidden {
display: none;
}
diff --git a/tools/generate-report.py b/tools/generate-report.py
index 81a0693..7f25374 100755
--- a/tools/generate-report.py
+++ b/tools/generate-report.py
@@ -60,6 +60,8 @@ class Package(object):
return "flagged-dep"
elif self.flag == 'W':
return "waived"
+ elif self.flag is not None and self.flag.startswith('E'):
+ return "extra"
elif self.gnome_platform and not self.live:
return "questionable"
@@ -128,6 +130,8 @@ class Package(object):
return 'present'
elif required_by is not None and len(required_by) > 0:
return 'files'
+ elif self.flag is not None and self.flag.startswith('E'):
+ return 'extra'
else:
return 'root'
@@ -218,10 +222,13 @@ def add_package(name, which, level, only_if_exists=False, source_package=None):
if source_package is not None:
pkg.source_package = source_package
-def add_packages(filename, which, resolve_deps=False, only_if_exists=False):
- start("Adding packages from {}".format(filename))
- with open(filename) as f:
- pkgs = set(line.strip() for line in f)
+def add_packages(source, which, resolve_deps=False, only_if_exists=False):
+ if isinstance(source, str):
+ start("Adding packages from {}".format(source))
+ with open(source) as f:
+ pkgs = set(line.strip() for line in f)
+ else:
+ pkgs = source
if resolve_deps:
resolved_packages = json.loads(fedmod_output(['resolve-deps', '--json'] + list(pkgs)))
@@ -246,7 +253,8 @@ def add_packages(filename, which, resolve_deps=False, only_if_exists=False):
for package in pkgs:
add_package(package, which, level=2, only_if_exists=only_if_exists)
- done()
+ if isinstance(source, str):
+ done()
def add_package_files(filename, which):
with open(filename) as f:
@@ -260,6 +268,43 @@ def add_package_files(filename, which):
else:
setattr(pkg, which + '_files', [f])
+def read_package_notes():
+ comment_re = re.compile(r'\s*#.*')
+ flag_re = re.compile(r'[A-Z_?]+$')
+ package_re = re.compile(r'\S+')
+
+ with open("package-notes.txt") as f:
+ for line in f:
+ line = comment_re.sub('', line)
+ line = line.strip()
+ if line == '':
+ continue
+ parts = line.split(":", 2)
+ name = parts[0].strip()
+ if not re.match(package_re, name):
+ warn("Can't parse package note: {}".format(line))
+ continue
+ if len(parts) == 1:
+ flag = note = None
+ elif len(parts) == 2:
+ x = parts[1].strip()
+ if flag_re.match(x):
+ flag = x
+ note = None
+ else:
+ note = x
+ flag = None
+ elif len(parts) == 3:
+ x = parts[1].strip()
+ if flag_re.match(x):
+ flag = x
+ note = parts[2].strip()
+ else:
+ flag = None
+ note = parts[1] + ':' + parts[2]
+
+ yield name, note, flag
+
add_packages('out/freedesktop-Platform.packages', 'freedesktop_platform', resolve_deps=True)
add_packages('out/freedesktop-Sdk.packages', 'freedesktop_sdk', resolve_deps=True)
add_packages('out/gnome-Platform.packages', 'gnome_platform', resolve_deps=True)
@@ -272,6 +317,32 @@ add_package_files('out/freedesktop-Sdk.matched', 'freedesktop_sdk')
add_package_files('out/gnome-Platform.matched', 'gnome_platform')
add_package_files('out/gnome-Sdk.matched', 'gnome_sdk')
+# Add extra packages
+extra_base = []
+extra_base_sdk = []
+extra = []
+extra_sdk = []
+
+for name, note, flag in read_package_notes():
+ if flag == 'EB':
+ extra_base.append(name)
+ extra_base_sdk.append(name)
+ extra.append(name)
+ extra_sdk.append(name)
+ elif flag == 'EB_SDK':
+ extra_base_sdk.append(name)
+ extra_sdk.append(name)
+ elif flag == 'E':
+ extra.append(name)
+ extra_sdk.append(name)
+ elif flag == 'E_SDK':
+ extra_sdk.append(name)
+
+add_packages(extra_base, 'freedesktop_platform', resolve_deps=True)
+add_packages(extra_base_sdk, 'freedesktop_sdk', resolve_deps=True)
+add_packages(extra, 'gnome_platform', resolve_deps=True)
+add_packages(extra_sdk, 'gnome_sdk', resolve_deps=True)
+
source_packages = {}
for package in packages.values():
source_package = source_packages.get(package.source_package, None)
@@ -307,51 +378,17 @@ for l in output.split('\n'):
package_to_module[fields[0]] = fields[1][1:-1]
done()
-start("Loading package notes")
-comment_re = re.compile(r'\s*#.*')
-flag_re = re.compile(r'[A-Z?]+$')
-package_re = re.compile(r'\S+')
-
-with open("package-notes.txt") as f:
- for line in f:
- line = comment_re.sub('', line)
- line = line.strip()
- if line == '':
- continue
- parts = line.split(":", 2)
- name = parts[0].strip()
- if not re.match(package_re, name):
- warn("Can't parse package note: {}".format(line))
- continue
- if len(parts) == 1:
- flag = note = None
- elif len(parts) == 2:
- x = parts[1].strip()
- if flag_re.match(x):
- flag = x
- note = None
- else:
- note = x
- flag = None
- elif len(parts) == 3:
- x = parts[1].strip()
- if flag_re.match(x):
- flag = x
- note = parts[2].strip()
- else:
- flag = None
- note = parts[1] + ':' + parts[2]
-
- pkg = packages.get(name, None)
- if pkg is None:
- warn("Package note for missing package: {}".format(name))
- continue
-
- if flag is not None:
- pkg.flag = flag
- if note is not None:
- pkg._note = note
-done()
+# Add package notes to packages
+for name, note, flag in read_package_notes():
+ pkg = packages.get(name, None)
+ if pkg is None:
+ warn("Package note for missing package: {}".format(name))
+ continue
+
+ if flag is not None:
+ pkg.flag = flag
+ if note is not None:
+ pkg._note = note
#
# Get summary information for unmatched files
reply other threads:[~2026-09-11 14:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913761903.1.8595467144102696125.flatpaks-flatpak-runtime-75b2f241059f@fedoraproject.org \
--to=otaylor@fishsoup.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox