Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Eric Vidal
66
Commits
9c266c2b
Commit
9c266c2b
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
handle enable/disable mark at dependency/requiredby time
parent
410484d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib66/exec/ssexec_tree.c
+24
-2
24 additions, 2 deletions
src/lib66/exec/ssexec_tree.c
with
24 additions
and
2 deletions
src/lib66/exec/ssexec_tree.c
+
24
−
2
View file @
9c266c2b
...
...
@@ -664,7 +664,7 @@ void tree_create(graph_t *g, ssexec_t *info, tree_what_t *what)
* WARNING: The order of the trees are not sorted by dependencies order
*
* !action -> disable
* action ->
dis
able */
* action ->
en
able */
void
tree_master_enable_disable
(
char
const
*
base
,
char
const
*
treename
,
uint8_t
action
)
{
log_flow
()
;
...
...
@@ -1367,7 +1367,7 @@ int ssexec_tree(int argc, char const *const *argv, ssexec_t *info)
goto
freed
;
}
/** groups influence on enable. Apply it first. */
/** groups
have
influence on enable. Apply it first. */
if
(
what
.
groups
)
tree_groups
(
info
->
base
.
s
,
info
->
treename
.
s
,
what
.
gr
)
;
...
...
@@ -1376,6 +1376,18 @@ int ssexec_tree(int argc, char const *const *argv, ssexec_t *info)
tree_depends_requiredby
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
0
,
what
.
ndepends
,
0
)
;
tree_depends_requiredby_deps
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
0
,
what
.
ndepends
,
0
)
;
sa
.
len
=
0
;
size_t
pos
=
0
;
if
(
graph_matrix_get_edge_g_sorted_sa
(
&
sa
,
&
graph
,
info
->
treename
.
s
,
0
,
0
)
<
0
)
log_dieu
(
LOG_EXIT_SYS
,
"get sorted dependency list of tree: "
,
info
->
treename
.
s
)
;
FOREACH_SASTR
(
&
sa
,
pos
)
{
if
(
tree_isenabled
(
info
->
base
.
s
,
sa
.
s
+
pos
))
{
tree_enable_disable
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
1
)
;
break
;
}
}
}
if
(
what
.
requiredby
)
{
...
...
@@ -1383,6 +1395,16 @@ int ssexec_tree(int argc, char const *const *argv, ssexec_t *info)
tree_depends_requiredby
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
1
,
what
.
nrequiredby
,
0
)
;
tree_depends_requiredby_deps
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
1
,
what
.
nrequiredby
,
0
)
;
sa
.
len
=
0
;
size_t
pos
=
0
;
if
(
graph_matrix_get_edge_g_sorted_sa
(
&
sa
,
&
graph
,
info
->
treename
.
s
,
1
,
0
)
<
0
)
log_dieu
(
LOG_EXIT_SYS
,
"get sorted dependency list of tree: "
,
info
->
treename
.
s
)
;
if
(
!
tree_isenabled
(
info
->
base
.
s
,
info
->
treename
.
s
))
{
FOREACH_SASTR
(
&
sa
,
pos
)
tree_enable_disable
(
&
graph
,
info
->
base
.
s
,
sa
.
s
+
pos
,
0
)
;
}
}
if
(
what
.
enable
)
...
...
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