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

[Enhancement] debian/conffiles will give prompt if file existing when installing , need a way to supress prompt #323

Merged
merged 1 commit into from
Dec 13, 2019

Conversation

dzhangalibaba
Copy link
Contributor

  • if /var/run/redis/sonic-db/database_config.json doesn't exist
    • "sudo dpkg -i libswsscommon_1.0.0_amd64.deb" work as expected.
  • if /var/run/redis/sonic-db/database_config.json does exist
    • "sudo dpkg -i --force-confold libswsscommon_1.0.0_amd64.deb" will skip the prompt and use the existing file without overwrite.
    • "sudo dpkg -i libswsscommon_1.0.0_amd64.deb" gives prompt, user need to type
    Configuration file '/var/run/redis/sonic-db/database_config.json'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** database_config.json (Y/I/N/O/D/Z) [default=N] ? Y
  • We need to find a way to suppress prompt if we only using "dpkg -i ".

Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com

@dzhangalibaba
Copy link
Contributor Author

@qiluo-msft FYI

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

Block this until we make change in sonic-slave (sonic-net/sonic-buildimage#3879) to prevent prompt

@@ -1,3 +1,4 @@
usr/lib/*/lib*.so.*
usr/share/swss/*.lua
var/run/redis/sonic-db/database_config.json
Copy link
Contributor

Choose a reason for hiding this comment

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

var run usually hold running states, not configuration. why not /etc/sonic/redis/sonic-db/database_config.json.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me try to clarify the reason:
It is the database docker's responsibility to read startup configuration, and generate running configuration. All the downstream components read the "running configuration", and this one is an example.

@dzhangalibaba
Copy link
Contributor Author

@qiluo-msft ready for review since sonic-net/sonic-buildimage#3879 is already merged.

@dzhangalibaba
Copy link
Contributor Author

dzhangalibaba commented Dec 13, 2019

I suggest we merge this change until the latest slave-docker is built and used for building, otherwise it may break the build cause of the prompt.

@qiluo-msft qiluo-msft merged commit 5b55954 into sonic-net:master Dec 13, 2019
@dzhangalibaba dzhangalibaba deleted the p2_debconf branch December 17, 2019 19:56
abdosi pushed a commit that referenced this pull request Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants