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

ubports-qa upgrades only the packages related to the PR/MR repo #30

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Fuseteam
Copy link

appearently you can upgrade a specific package by apt installing it

this assumes the package name is the same as the repository name, we may need a more robust way to read the correct package name

@Fuseteam Fuseteam changed the title attempt to upgrade only the related package ubports-qa install upgrades only the package to the PR/MR Mar 6, 2022
@Fuseteam Fuseteam changed the title ubports-qa install upgrades only the package to the PR/MR ubports-qa upgrades only the package to the PR/MR repo Mar 7, 2022
@Fuseteam Fuseteam changed the title ubports-qa upgrades only the package to the PR/MR repo ubports-qa upgrades only the packages related to the PR/MR repo Mar 7, 2022
Copy link
Member

@mardy mardy left a comment

Choose a reason for hiding this comment

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

Added a few remarks, but I also would prefer if this were implemented in python (I'm also fine if the whole script gets rewritten in bash, but this hybrid is not very nice IMHO) :-)

pkgcheck Outdated Show resolved Hide resolved
pkginstall Outdated Show resolved Hide resolved
pkgcheck Outdated Show resolved Hide resolved
pkgremove Outdated Show resolved Hide resolved
pkginstall Outdated Show resolved Hide resolved
branch=$1
pkgs=$(pkgcheck "${branch}")
apt-get update
apt-get install $pkgs
Copy link
Member

Choose a reason for hiding this comment

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

This should be remove, I guess?

Copy link
Author

@Fuseteam Fuseteam Mar 8, 2022

Choose a reason for hiding this comment

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

no actually, we're not really removing packages, we're downgrading packages. originally we were running apt full-upgrade here too
pkginstall will not and should not install something that isn't installed already

i have updated de logs to reflect this

pkgupdate Outdated Show resolved Hide resolved
@Fuseteam
Copy link
Author

Fuseteam commented Mar 8, 2022

Added a few remarks, but I also would prefer if this were implemented in python (I'm also fine if the whole script gets rewritten in bash, but this hybrid is not very nice IMHO) :-)

i don't mind reimplementing it in python fwiw, this was just the easiest way to get something working, as i don't know as much python

actually, after submitting this PR i attempted to reimplement pkgremove in python but appearently python's os.check_output quotes the list of packages breaking apt

@Fuseteam Fuseteam requested a review from mardy March 9, 2022 13:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

None yet

2 participants