On Thu, Feb 16, 2012 at 9:05 AM, Johannes Meixner <jsmeix@suse.de> wrote:
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} ----------------------------------------------------------
But then it is still possible that main-package and sub-package with exact matching version-release are installed but both come from totally different OBS projects/repositories (e.g. with different patches or whatever kind of differences).
Is there a way to specify a 'same build' RPM dependency?
By the way: The RPM documentation http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html and /usr/share/doc/packages/rpm/manual/dependencies (in rpm-4.8.0 in openSUSE 11.4) does not show a comparison operator for "not equal" so that two Conflicts with '<' and '>' are used.
Kind Regards Johannes Meixner
2 ideas, neither elegant (ie. both ugly) 1) Use a version suffix that is unique to each repo: Version: 1.2.3+%reponame Then you would need to define reponame uniquely in each specfile. I believe the syntax for version allows alphanumeric after a + sign, so at least the reponame could be meaningful to a human. Is there a predefined %reponame like variable? If so, that would be far preferred over a manually maintained one. I don't know what side effects this would have for zypper managing updates, etc. 2) Similar but use the Release instead. I think the release has to be numeric? Anyway, I have noticed that if you specify a release as 2.0, etc., then OBS will leave the 2 unchanged and do its auto-release numbering just to the trailing 0. So you could do: Release: %reponumber.0 Then have a well enumerated list of reponumbers defined in the specfile. One obvious negative with this is that zypper would prefer higher numbered Releases, but since zypper up won't change repos, it should not be *too bad* for the enduser to track. fyi: I don't know if this treatment of Releases is by design, or a side-effect of the implementation process. If a side-effect it might fail in the future. Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org