Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Don't add old stable-phone-overlay PPA. (#45)
Browse files Browse the repository at this point in the history
* Don't add old stable-phone-overlay PPA.

* Move addition of UBports repo.

We need to ensure apt-transport-https is installed before we can use
the HTTPS repo for UBports. So install that package, and write out the
ubports.list file after, and udpate the packages again.

* Need to install GPG key for UBports repo.

We need to install some additional packges, and get the GPG key for the
UBports repo, before adding the repo and updating apt.

* Install wget/gpg differently.
  • Loading branch information
dobey authored and UniversalSuperBox committed Jul 7, 2019
1 parent a9517f5 commit ca0649d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions python/libertine/ChrootContainer.py
Expand Up @@ -127,15 +127,15 @@ def create_libertine_container(self, password=None, multiarch=False):
self.destroy_libertine_container()
return False

if self.installed_release == "vivid" or self.installed_release == "xenial":
utils.get_logger().info(utils._("Installing the Stable Overlay PPA..."))
if not self.install_package("software-properties-common", update_cache=False):
utils.get_logger().error(utils._("Failure installing software-properties-common during container creation"))
self.destroy_libertine_container()
return False

self.run_in_container("add-apt-repository ppa:ci-train-ppa-service/stable-phone-overlay -y")
self.update_packages()
# We need to add the UBports HTTPS repo after apt-transport-https is
# installed, so that update will not fail on not supporting HTTPS.
self.run_in_container('apt install -y gnupg2 gpgv wget')
self.run_in_container('wget https://repo.ubports.com/keyring.gpg -O /tmp/ubports.key')
self.run_in_container('apt-key add /tmp/ubports.key')
with open(os.path.join(self.root_path, 'etc', 'apt', 'sources.list.d', 'ubports.list'), 'w+') as fd:
fd.write('\n\n# UBports repo to match rootfs\n')
fd.write('deb https://repo.ubports.com {} main\n'.format(self.installed_release))
self.update_packages()

# Check if the container was created as root and chown the user directories as necessary
chown_recursive_dirs(utils.get_libertine_container_home_dir(self.container_id))
Expand Down
1 change: 1 addition & 0 deletions python/libertine/Libertine.py
Expand Up @@ -90,6 +90,7 @@ def __init__(self, container_id, container_type, config, service):
self.locale = self._config.get_container_locale(container_id)
self.language = self._get_language_from_locale()
self.default_packages = ['libnss-extrausers',
'apt-transport-https',
'humanity-icon-theme',
'maliit-inputcontext-gtk2',
'maliit-inputcontext-gtk3',
Expand Down

0 comments on commit ca0649d

Please sign in to comment.