This repository was archived by the owner on Dec 12, 2022. It is now read-only.
forked from mariogrip/qa-scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
ubports-qa upgrades only the packages related to the PR/MR repo #30
Open
Fuseteam
wants to merge
13
commits into
ubports:master
Choose a base branch
from
Fuseteam:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
dd5382e
upgrade only the related installed packages
Fuseteam f6b4b5e
use apt-get instead of apt
Fuseteam aed29cc
upgrade only the packages related to pr repos
Fuseteam c97c1f2
downgrades only the related packages ubports-qa remove
Fuseteam f5f3deb
make pkginstall make use of the new pkgcheck
Fuseteam 44f05e3
also utilize pkgcheck for ubports-qa update
Fuseteam 42b5924
actually install all the needed scripts
Fuseteam f3c8a7b
check if $status exists
Fuseteam fe2e22d
quote variables for extra safety
Fuseteam 8bdb818
pass the list of packages directly into the loop
Fuseteam 748d5cb
directly echo in the loop
Fuseteam 2e6669e
start all log line with uppercase xd
Fuseteam ebdff7f
improve the log messages to be more accurate
Fuseteam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
ubports-qa /usr/bin | ||
pkginstall /usr/bin | ||
pkgcheck /usr/bin | ||
pkgremove /usr/bin | ||
pkgupdate /usr/bin | ||
ubports-qa_completion /etc/bash_completion.d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
branch="$1" | ||
arch=$(dpkg --print-architecture) | ||
|
||
case "${branch}" in | ||
"xenial"*) repo="repo.ubports.com";; | ||
*) repo="repo2.ubports.com";; | ||
esac | ||
|
||
while read pkg | ||
do | ||
status=$(apt-cache policy $pkg|awk '/Installed/{print $2}') | ||
if [[ -n "${status}" && "$status" != "(none)" ]]; then | ||
echo -n "${pkg} " | ||
fi | ||
done < <(awk '/Package/{print $2}' /var/lib/apt/lists/${repo}_dists_${branch//_/%5f}_main_binary-${arch}_Packages|uniq) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
branch="$1" | ||
pkgs=$(pkgcheck "$branch") | ||
apt-get install $pkgs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
branch="$1" | ||
pkgs=$(pkgcheck "${branch}") | ||
apt-get update | ||
apt-get install $pkgs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
while read list | ||
do | ||
list=$(basename "${list}") | ||
if [[ "${list}" != "ubports.list" && "${list}" != "ubports-android9.list" ]]; then | ||
list="${list/ubports-/}" | ||
pkgs=$(pkgcheck "${list/.list/}")" "${pkgs} | ||
fi | ||
done < <(ls /etc/apt/sources.list.d/*) | ||
apt-get install ${pkgs} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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