Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Conversation

@UniversalSuperBox
Copy link
Member

It all started as trying to fix ubports-qa not remounting the root filesystem...

This PR makes the script more """Pythonic""" and self-defensive. It also lints the thing and formats it with Black. This all causes a big diff now but should avoid big diffs in the future.

The specific issues fixed are:

  1. It wouldn't remount the system when installing or updating
  2. It was easy for a developer to forget to mount or unmount (which caused point 1)
  3. Failure exits return non-zero now
  4. It used the old style of formatting strings which is generally regarded as bad practice
  5. Remounting read-only will fail if anything wakes up and grabs a file on the rootfs. Handle that and return an error.
  6. It didn't lint.
    a. Some names clobbered built-in keywords.

ubports-qa had a few papercuts. Namely:
1. It wouldn't remount the system when installing or updating
2. It was easy for a developer to forget to mount or unmount
   (which caused point 1)
3. Failure exits return 0
4. It used the old style of formatting strings which is generally
   regarded as bad practice
5. Remounting read-only will fail if anything wakes up and grabs a file
   on the rootfs. Handle that and return an error.
6. It didn't lint.
  a. Some of the function names clobbered built-in keywords.

This fixes that.
Copy link
Member

@mariogrip mariogrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NeoTheThird NeoTheThird merged commit 2bccfbb into master Sep 10, 2018
@NeoTheThird NeoTheThird deleted the xenial_-_qa-mount-on-install branch September 10, 2018 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants