File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -45,27 +45,28 @@ def resolve_pkgname_from_indexes(pkg_shortname, conda_index):
45
45
return None
46
46
47
47
48
+ def should_skip_pkg (pkg_shortname , vinca_conf ):
49
+ skip = vinca_conf .get ("packages_remove_from_deps" , [])
50
+ if not skip :
51
+ return False
52
+
53
+ if pkg_shortname in skip :
54
+ return True
55
+ if pkg_shortname .replace ('_' , '-' ) in skip :
56
+ return True
57
+
48
58
def resolve_pkgname (pkg_shortname , vinca_conf , distro , is_rundep = False ):
49
59
pkg_names = resolve_pkgname_from_indexes (
50
60
pkg_shortname , vinca_conf ["_conda_indexes" ]
51
61
)
52
62
if pkg_names is None :
53
- if not distro .check_package (pkg_shortname ):
63
+ if not distro .check_package (pkg_shortname ) or should_skip_pkg ( pkg_shortname , vinca_conf ) :
54
64
return []
55
65
else :
56
- if (
57
- "packages_remove_from_deps" in vinca_conf
58
- and vinca_conf ["packages_remove_from_deps" ] is not None
59
- and not (
60
- pkg_shortname .replace ("_" , "-" ) in vinca_conf ["packages_remove_from_deps" ] or
61
- pkg_shortname in vinca_conf ["packages_remove_from_deps" ])
62
- ):
63
- return [
64
- "ros-%s-%s"
65
- % (vinca_conf ["ros_distro" ], pkg_shortname .replace ("_" , "-" ))
66
- ]
67
- else :
68
- return []
66
+ return [
67
+ "ros-%s-%s"
68
+ % (vinca_conf ["ros_distro" ], pkg_shortname .replace ("_" , "-" ))
69
+ ]
69
70
else :
70
71
if is_rundep : # for run dependencies, remove the version
71
72
pkg_names_pinned = []
You can’t perform that action at this time.
0 commit comments