Skip to content
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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sonic-slave-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,4 @@ RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-stretch
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
{%- endif %}
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
RUN dpkg --clear-avail; apt-get update
1 change: 1 addition & 0 deletions sonic-slave/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

@jleveque jleveque Nov 9, 2019

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:

Suggested change
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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor Author

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.

Copy link
Contributor

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.