Verified Commit c7835417 authored by Oskar Roesler's avatar Oskar Roesler
Browse files

Fix paths of package git repos in update.py

parent 333b4758
......@@ -48,7 +48,7 @@ class Routines:
@staticmethod
def build_metainfo_dict():
rosdistro_url = \
'https://raw.githubusercontent.com/ros/rosdistro/master/melodic/distribution.yaml'
f'https://raw.githubusercontent.com/ros/rosdistro/master/{get_ros_distro}/distribution.yaml'
rosdistro = yaml.load(requests.get(rosdistro_url, allow_redirects=True).content,
Loader=yaml.BaseLoader)['repositories']
ros_dict = {}
......@@ -79,7 +79,7 @@ class Routines:
def get_ros_distro(self):
config = self.get_config()
return config['CI']['GH_ORGANIZATION'].rstrip("arch")
return config['CI']['GH_ORGANIZATION'].split('-')[1]
@staticmethod
def query_yes_no(question, default="yes"):
......
......@@ -31,7 +31,7 @@ def main(argv):
args = parser.parse_args(argv)
def retry_with_rosdistro_name():
name = "{0}{1}".format(Routines().get_ros_distro(), args.package)
name = "ros-{0}-{1}".format(Routines().get_ros_distro(), args.package)
if os.path.exists(os.path.join(Routines.CACHE_ROOT, "packages/", name)):
try:
commands(args.command, name, args.verbose, args.quiet)
......
......@@ -21,7 +21,7 @@ class Update(Routines):
self.package_info = self.metainfo_dict[self.package]
def update_pkgbuild(self):
os.chdir(os.path.join("./packages", self.package))
os.chdir(self.repos_path)
if not self.package_info.get('pkgver', None):
print('pkgver not in dict: {}'.format(self.package))
return (self.package, 'no_tag')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment