Skip to content

Commit

Permalink
Change the dpkg default behavior in slave, and docker-base, in order …
Browse files Browse the repository at this point in the history
…to prevent prompt (#3879)

* Change the dpkg default behavior in slave, and docker-base, in order to prevent prompt
* Move to right place
  • Loading branch information
qiluo-msft committed Dec 13, 2019
1 parent ef26ba0 commit 13eec88
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
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

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

0 comments on commit 13eec88

Please sign in to comment.