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

Change the dpkg default behavior in slave, and docker-base, in order to prevent prompt #3879

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions dockers/docker-base-stretch/dpkg_01_drop
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ path-exclude /usr/share/pyshared/twisted/test*
path-exclude /usr/lib/python*/dist-packages/twisted/test*
path-exclude /usr/share/pyshared/twisted/*/test*
path-exclude /usr/lib/python*/dist-packages/twisted/*/test*

## install the configuration file if it’s currently missing
force-confmiss
## combined with confold: overwrite configuration files that you have not modified
force-confdef
## do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix
force-confold
Copy link
Collaborator

@lguohan lguohan Dec 12, 2019

Choose a reason for hiding this comment

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

should be force-connew, always take new configuration since we are not modifying the config in these dockers. #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When force-confdef and force-confold combined, it means:

  1. old unmodified configuration files will be overwrite by new ones
  2. old modified configuration files will be untouched, and the new version is installed with a .dpkg-dist suffix

In reply to: 357311450 [](ancestors = 357311450)


8 changes: 8 additions & 0 deletions dockers/docker-base/dpkg_01_drop
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ path-exclude /usr/share/pyshared/twisted/test*
path-exclude /usr/lib/python*/dist-packages/twisted/test*
path-exclude /usr/share/pyshared/twisted/*/test*
path-exclude /usr/lib/python*/dist-packages/twisted/*/test*

## install the configuration file if it’s currently missing
force-confmiss
## combined with confold: overwrite configuration files that you have not modified
force-confdef
## do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix
force-confold

8 changes: 8 additions & 0 deletions sonic-slave-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,14 @@ RUN apt-get update && apt-get install -y \
# For kdump-tools
liblzo2-dev

## Config dpkg
## install the configuration file if it’s currently missing
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confmiss"
## combined with confold: overwrite configuration files that you have not modified
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confdef"
## do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confold"

# For smartmontools 6.6-1
RUN apt-get -t stretch-backports install -y debhelper

Expand Down