[opensuse-packaging] guidelines for moving programs between packages
Hi, are there any guidelines on how to move programs from one package to another - while guaranteeing that the program is installed any time (either by the old or by the new package)? The case: su and kill are moved from coreutils to util-linux upstreams. It'd be "quite not so optimal" if an installation would be left behind without them ... Therefore we're trying to add a hack in coreutils.rpm to install the su binary as su-core, and to create a symlink "su" pointing to it in the %post script when "su" does not already exist (i.e. is not yet installed by a newer util-linux.rpm): %post test -e %{_bindir}/su || ln -sv su.core %{_bindir}/su The problem is the order in RPM i.e. when %post is run: According to my tests, it is obviously run _before_ the old version of the coreutils package is uninstalled. Thus, su of the old version is still there, and the symlink is not created. ;-( D: %post(coreutils-8.21-0.x86_64): scriptlet start [...] D: %post(coreutils-8.21-0.x86_64): waitpid(4078) rc 4078 status 0 D: ========== +++ coreutils-8.17-6.2.1 x86_64-linux 0x0 D: erase: coreutils-8.17-6.2.1 has 287 files Cleaning up / removing... [...] D: fini 124755 1 ( 0, 0) 44288 /usr/bin/su The strangest thing is that RPM seems to behave different during `osc build` ... Any ideas? Thank you & have a nice day, Berny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Feb 27, 2013 at 12:41 PM, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
Hi,
are there any guidelines on how to move programs from one package to another - while guaranteeing that the program is installed any time (either by the old or by the new package)?
The case: su and kill are moved from coreutils to util-linux upstreams. It'd be "quite not so optimal" if an installation would be left behind without them ...
As both are always installed on any system anyway, the simplest solution would be to set Conflicts: other-package < version-before-move in each RPM. This would force both of them to be updated in single transaction. Unfortunately I'm not really sure that OBS actually provides monotonically increasing NVR given how R part is calculated. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 02/27/2013 09:56 AM, Andrey Borzenkov wrote:
On Wed, Feb 27, 2013 at 12:41 PM, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
Hi,
are there any guidelines on how to move programs from one package to another - while guaranteeing that the program is installed any time (either by the old or by the new package)?
The case: su and kill are moved from coreutils to util-linux upstreams. It'd be "quite not so optimal" if an installation would be left behind without them ...
As both are always installed on any system anyway, the simplest solution would be to set
Conflicts: other-package < version-before-move
in each RPM. This would force both of them to be updated in single transaction.
Sure, the problem is that I'm not the new package of util-linux including su does not yet exist (and I'm not the maintainer). Hmm, for local testing, I could manually create such a package. Let's see ...
Unfortunately I'm not really sure that OBS actually provides monotonically increasing NVR given how R part is calculated.
I don't understand because I don't know the abbreviations NVR and R, but I'm sure I'll hit that issue soon. ;-) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Feb 27, 2013 at 1:17 PM, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 02/27/2013 09:56 AM, Andrey Borzenkov wrote:
On Wed, Feb 27, 2013 at 12:41 PM, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
Hi,
are there any guidelines on how to move programs from one package to another - while guaranteeing that the program is installed any time (either by the old or by the new package)?
The case: su and kill are moved from coreutils to util-linux upstreams. It'd be "quite not so optimal" if an installation would be left behind without them ...
As both are always installed on any system anyway, the simplest solution would be to set
Conflicts: other-package < version-before-move
in each RPM. This would force both of them to be updated in single transaction.
Sure, the problem is that I'm not the new package of util-linux including su does not yet exist (and I'm not the maintainer).
Hmm, for local testing, I could manually create such a package. Let's see ...
Unfortunately I'm not really sure that OBS actually provides monotonically increasing NVR given how R part is calculated.
I don't understand because I don't know the abbreviations NVR and R, but I'm sure I'll hit that issue soon. ;-)
NVR == Name-Version-Release. As far as I understand, OBS assigns Release as number of commits since project/package had initially been created. So when you branch package Release starts from the beginning. So it can happen - 12.2 is branched and starts with Release 1 - 12.2 is released with Release == 10 (as example) - you continue development on Factory and at some point branch 12.3 - if Version did not change, it may happen that Release in 12.3 will be lower than Release in 12.2, so above Conflicts will not fire. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dnia środa, 27 lutego 2013 12:56:01 Andrey Borzenkov pisze:
On Wed, Feb 27, 2013 at 12:41 PM, Bernhard Voelker
<mail@bernhard-voelker.de> wrote:
Hi,
are there any guidelines on how to move programs from one package to another - while guaranteeing that the program is installed any time (either by the old or by the new package)?
The case: su and kill are moved from coreutils to util-linux upstreams. It'd be "quite not so optimal" if an installation would be left behind without them ...
As both are always installed on any system anyway, the simplest solution would be to set
Conflicts: other-package < version-before-move
in each RPM. This would force both of them to be updated in single transaction.
Unfortunately I'm not really sure that OBS actually provides monotonically increasing NVR given how R part is calculated.
It is irrelevant because upstream should increment the version after adopting su. IMHO, Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 03/02/2013 10:40 AM, Krzysztof Żelechowski wrote:
Dnia środa, 27 lutego 2013 12:56:01 Andrey Borzenkov pisze:
Unfortunately I'm not really sure that OBS actually provides monotonically increasing NVR given how R part is calculated.
It is irrelevant because upstream should increment the version after adopting su.
Yes, that's true: it's util-linux-2.22. ;-) Thanks. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Andrey Borzenkov
-
Bernhard Voelker
-
Krzysztof Żelechowski