Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created February 12, 2012 03:46
Show Gist options
  • Select an option

  • Save jan-matejka/1806098 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/1806098 to your computer and use it in GitHub Desktop.
can a recursive bundle work?
bundle agent sysuses(sysuse) {
vars:
"depends[dev_cpk]" slist => { "dev_python" };
"packages[dev_cpk]" slist => { "apg" };
#"depends[dev_python]" slist => { "cf_null" };
"packages[dev_python]" slist => { "setuptools" };
classes:
"abort_bundle" not => "sysuse_${sysuse}";
"has_deps" expression => isvariable("depends[${sysuse}]");
commands:
has_deps::
"/bin/true"
classes => if_ok("sysuse_${depends[${sysuse}]}");
methods:
has_deps::
"dependency ${depends[${sysuse}]}" usebundle => sysuses("${depends[${sysuse}]}");
any::
#"packages ${packages[${sysuse}]}" usebundle => packages_add("${packages[${sysuse}]}");
reports:
linux::
"${sysuse}: depends: ${depends[${sysuse}]}; packages: ${packages[${sysuse}]}";
has_deps::
"${sysuse} HAS DEPS";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment