![](https://seccdn.libravatar.org/avatar/5cdd10d836bdda3796cf6bc1ab2d5a78.jpg?s=120&d=mm&r=g)
Quoting Johannes Meixner <jsmeix@suse.de>:
Hello,
I have a package made from a single source tar ball where I split stuff which requires X11 into a sub-package so that the main-package can be installed on a system without X11.
Because the stuff in the sub-package could have any kind of subtle dependency on the stuff in the main-package, I like to make sure that the sub-package requires the 100% exact matching main-package.
Furthermore, when the sub-package is installed, I like to make sure that the main-package cannot be changed without changing the sub-package accordingly.
In the end I like that the sub-package and the main-package must come from the same build where both the main-package and its sub-package have been made.
An approximation could be:
foo.spec ---------------------------------------------------------- Name: foo Conflicts: foo-x11 < %{version}-%{release} Conflicts: foo-x11 > %{version}-%{release} ... %package x11 Requires: foo = %{version}-%{release} ----------------------------------------------------------
you could probably do something alone those lines (paraphrasing): foo.spec %define build_md5 %(md5sum(%date%-%time)) [...] Provides: foo(%build_md5) = %{version}-%{release} %package x11 Requires: foo(%build_md5} = %{version}-%{release} === %date%-%time% above of course needs to be written in proper shell to give you something useful.. you can mix in anything you wish... This should help to have foo-x11 really only installable in the same situation. (Of course in theory this can still be matched by a rogue packager to get your md5 and tweak version/release to be installable... but then you have a rogue packager and nobody could stop the user from doing rpm -i --nodeps anyway. Hope that gets you on track, Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org