Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flatdeb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Ludovico de Nittis
flatdeb
Commits
7482785d
Commit
7482785d
authored
Nov 25, 2019
by
Simon McVittie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow collection of source code to be disabled
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
288343ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
9 deletions
+37
-9
flatdeb/debos-runtimes.yaml
flatdeb/debos-runtimes.yaml
+8
-3
run.py
run.py
+29
-6
No files found.
flatdeb/debos-runtimes.yaml
View file @
7482785d
...
...
@@ -21,6 +21,7 @@
{{
- $ostree_prefix
:
= or .ostree_prefix (printf "%s-runtime" $artifact_prefix) -
}}
{{
- $ostree_tarball
:
= or .ostree_tarball (printf "%s.tar.gz" $ostree_prefix) -
}}
{{
- $sources_directory
:
= or .sources_directory "" -
}}
{{
- $collect_source_code
:
= or .collect_source_code false -
}}
{{
- $sources_prefix
:
= or .sources_prefix (printf "%s-sources" $artifact_prefix) -
}}
{{
- $sources_tarball
:
= or .sources_tarball "" -
}}
{{
- $debug_symbols
:
= or .debug_symbols false -
}}
...
...
@@ -160,7 +161,7 @@ actions:
cp "$ROOTDIR/usr/lib/os-release" "$ARTIFACTDIR/{{ $artifact_prefix }}.os-release.txt"
fi
{{
if
$sdk
}}
{{
if
and $sdk $collect_source_code
}}
-
action
:
run
label
:
collect-source-code
chroot
:
false
...
...
@@ -171,7 +172,9 @@ actions:
{{ if $sources_directory }}--output="$ARTIFACTDIR/{{ $sources_directory }}"{{ end }} \
--strip-source-version-suffix="{{ $strip_source_version_suffix }}" \
"$ROOTDIR"
{{
else
}}
{{
end
}}
{{
if not $sdk
}}
-
action
:
run
label
:
copy manifest for SDK
chroot
:
false
...
...
@@ -308,7 +311,7 @@ actions:
files metadata
{{
if $sdk
}}
{{
if $sources_tarball
}}
{{
if
and $collect_source_code
$sources_tarball
}}
-
action
:
run
label
:
pack source code
chroot
:
false
...
...
@@ -341,6 +344,7 @@ actions:
.
{{
end
}}
{{
if $collect_source_code
}}
-
action
:
run
label
:
list of included source code
chroot
:
false
...
...
@@ -350,6 +354,7 @@ actions:
dir="{{ or $sources_directory "$ROOTDIR/src/files" }}"
cp -v "$dir/Sources.gz" "{{ $sources_prefix }}.deb822.gz"
cp -v "$dir/sources.txt" "{{ $sources_prefix }}.sources.txt"
{{
end
}}
-
action
:
run
label
:
list of missing source code
...
...
run.py
View file @
7482785d
...
...
@@ -241,6 +241,7 @@ class Builder:
self
.
sdk_variant_id
=
None
self
.
debug_symbols
=
True
self
.
automatic_dbgsym
=
True
self
.
collect_source_code
=
True
self
.
strict
=
False
self
.
logger
=
logger
.
getChild
(
'Builder'
)
...
...
@@ -492,6 +493,15 @@ class Builder:
help
=
'Do not include corresponding automatic -dbgsym packages '
'for each package in the Platform'
,
)
parser
.
add_argument
(
'--collect-source-code'
,
action
=
'store_true'
,
default
=
True
,
help
=
'Include source code for each package (default)'
,
)
parser
.
add_argument
(
'--no-collect-source-code'
,
dest
=
'collect_source_code'
,
action
=
'store_false'
,
default
=
True
,
help
=
'Do not include source code'
,
)
parser
.
add_argument
(
'--strict'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Make various warnings into fatal errors'
,
...
...
@@ -603,6 +613,8 @@ class Builder:
else
:
self
.
automatic_dbgsym
=
args
.
automatic_dbgsym
self
.
collect_source_code
=
args
.
collect_source_code
self
.
build_apt_sources
=
self
.
generate_apt_sources
(
add
=
args
.
add_apt_source
+
args
.
add_build_apt_source
,
replace
=
args
.
replace_apt_source
+
args
.
replace_build_apt_source
,
...
...
@@ -1095,7 +1107,7 @@ class Builder:
if
generate_source_tarball
is
None
:
generate_source_tarball
=
not
generate_source_directory
if
generate_source_tarball
:
if
self
.
collect_source_code
and
generate_source_tarball
:
sources_tarball
=
sources_prefix
+
'.tar.gz'
argv
.
append
(
'-t'
)
argv
.
append
(
...
...
@@ -1114,6 +1126,13 @@ class Builder:
argv
.
append
(
'-t'
)
if
self
.
collect_source_code
:
argv
.
append
(
'collect_source_code:yes'
)
else
:
argv
.
append
(
'collect_source_code:'
)
argv
.
append
(
'-t'
)
if
self
.
automatic_dbgsym
:
argv
.
append
(
'automatic_dbgsym:yes'
)
else
:
...
...
@@ -1205,10 +1224,14 @@ class Builder:
sources_prefix
+
'.MISSING.txt'
,
)
if
os
.
path
.
exists
(
output
)
and
self
.
strict
:
raise
SystemExit
(
'Some source code was missing: aborting'
)
if
self
.
collect_source_code
:
if
os
.
path
.
exists
(
output
)
and
self
.
strict
:
raise
SystemExit
(
'Some source code was missing: aborting'
)
else
:
with
open
(
output
,
'w'
)
as
writer
:
writer
.
write
(
'EVERYTHING
\n
'
)
if
sysroot_prefix
is
not
None
:
assert
sysroot_tarball
is
not
None
...
...
@@ -1259,7 +1282,7 @@ class Builder:
'--tar-autocreate-parents'
,
])
if
generate_source_tarball
:
if
self
.
collect_source_code
and
generate_source_tarball
:
output
=
os
.
path
.
join
(
self
.
build_area
,
sources_tarball
)
os
.
rename
(
output
+
'.new'
,
output
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment