-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[build] clear dpkg cache and update sources #3732
Conversation
This change is intended to fix the issue with dpkg-query during build process. The symptom is dpkg-query failed to open package info file, usually /var/lib/dpkg/updates/000? This issue happens rarely. Not sure if this change has fully addressed the issue. So far my continuous build test didn't fail. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
looks like there is some build issue with this pr. |
sonic-slave/Dockerfile.j2
Outdated
@@ -363,3 +363,4 @@ RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/d | |||
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list | |||
RUN apt-get -o Acquire::Check-Valid-Until=false update | |||
RUN apt-get -y -o Acquire::Check-Valid-Until=false install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk | |||
RUN dpkg --clear-avail; apt-get update |
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 might fix the build:
RUN dpkg --clear-avail; apt-get update | |
RUN dpkg --clear-avail; apt-get -o Acquire::Check-Valid-Until=false update |
One question, though: would it not work to replace line 364 with this line instead of adding this line here?
Also, do we even still need to build the Jessie-based sonic-slave container any more in the master branch?
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.
Thanks Joe!
I should have tested with master branch before creating the PR. There is enough difference between 201811 and master causing me unable to cherry-pick directly.
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.
Sorry. Looks like I missed something again in the second try.
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.
Strange. I wouldn't think you'd need to make the same change for the Stretch container...
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.
My understanding is that the change is to cleanup the environment.
Master might not need Jessie change and 201811 might not need stretch change. But change both anyways to keep it consistent.
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.
Clarified offline and you have already made the change, but for posterity, I meant that the -o Acquire::Check-Valid-Until=false
option should not be needed when building the Stretch container because there are currently no expired repos (whereas the "jessie-backports" repo is no longer maintained and they are no longer updating its "Valid-Until" date.
retest mellanox please |
retest vs please |
1 similar comment
retest vs please |
Turns out that this change didn't fix the issue. Joe and I discussed. The issue might have come from 2 possible sources:
|
- What I did
Fixes: #119
This change is intended to fix the issue with dpkg-query during build process.
The symptom is dpkg-query failed to open package info file, usually /var/lib/dpkg/updates/000?
This issue happens rarely. Not sure if this change has fully addressed the issue. So far my continuous build test didn't fail.
Signed-off-by: Ying Xie ying.xie@microsoft.com
- How I did it
https://ubuntuforums.org/showthread.php?t=872210
- How to verify it
I made change in 201811 branch initially. Continuous build test was executed there.