self.dependencies does not work properly accross different hooks

Bug #1341304 reported by Leo Iannacone
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
deb-o-matic
New
Undecided
Unassigned

Bug Description

It could be really useful to check for module dependencies every time a hook it's called.

for instance, I would like to do something like:

MyModule():
  __init__():
    ...
    self.dependecies = [Module1] // by default depends only on Module1

  pre_chroot():
  // wait for Module1
   ...
    self.dependecies += [Module2] // everything after pre_chroot will depends on Module2

  post_chroot():
  // wait for Module1 and Module2
  ...
  return

Moreover, to me they are not really "closed" dependencies, in the meaning the if they are enabled -> OK, it's cool... If not, never mind, continue my job.

Revision history for this message
Leo Iannacone (l3on) wrote :

A simple workaround is rename the module adding a prefix "ZZZ_" since modules are loaded using listdir(modules_dir)

Revision history for this message
Leo Iannacone (l3on) wrote :

I would be useful implement something like:

self.before = [modules_list] || 'all'
self.after = [modules_list] || 'all'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.