packaging: SUSEify GitbuilderProject._remove_rpm_repo()
When a job completes, all Ceph packages installed are removed and then the repo
is removed as well. Repo removal fails with:
Running: 'sudo yum -y erase ceph-release'
sudo: yum: command not found
@@ -78,6 +78,7 @@ def install_package(package, remote):
'install',
'{package}'.format(package=package)]
elif flavor == 'rpm':
+ # FIXME: zypper
pkgcmd = ['sudo',
'yum',
'-y',
@@ -103,6 +104,7 @@ def remove_package(package, remote):
'purge',
'{package}'.format(package=package)]
elif flavor == 'rpm':
+ # FIXME: zypper
pkgcmd = ['sudo',
'yum',
'-y',
@@ -791,7 +793,6 @@ class GitbuilderProject(object):
url = "{base_url}/noarch/{rpm_name}".format(
base_url=self.base_url, rpm_name=rpm_name)
if dist_release in ['opensuse', 'sle']:
- # no point in pretending ceph-release RPM is used in SUSE
url = "{base_url}/{arch}".format(
base_url=self.base_url, arch=self.arch)
self.remote.run(args=[
@@ -825,6 +826,11 @@ class GitbuilderProject(object):
self._remove_deb_repo()
def _remove_rpm_repo(self):
+ if self.dist_release in ['opensuse', 'sle']:
+ self.remote.run(args=[
+ 'sudo', 'zypper', '-n', 'removerepo', 'ceph-rpm'
+ ])
+ else:
remove_package('%s-release' % self.project, self.remote)
def _remove_deb_repo(self):
@@ -983,6 +989,7 @@ class ShamanProject(GitbuilderProject):
)
def _remove_rpm_repo(self):
+ # FIXME: zypper
self.remote.run(
args=[
'sudo',
