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
3af1ffe9
Commit
3af1ffe9
authored
5 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
Make it possible to skip debug-symbols packages
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
77a8ad48
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/debos-runtimes.yaml
+5
-0
5 additions, 0 deletions
flatdeb/debos-runtimes.yaml
run.py
+59
-14
59 additions, 14 deletions
run.py
with
64 additions
and
14 deletions
flatdeb/debos-runtimes.yaml
+
5
−
0
View file @
3af1ffe9
...
...
@@ -23,6 +23,7 @@
{{
- $sources_directory
:
= or .sources_directory "" -
}}
{{
- $sources_prefix
:
= or .sources_prefix (printf "%s-sources" $artifact_prefix) -
}}
{{
- $sources_tarball
:
= or .sources_tarball "" -
}}
{{
- $debug_symbols
:
= or .debug_symbols "" -
}}
{{
- $debug_prefix
:
= or .debug_prefix (printf "%s-debug" $artifact_prefix) -
}}
{{
- $debug_tarball
:
= or .debug_tarball (printf "%s.tar.gz" $debug_prefix) -
}}
...
...
@@ -241,6 +242,7 @@ actions:
chroot
:
true
script
:
symlink-alternatives
{{
if $debug_symbols
}}
-
action
:
run
label
:
dbgsym-use-build-id
chroot
:
false
...
...
@@ -249,6 +251,7 @@ actions:
if [ -d "$ROOTDIR/usr/lib/debug" ]; then
"$RECIPEDIR/dbgsym-use-build-id" --debug-dir "$ROOTDIR/usr/lib/debug"
fi
{{
end
}}
{{
if $sdk
}}
-
action
:
run
...
...
@@ -300,6 +303,7 @@ actions:
.
{{
end
}}
{{
if $debug_symbols
}}
-
action
:
run
label
:
pack debug symbols
chroot
:
false
...
...
@@ -313,6 +317,7 @@ actions:
--use-compress-program="pigz -n --rsyncable"
-C "$ROOTDIR/debug"
.
{{
end
}}
-
action
:
run
label
:
list of included source code
...
...
This diff is collapsed.
Click to expand it.
run.py
+
59
−
14
View file @
3af1ffe9
...
...
@@ -240,6 +240,7 @@ class Builder:
self
.
variant_id
=
None
self
.
sdk_variant_name
=
None
self
.
sdk_variant_id
=
None
self
.
debug_symbols
=
True
self
.
logger
=
logger
.
getChild
(
'
Builder
'
)
...
...
@@ -471,6 +472,9 @@ class Builder:
parser
.
add_argument
(
'
--no-apt-debug
'
,
dest
=
'
apt_debug
'
,
action
=
'
store_false
'
)
parser
.
add_argument
(
'
--debug-symbols
'
,
action
=
'
store_true
'
)
parser
.
add_argument
(
'
--no-debug-symbols
'
,
dest
=
'
debug_symbols
'
,
action
=
'
store_false
'
)
subparser
=
subparsers
.
add_parser
(
'
base
'
,
...
...
@@ -522,6 +526,7 @@ class Builder:
self
.
apt_debug
=
args
.
apt_debug
self
.
build_area
=
args
.
build_area
self
.
build_id
=
args
.
build_id
self
.
debug_symbols
=
args
.
debug_symbols
self
.
variant_name
=
args
.
variant_name
self
.
variant_id
=
args
.
variant_id
self
.
sdk_variant_name
=
args
.
sdk_variant_name
...
...
@@ -759,6 +764,13 @@ class Builder:
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
build_id:{}
'
.
format
(
self
.
build_id
))
if
self
.
debug_symbols
:
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
debug_symbols:true
'
)
else
:
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
debug_symbols:
'
)
if
self
.
variant_name
is
not
None
:
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
variant:{}
'
.
format
(
self
.
variant_name
))
...
...
@@ -835,6 +847,35 @@ class Builder:
return
buf
.
decode
(
'
ascii
'
)
def
get_runtime_packages
(
self
,
descriptors
,
# type: typing.Iterable[typing.Any]
multiarch
=
False
):
# type: (...) -> typing.Iterable[str]
for
d
in
descriptors
:
if
isinstance
(
d
,
dict
):
assert
len
(
d
)
==
1
p
=
next
(
iter
(
d
))
details
=
d
[
p
]
else
:
assert
isinstance
(
d
,
str
)
p
=
d
details
=
{}
if
(
details
.
get
(
'
debug_symbols
'
,
False
)
and
not
self
.
debug_symbols
):
continue
if
details
.
get
(
'
multiarch
'
,
multiarch
):
for
a
in
self
.
dpkg_archs
:
yield
p
+
'
:
'
+
a
else
:
yield
p
def
command_runtimes
(
self
,
*
,
...
...
@@ -901,13 +942,13 @@ class Builder:
# Do the Platform first, because we download its source
# packages as part of preparing the Sdk
for
sdk
in
(
False
,
True
):
packages
=
list
(
self
.
runtime_
details
.
get
(
'
add_
packages
'
,
[]))
for
p
in
self
.
runtime_details
.
get
(
'
add_packages_multiarch
'
,
[]
):
for
a
in
self
.
dpkg_archs
:
packages
.
append
(
p
+
'
:
'
+
a
)
packages
=
list
(
self
.
get_
runtime_packages
(
self
.
runtime_details
.
get
(
'
add_packages
'
,
[])
))
packages
.
extend
(
self
.
get_runtime_packages
(
self
.
runtime_details
.
get
(
'
add_packages_multiarch
'
,
[]),
multiarch
=
True
,
)
)
if
sdk
:
runtime
=
prefix
+
'
.Sdk
'
...
...
@@ -1047,7 +1088,6 @@ class Builder:
sources_tarball
+
'
.new
'
))
sdk_details
=
self
.
runtime_details
.
get
(
'
sdk
'
,
{})
sdk_packages
=
list
(
sdk_details
.
get
(
'
add_packages
'
,
[]))
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
sdk:yes
'
)
argv
.
append
(
'
-t
'
)
...
...
@@ -1057,9 +1097,13 @@ class Builder:
argv
.
append
(
'
-t
'
)
argv
.
append
(
'
sources_prefix:
'
+
sources_prefix
)
for
p
in
sdk_details
.
get
(
'
add_packages_multiarch
'
,
[]):
for
a
in
self
.
dpkg_archs
:
sdk_packages
.
append
(
p
+
'
:
'
+
a
)
sdk_packages
=
list
(
self
.
get_runtime_packages
(
sdk_details
.
get
(
'
add_packages
'
,
[])
))
sdk_packages
.
extend
(
self
.
get_runtime_packages
(
sdk_details
.
get
(
'
add_packages_multiarch
'
,
[]),
multiarch
=
True
,
))
if
sdk_packages
:
logger
.
info
(
'
Installing extra packages for SDK:
'
)
...
...
@@ -1149,10 +1193,11 @@ class Builder:
os
.
rename
(
output
+
'
.new
'
,
output
)
output
=
os
.
path
.
join
(
self
.
build_area
,
debug_tarball
)
os
.
rename
(
output
+
'
.new
'
,
output
)
if
self
.
debug_symbols
:
output
=
os
.
path
.
join
(
self
.
build_area
,
debug_tarball
)
os
.
rename
(
output
+
'
.new
'
,
output
)
if
self
.
ostree_commit
:
if
self
.
ostree_commit
and
self
.
debug_symbols
:
logger
.
info
(
'
Committing %s to OSTree
'
,
debug_tarball
)
subprocess
.
check_call
([
'
time
'
,
...
...
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