66# https://github.com/Softmotions/autark
77
88META_VERSION=0.9.0
9- META_REVISION=4edc652
9+ META_REVISION=c05460d
1010cd " $( cd " $( dirname " $0 " ) " ; pwd -P) "
1111
1212prev_arg=" "
@@ -62,7 +62,7 @@ cat <<'a292effa503b' > ${AUTARK_HOME}/autark.c
6262#ifndef CONFIG_H
6363#define CONFIG_H
6464#define META_VERSION "0.9.0"
65- #define META_REVISION "4edc652 "
65+ #define META_REVISION "c05460d "
6666#endif
6767#define _AMALGAMATE_
6868#define _XOPEN_SOURCE 700
@@ -3298,13 +3298,8 @@ static struct unit* _unit_for_set(struct node *n, struct node *nn, const char **
32983298 return unit_peek();
32993299}
33003300static void _set_init(struct node *n);
3301- static bool _set_is_force(struct node *n) {
3302- return strcmp(n->value, "set-force") == 0;
3303- }
33043301static void _set_setup(struct node *n) {
3305- if (_set_is_force(n)) {
3306- _set_init(n);
3307- }
3302+ _set_init(n);
33083303 if (n->child && strcmp(n->value, "env") == 0) {
33093304 const char *v = _set_value_get(n);
33103305 if (v) {
@@ -3327,7 +3322,7 @@ static void _set_init(struct node *n) {
33273322 return;
33283323 }
33293324 struct node *nn = unit_env_get_node(unit, key);
3330- if (nn) {
3325+ if (nn && nn != n ) {
33313326 n->recur_next.n = nn;
33323327 }
33333328 unit_env_set_node(unit, key, n);
@@ -3338,7 +3333,7 @@ static const char* _set_value_get(struct node *n) {
33383333 }
33393334 n->recur_next.active = true;
33403335 struct node_foreach *fe = node_find_parent_foreach(n);
3341- if (fe || _set_is_force(n) ) {
3336+ if (fe) {
33423337 if ((uintptr_t) n->impl != (uintptr_t) -1) {
33433338 free(n->impl);
33443339 }
@@ -3398,9 +3393,7 @@ int node_set_setup(struct node *n) {
33983393 n->setup = _set_setup;
33993394 n->value_get = _set_value_get;
34003395 n->dispose = _set_dispose;
3401- if (_set_is_force(n)) {
3402- n->build = _set_build;
3403- }
3396+ n->build = _set_build;
34043397 return 0;
34053398}
34063399#ifndef _AMALGAMATE_
@@ -7337,7 +7330,7 @@ static unsigned _rule_type(const char *key, unsigned *flags) {
73377330 return NODE_TYPE_SUBST;
73387331 } else if (strcmp(key, "^") == 0) {
73397332 return NODE_TYPE_JOIN;
7340- } else if (strcmp(key, "set") == 0 || strcmp(key, "env") == 0 || strcmp(key, "set-force") == 0 ) {
7333+ } else if (strcmp(key, "set") == 0 || strcmp(key, "env") == 0) {
73417334 return NODE_TYPE_SET;
73427335 } else if (strcmp(key, "check") == 0) {
73437336 return NODE_TYPE_CHECK;
0 commit comments