[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#585844: dpkg-cross: Please add version mangling



Simon Richter <sjr@debian.org> writes:

> Package: dpkg-cross
> Version: 2.5.8
> Severity: wishlist
>
> Hi,
>
> When resolving the "duplicate Provides" issue in a repository of
> pre-built -cross packages, I've come across the problem that it's
> difficult to generate packages with an increased version number.
>
> It would be nice to have a way to append things to the version number,
> both for the Version field and for equal-version dependencies (so -dev
> packages can be transformed); the caller can be expected to provide a
> list of packages where dependency versions should be mangled.
>
> Use case:
>
>  - zlib1g-armel-cross and zlib1g-dev-armel-cross exist in version
>    1:1.2.3.4.dfsg-3, with the "duplicate Provides" bug, and zlib1g-dev
>    declares a dependency on "zlib1g-armel-cross (= 1:1.2.3.4.dfsg-3)".
>
>  - User wants to build a version "1:1.2.3.4.dfsg-3++dpkg-cross1" of both
>    packages.
>
>  - The resulting -dev package needs to declare a dependency on
>    "zlib1g-dev-armel-cross (= 1:1.2.3.4.dfsg-3++dpkg-cross1)".
>
>  - The dependency from zlib1g-armel-cross to libc6-armel-cross does not
>    need to be adjusted.
>
> The user can then call
>
> dpkg-cross -a armel --append-version "++dpkg-cross1" -b zlib1g_1%3a1.2.3.4.dfsg-3_armel.deb
> dpkg-cross -a armel --append-version "++dpkg-cross1" --mangle-dependency-version zlib1g -b zlib1g-dev1%3a1.2.3.4.dfsg-3_armel.deb

What if you have libc6 with "++dpkg-cross23" and zlib1g with
"++dpkg-cross42" and want zlib1g-dev with "++dpkg-cross666"? The version
to append would be specific for each package. That quickly gets out of
hand.

> Obviously, the option names are not ideal.

In ia32-apt-get / apt-ma-emu I always mangle the version to include the
version of the mangling script, because:

1) That way updating the mangling script (dpkg-cross in this case) and
converting the zlib1g-dev again would also require converting zlib1g
itself again. Versioned depends with = require that both packages are
converted by the same version of dpkg-cross.

2) Converting a package with a newer version of dpkg-cross results in a
higher version of the converted package. That means that the new package
can be put into an apt repository and will update on the users
system. No need to reinstall the package manually.

3) No list of packages needed.

I also use a ~ in the mangling so the mangled version is always lower
than the original. The reason for that is that mangling a binary will
not change the name of the package and the original package should be
prefered. This is specific to multiarch use though.

Altogether the zlib1g version would be 1:1.2.3.4.dfsg-3~dpkg-cross.17.

When I fix a bug in the mangling tool (dpkg-cross in your case) I bump
the version, compile, install and then converted package automatically
get a new version. The drawback is that raising the version in dpkg-cross
means packages must be converted again to ensure version
compatibility. Every time I update ia32-apt-get / apt-ma-emu the next
apt-get upgrade always reinstalls all -cross packages that are
installed. But that is the only simple solution I found to get fixes in
the converter to get applied to the installed packages.

If you really need to reconvert a package with the same orig deb and
dpkg-cross version then a minor revision could be added much like you
suggested. But given the complexity that easily leads to I would rather
bump the dpkg-cross version instead when needed.

Note: In ia32-apt-get / apt-ma-emu I use another ~ for developement
builds (24 -> 25~1 -> 25~2 -> 25~3 ...) and then drop that for the final
build (25). Otherwise the releases would show many gaps in their
versions. Just thinking about this you can even automate it so every
build of an UNRELEASED version bumps the version automatically.

MfG
        Goswin



Reply to: