Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tor-reproducer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
briar
tor-reproducer
Commits
b741fa9f
Verified
Commit
b741fa9f
authored
2 years ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Fix problem with different values of BUILD_DIR in create_sources_jar()
parent
a36fff2d
No related branches found
No related tags found
1 merge request
!32
Fix problem with different values of BUILD_DIR in create_sources_jar()
Pipeline
#14887
passed with warnings
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
upstream/build_tor_macos.py
+1
-1
1 addition, 1 deletion
upstream/build_tor_macos.py
utils.py
+6
-6
6 additions, 6 deletions
utils.py
with
7 additions
and
7 deletions
upstream/build_tor_macos.py
+
1
−
1
View file @
b741fa9f
...
@@ -34,7 +34,7 @@ def setup():
...
@@ -34,7 +34,7 @@ def setup():
check_call
([
'
git
'
,
'
submodule
'
,
'
update
'
],
cwd
=
Path
(
BUILD_DIR
))
check_call
([
'
git
'
,
'
submodule
'
,
'
update
'
],
cwd
=
Path
(
BUILD_DIR
))
# create sources jar before building
# create sources jar before building
jar_name
=
create_sources_jar
(
versions
,
PLATFORM
)
jar_name
=
create_sources_jar
(
versions
,
PLATFORM
,
BUILD_DIR
)
return
versions
,
jar_name
return
versions
,
jar_name
...
...
This diff is collapsed.
Click to expand it.
utils.py
+
6
−
6
View file @
b741fa9f
...
@@ -74,7 +74,7 @@ def setup(platform):
...
@@ -74,7 +74,7 @@ def setup(platform):
prepare_repos
(
versions
)
prepare_repos
(
versions
)
# create sources jar before building
# create sources jar before building
jar_name
=
create_sources_jar
(
versions
,
platform
)
jar_name
=
create_sources_jar
(
versions
,
platform
,
BUILD_DIR
)
return
versions
,
jar_name
return
versions
,
jar_name
...
@@ -183,10 +183,10 @@ def reset_time(filename, versions):
...
@@ -183,10 +183,10 @@ def reset_time(filename, versions):
check_call
([
'
touch
'
,
'
--no-dereference
'
,
'
-t
'
,
versions
[
'
timestamp
'
],
filename
])
check_call
([
'
touch
'
,
'
--no-dereference
'
,
'
-t
'
,
versions
[
'
timestamp
'
],
filename
])
def
create_sources_jar
(
versions
,
platform
):
def
create_sources_jar
(
versions
,
platform
,
build_dir
):
output_dir
=
get_output_dir
(
platform
)
output_dir
=
get_output_dir
(
platform
)
jar_files
=
[]
jar_files
=
[]
for
root
,
dir_names
,
filenames
in
os
.
walk
(
BUILD_DIR
):
for
root
,
dir_names
,
filenames
in
os
.
walk
(
build_dir
):
for
f
in
filenames
:
for
f
in
filenames
:
if
'
/.git
'
in
root
:
if
'
/.git
'
in
root
:
continue
continue
...
@@ -195,13 +195,13 @@ def create_sources_jar(versions, platform):
...
@@ -195,13 +195,13 @@ def create_sources_jar(versions, platform):
reset_time
(
file
,
versions
)
reset_time
(
file
,
versions
)
jar_name
=
get_sources_file_name
(
versions
,
platform
)
jar_name
=
get_sources_file_name
(
versions
,
platform
)
jar_path
=
os
.
path
.
abspath
(
jar_name
)
jar_path
=
os
.
path
.
abspath
(
jar_name
)
rel_paths
=
[
os
.
path
.
relpath
(
f
,
BUILD_DIR
)
for
f
in
sorted
(
jar_files
)]
rel_paths
=
[
os
.
path
.
relpath
(
f
,
build_dir
)
for
f
in
sorted
(
jar_files
)]
# create jar archive with first files
# create jar archive with first files
jar_step
=
5000
jar_step
=
5000
check_call
([
'
jar
'
,
'
cf
'
,
jar_path
]
+
rel_paths
[
0
:
jar_step
],
cwd
=
BUILD_DIR
)
check_call
([
'
jar
'
,
'
cf
'
,
jar_path
]
+
rel_paths
[
0
:
jar_step
],
cwd
=
build_dir
)
# add subsequent files in steps, because the command line can't handle all at once
# add subsequent files in steps, because the command line can't handle all at once
for
i
in
range
(
jar_step
,
len
(
rel_paths
),
jar_step
):
for
i
in
range
(
jar_step
,
len
(
rel_paths
),
jar_step
):
check_call
([
'
jar
'
,
'
uf
'
,
jar_path
]
+
rel_paths
[
i
:
i
+
jar_step
],
cwd
=
BUILD_DIR
)
check_call
([
'
jar
'
,
'
uf
'
,
jar_path
]
+
rel_paths
[
i
:
i
+
jar_step
],
cwd
=
build_dir
)
return
jar_name
return
jar_name
...
...
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