Skip to content

Commit

Permalink
add missed rosdistro in super's get_subs_hooks
Browse files Browse the repository at this point in the history
This commit add the missed rosdistro when call super's get_subs_hook
in rosdebian or rosrpm. The release_history should be passed as **kwargs
format since it have default value already.
And I also combine two line in get_release_tag method since it's not
exceed 120 lines.
  • Loading branch information
lennonwoo committed Jul 3, 2019
1 parent d1aa11c commit 8c23028
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions bloom/generators/rosdebian.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from bloom.generators.common import generate_substitutions_from_package
from bloom.generators.common import sanitize_package_name


from bloom.generators.debian import DebianGenerator
from bloom.generators.debian import format_description
from bloom.generators.debian import format_depends
Expand Down Expand Up @@ -81,7 +80,7 @@ def missing_dep_resolver(key, peer_packages, os_name, os_version, ros_distro):

@staticmethod
def get_subs_hook(subs, package, rosdistro, releaser_history=None):
subs = DebianGenerator.get_subs_hook(subs, package, releaser_history)
subs = DebianGenerator.get_subs_hook(subs, package, rosdistro, releaser_history=releaser_history)
subs['Package'] = rosify_package_name(subs['Package'], rosdistro)

# ROS 2 specific bloom extensions.
Expand Down Expand Up @@ -127,8 +126,7 @@ def generate_branching_arguments(self, package, branch):
return args

def get_release_tag(self, data):
return 'release/{0}/{1}/{2}-{3}'\
.format(self.rosdistro, data['Name'], data['Version'], self.inc)
return 'release/{0}/{1}/{2}-{3}'.format(self.rosdistro, data['Name'], data['Version'], self.inc)


def rosify_package_name(name, rosdistro):
Expand Down
5 changes: 2 additions & 3 deletions bloom/generators/rosrpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def missing_dep_resolver(key, peer_packages, os_name, os_version, ros_distro):

@staticmethod
def get_subs_hook(subs, package, rosdistro, releaser_history=None):
subs = RpmGenerator.get_subs_hook(subs, package, releaser_history)
subs = RpmGenerator.get_subs_hook(subs, package, rosdistro, releaser_history=releaser_history)
subs['Package'] = rosify_package_name(subs['Package'], rosdistro)
return subs

Expand All @@ -93,8 +93,7 @@ def generate_branching_arguments(self, package, branch):
return args

def get_release_tag(self, data):
return 'release/{0}/{1}/{2}-{3}'\
.format(self.rosdistro, data['Name'], data['Version'], self.inc)
return 'release/{0}/{1}/{2}-{3}'.format(self.rosdistro, data['Name'], data['Version'], self.inc)


def rosify_package_name(name, rosdistro):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ....utils.common import temporary_directory
from ....utils.common import user

from bloom.generators.debian.generator import PackageManagerGenerator
from bloom.generators.common import PackageManagerGenerator

from bloom.util import code

Expand Down

0 comments on commit 8c23028

Please sign in to comment.