Example #1
0
 def pre_rebase(self, destination, msg=None):
     name = destination.split('/')[-1]
     msg = msg if msg is not None else (
         "Releasing package '" + name + "' to: '" + destination + "'"
     )
     info(msg)
     ret = trim(undo=True)
     return 0 if ret < 0 else ret  # Ret < 0 indicates nothing was done
Example #2
0
 def post_rebase(self, destination):
     # Figure out the trim sub dir
     name = destination.split('/')[-1]
     trim_d = [k for k, v in self.packages.iteritems() if v.name == name][0]
     # Execute trim
     if trim_d in ['', '.']:
         return
     return trim(trim_d)
Example #3
0
 def post_rebase(self, destination):
     # If self.packages is not a dict then this is a stack
     # and therefore no trim is needed
     if type(self.packages) is not dict:
         return 0
     # Figure out the trim sub dir
     name = destination.split('/')[-1]
     trim_d = [k for k, v in self.packages.iteritems() if v.name == name][0]
     # Execute trim
     if trim_d in ['', '.']:
         return
     return trim(trim_d)