Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.devtools
Commits
38b73717
Commit
38b73717
authored
Oct 23, 2019
by
André Anjos
💬
Browse files
[mirror] Do not remove remove/revoke sessions from patch (good to keep)
parent
3a065d15
Pipeline
#34666
passed with stages
in 5 minutes and 56 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/devtools/mirror.py
View file @
38b73717
...
...
@@ -319,17 +319,3 @@ def copy_and_clean_json(url, dest_dir, arch, name):
packages
=
get_local_contents
(
dest_dir
,
arch
)
data
=
_cleanup_json
(
data
,
packages
)
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
)
bob/devtools/scripts/mirror.py
View file @
38b73717
...
...
@@ -17,7 +17,7 @@ from ..mirror import (
whitelist_filter
,
download_packages
,
remove_packages
,
copy_and_clean_
patch
,
copy_and_clean_
json
,
)
from
..log
import
verbosity_option
,
get_logger
,
echo_info
,
echo_warning
...
...
@@ -187,8 +187,7 @@ def mirror(
# go crazy. Do this before the indexing, that will use that file
# to do its magic.
patch_file
=
'patch_instructions.json'
name
=
copy_and_clean_patch
(
channel_url
,
dest_dir
,
arch
,
patch_file
)
name
=
copy_and_clean_json
(
channel_url
,
dest_dir
,
arch
,
patch_file
)
echo_info
(
"Cleaned copy of %s/%s/%s installed at %s"
%
(
channel_url
,
arch
,
patch_file
,
name
))
...
...
doc/api.rst
View file @
38b73717
...
...
@@ -13,6 +13,7 @@
bob.devtools.changelog
bob.devtools.bootstrap
bob.devtools.build
bob.devtools.mirror
bob.devtools.webdav3.client
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment