DEV Community

classx
classx

Posted on • Updated on

DEB/RPM meta package

One way to install few packages on the one time, create meta package.
It's easy! The ten line of script and enjoy.

For example, create file my-meta-package.cfg

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: my-meta-package
Version: 1.0.0-1
Maintainer: Your Name <yourname@example.com>
Depends: package-one, package-two, package-three
Description: My meta package
 The meta package
Enter fullscreen mode Exit fullscreen mode

and run

equivs-build my-meta-package.cfg
Enter fullscreen mode Exit fullscreen mode

Should be get my-meta-package-1.0.0-1.noarch.deb package.

Easy!
If packages in repo and allowed to download can do for install

sudo apt install -y my-meta-package-1.0.0-1.noarch.deb
Enter fullscreen mode Exit fullscreen mode

add package-one, package-two, package-three will be installed as dependencies of my-meta-package.

But here has problem if need install (for example) package-one with specific version.

Doing simple change in the my-meta-package.cfg

Depends: package-one (= 0.1.0), package-two, package-three
Enter fullscreen mode Exit fullscreen mode

and run

equivs-build my-meta-package.cfg
Enter fullscreen mode Exit fullscreen mode

still get my-meta-package-1.0.0-1.noarch.deb package.

Try install it and if package-one (= 0.1.0) is latest version in the repo - enjoy. If not and in repo exist package-one version great that 0.1.0 - install meta package will be failed.

RPM package behaves terribly similar. Difference - yum/dnf do not failed but install latest version.

I don't know how fix this issue!!!

Somebody know?

Top comments (0)