-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Replaced apt with apt-get #804
Conversation
@ashnamehrotra, can you check it once, if it is okay |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #804 +/- ##
=======================================
Coverage 46.42% 46.42%
=======================================
Files 18 18
Lines 2182 2182
=======================================
Hits 1013 1013
Misses 1111 1111
Partials 58 58 ☔ View full report in Codecov by Sentry. |
6eae7e1
to
db4fbbc
Compare
} else { | ||
// if updates is not specified, update all packages | ||
installCmd = `sh -c "output=$(apt upgrade -y && apt clean -y && apt autoremove 2>&1); if [ $? -ne 0 ]; then echo "$output" >>error_log.txt; fi"` | ||
installCmd = `sh -c "output=$(apt-get upgrade -y && apt-get clean -y && apt-get autoremove 2>&1); if [ $? -ne 0 ]; then echo "$output" >>error_log.txt; fi"` |
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.
it seems like this command is not downloading the packages, resulting in the error for the test cases with no report
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.
let me check
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.
@ashnamehrotra, could you check it once, and this too
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.
it looks like results manifest file is not found, so the packages are not found/downloaded correctly. There is also a log output line 2: packages.txt: No such file or directory
. Would you be able to run the apt-get commands manually in a container to see if they are working as expected?
db4fbbc
to
1ae874b
Compare
pkg/pkgmgr/dpkg.go
Outdated
@@ -411,7 +411,7 @@ func (dm *dpkgManager) unpackAndMergeUpdates(ctx context.Context, updates unvers | |||
while IFS=':' read -r package version; do | |||
pkg_name=$(echo "$package" | sed 's/^"\(.*\)"$/\1/') | |||
pkg_version=$(echo "$version" | sed 's/^"\(.*\)"$/\1/') | |||
latest_version=$(apt show $pkg_name 2>/dev/null | awk -F ': ' '/Version:/{print $2}') | |||
latest_version=$(apt-get show $pkg_name 2>/dev/null | awk -F ': ' '/Version:/{print $2}') |
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.
apt-get show
is not a valid command
website/docs/faq.md
Outdated
@@ -43,7 +43,7 @@ Experimental: This feature might change without preserving backwards compatibili | |||
|
|||
::: | |||
|
|||
Copa does not support replacing the repositories in the package managers with alternatives. Images must already use the intended package repositories. For example, for debian, updating `/etc/apt/sources.list` from `http://archive.ubuntu.com/ubuntu/` to a mirror, such as `https://mirrors.wikimedia.org/ubuntu/`. | |||
Copa does not support replacing the repositories in the package managers with alternatives. Images must already use the intended package repositories. For example, for debian, updating `/etc/apt-get/sources.list` from `http://archive.ubuntu.com/ubuntu/` to a mirror, such as `https://mirrors.wikimedia.org/ubuntu/`. |
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.
there's no /etc/apt-get
dir
pkg/pkgmgr/dpkg.go
Outdated
@@ -24,7 +24,7 @@ const ( | |||
dpkgLibPath = "/var/lib/dpkg" | |||
dpkgStatusPath = dpkgLibPath + "/status" | |||
dpkgStatusFolder = dpkgLibPath + "/status.d" | |||
dpkgDownloadPath = "/var/cache/apt/archives" | |||
dpkgDownloadPath = "/var/cache/apt-get/archives" |
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.
/var/cache/apt-get
is not a valid dir
please make sure these exist before find and replace
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.
see comments
@prakrit55 looks like there's a lint issue |
there are some other instances of apt in the docs, let me cover those too |
Signed-off-by: Griffin <prakritimandal611@gmail.com>
Signed-off-by: Griffin <prakritimandal611@gmail.com>
6a7d018
to
01e4f01
Compare
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.
Thank you! LGTM
Signed-off-by: Griffin <prakritimandal611@gmail.com> Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com> Signed-off-by: shubhamsugara22 <shubhamsugara22@gmail.com>
Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...
Closes #787