0

I am trying to replace(overwrite) config file of redis-server, which is dependency of the python3-bksystem package (see control file below). For this purpose, I created a package python3-redis-config:

**Package**: python3-bksystem
Architecture: all
Depends: ...
         ...
         redis-server,
         redis-tools,
         python3-redis-config,
         ...

**Package**: python3-redis-config
Architecture: all
Depends: ${misc:Depends},
         ${python3:Depends}
Breaks: python3-bksystem (<< 4.0.18)
Replaces: python3-bksystem (<< 4.0.18)
Description: Redis server configuration file

Content of python3-redis-config.install

conf/redis.conf /etc/redis/redis.conf

I am going by suggestion mentioned in:

https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-and-replacing-packages-replaces

I understand that I am attempting to overwrite(which is intentional), it gives error instead:

dpkg: error processing archive /tmp/apt-dpkg-install-yOplwK/08-python3-redis-config_5.0.2~b10+7_all.deb (--unpack):
trying to overwrite '/etc/redis/redis.conf', which is also in package redis-server 3:3.2.6-3+deb9u3 

21:00:02   /tmp/apt-dpkg-install-2NuFJZ/08-python3-redis-config_5.0.2~b10+7_all.deb
21:00:02  E: Sub-process /usr/bin/dpkg returned an error code (1)

There are similar questions posted, but those were from the end-user perspective. But my query is from configuring Debian packaging(control file above) point of view. Suggestions, please!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.