0

I am using a MySQL server and have created a custom .deb package that depends on (and basically wraps) MySQL and performs some customizations in postinst maintainer script.

Now I want to upgrade MySQL to the latest version, which is not provided by APT by default, and requires downloading and installing a package that configures APT to supply later versions of MySQL.

My questions is how can I do this using still a .deb package to do all of that automatically?

I have looked into using pre-depend field of control file to install the configuration package fully before the MySQL wrapper package, but I still need to do apt-get update in the middle, which is not possible to do from the maintainer scripts.

I am trying to stick to debian package format, and not create any custom scripts (outside of maintainer scripts or other options supported by the .deb format)

  • This is not possible purely using a package and its maintainer scripts, since a package being installed cannot modify the installation process. You'd need to have something external. – muru May 16 '19 at 5:17
0

Thanks to @muru for confirming my suspicion.

Indeed we have ended up using a two phased approach, where apt setup requirements are gathered and installed, and only then installing the main package.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.