Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flatdeb-steam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
flatdeb-steam
Commits
25dd1678
Commit
25dd1678
authored
7 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
Follow Built-Using metadata when building runtimes
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
6d69c8ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flatdeb/worker.py
+31
-0
31 additions, 0 deletions
flatdeb/worker.py
run.py
+16
-0
16 additions, 0 deletions
run.py
with
47 additions
and
0 deletions
flatdeb/worker.py
+
31
−
0
View file @
25dd1678
...
...
@@ -249,6 +249,37 @@ class NspawnWorker(Worker):
return
ret
def
list_built_using
(
self
):
for
line
in
self
.
check_output
([
'
dpkg-query
'
,
'
-W
'
,
'
-f
'
,
r
'
${Package}\t${Built-Using}\n
'
,
]).
decode
(
'
utf-8
'
).
splitlines
():
built_using
=
line
.
rstrip
(
'
\n
'
)
if
not
built_using
:
continue
assert
'
\t
'
in
built_using
,
built_using
package
,
built_using
=
built_using
.
split
(
'
\t
'
,
1
)
built_using
=
built_using
.
split
(
'
,
'
)
if
not
built_using
:
continue
for
field
in
built_using
:
# The example given in Policy is:
# Built-Using: gcc-4.6 (= 4.6.0-11)
f
=
field
.
replace
(
'
'
,
''
)
# gcc-4.6(=4.6.0-11)
if
not
f
:
continue
assert
'
(=
'
in
f
,
f
source
,
version
=
f
.
split
(
'
(=
'
,
1
)
# gcc-4.6, 4.6.0-11)
assert
version
.
endswith
(
'
)
'
),
version
version
=
version
[:
-
1
]
# 4.6.0-11
yield
package
,
source
,
version
@contextmanager
def
remote_dir_context
(
self
,
path
):
yield
os
.
path
.
normpath
(
os
.
path
.
join
(
self
.
path
,
'
./
'
+
path
))
...
...
This diff is collapsed.
Click to expand it.
run.py
+
16
−
0
View file @
25dd1678
...
...
@@ -918,6 +918,14 @@ class Builder:
package
.
binary
,
package
.
source
,
package
.
source_version
)
self
.
sources_required
.
add
((
package
.
source
,
package
.
source_version
))
logger
.
info
(
'
Listing Built-Using fields for SDK...
'
)
for
package
,
source
,
version
in
nspawn
.
list_built_using
():
logger
.
info
(
'
- %s was Built-Using %s_%s
'
,
package
,
source
,
version
)
self
.
sources_required
.
add
((
source
,
version
))
installed
=
nspawn
.
list_packages_ignore_arch
()
logger
.
info
(
'
Source code required for GPL compliance:
'
)
...
...
@@ -1136,6 +1144,14 @@ class Builder:
package
.
binary
,
package
.
source
,
package
.
source_version
)
self
.
sources_required
.
add
((
package
.
source
,
package
.
source_version
))
logger
.
info
(
'
Listing Built-Using fields for platform...
'
)
for
package
,
source
,
version
in
nspawn
.
list_built_using
():
logger
.
info
(
'
- %s was Built-Using %s_%s
'
,
package
,
source
,
version
)
self
.
sources_required
.
add
((
source
,
version
))
# This has to be last for obvious reasons!
nspawn
.
check_call
([
'
dpkg
'
,
'
--purge
'
,
'
--force-remove-essential
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment