Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
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
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
bob
bob.devtools
Commits
38b73717
Commit
38b73717
authored
5 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[mirror] Do not remove remove/revoke sessions from patch (good to keep)
parent
3a065d15
No related branches found
No related tags found
No related merge requests found
Pipeline
#34666
passed
5 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/mirror.py
+0
-14
0 additions, 14 deletions
bob/devtools/mirror.py
bob/devtools/scripts/mirror.py
+2
-3
2 additions, 3 deletions
bob/devtools/scripts/mirror.py
doc/api.rst
+1
-0
1 addition, 0 deletions
doc/api.rst
with
3 additions
and
17 deletions
bob/devtools/mirror.py
+
0
−
14
View file @
38b73717
...
@@ -319,17 +319,3 @@ def copy_and_clean_json(url, dest_dir, arch, name):
...
@@ -319,17 +319,3 @@ def copy_and_clean_json(url, dest_dir, arch, name):
packages
=
get_local_contents
(
dest_dir
,
arch
)
packages
=
get_local_contents
(
dest_dir
,
arch
)
data
=
_cleanup_json
(
data
,
packages
)
data
=
_cleanup_json
(
data
,
packages
)
return
_save_json
(
data
,
dest_dir
,
arch
,
name
)
return
_save_json
(
data
,
dest_dir
,
arch
,
name
)
def
copy_and_clean_patch
(
url
,
dest_dir
,
arch
,
name
):
"""
Copies and cleans conda JSON file
"""
data
=
get_json
(
url
,
arch
,
name
)
packages
=
get_local_contents
(
dest_dir
,
arch
)
data
=
_cleanup_json
(
data
,
packages
)
# cleanup specific patch_instructions.json fields
for
key
in
[
"
remove
"
,
"
revoke
"
]:
data
[
key
]
=
[
k
for
k
in
data
[
key
]
if
k
in
packages
]
return
_save_json
(
data
,
dest_dir
,
arch
,
name
)
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/mirror.py
+
2
−
3
View file @
38b73717
...
@@ -17,7 +17,7 @@ from ..mirror import (
...
@@ -17,7 +17,7 @@ from ..mirror import (
whitelist_filter
,
whitelist_filter
,
download_packages
,
download_packages
,
remove_packages
,
remove_packages
,
copy_and_clean_
patch
,
copy_and_clean_
json
,
)
)
from
..log
import
verbosity_option
,
get_logger
,
echo_info
,
echo_warning
from
..log
import
verbosity_option
,
get_logger
,
echo_info
,
echo_warning
...
@@ -187,8 +187,7 @@ def mirror(
...
@@ -187,8 +187,7 @@ def mirror(
# go crazy. Do this before the indexing, that will use that file
# go crazy. Do this before the indexing, that will use that file
# to do its magic.
# to do its magic.
patch_file
=
'
patch_instructions.json
'
patch_file
=
'
patch_instructions.json
'
name
=
copy_and_clean_patch
(
channel_url
,
dest_dir
,
arch
,
name
=
copy_and_clean_json
(
channel_url
,
dest_dir
,
arch
,
patch_file
)
patch_file
)
echo_info
(
"
Cleaned copy of %s/%s/%s installed at %s
"
%
echo_info
(
"
Cleaned copy of %s/%s/%s installed at %s
"
%
(
channel_url
,
arch
,
patch_file
,
name
))
(
channel_url
,
arch
,
patch_file
,
name
))
...
...
This diff is collapsed.
Click to expand it.
doc/api.rst
+
1
−
0
View file @
38b73717
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
bob.devtools.changelog
bob.devtools.changelog
bob.devtools.bootstrap
bob.devtools.bootstrap
bob.devtools.build
bob.devtools.build
bob.devtools.mirror
bob.devtools.webdav3.client
bob.devtools.webdav3.client
...
...
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