[opensuse-packaging] Building a package with older version
Hi, all. Tell me, please, how can I build locally a package with an older version of build dependent package (older than in the repository) with "osc"? Interest options: a) The old version of a depended package is available in some repository, b) The old version of a depended package is available only locally, on HDD. Best regards. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, Sep 17, 2012 at 08:11:42PM +0300, openSUSE user wrote:
Hi, all.
Tell me, please, how can I build locally a package with an older version of build dependent package (older than in the repository) with "osc"? Interest options:
a) The old version of a depended package is available in some repository,
osc build --alternative-project Some:Project some_repository some_arch
b) The old version of a depended package is available only locally, on HDD.
osc build --prefer-pkgs some/dir Regards Michal Vyskocil
Hi, Michal. You wrote:
osc build --alternative-project Some:Project some_repository some_arch
From docs: "alternative project is used, when there is no project at the server", but the project is exist at the server and need the same target, the only thing is different - there is the new version of one build depended package, while I need to build it with the older one from another repo.
osc build --prefer-pkgs some/dir
I tried this option too, but the "osc" still sees the new version of build depended package from home repo and install only the new one. Best regards. 2012/9/18, Michal Vyskocil <mvyskocil@suse.cz>:
On Mon, Sep 17, 2012 at 08:11:42PM +0300, openSUSE user wrote:
Hi, all.
Tell me, please, how can I build locally a package with an older version of build dependent package (older than in the repository) with "osc"? Interest options:
a) The old version of a depended package is available in some repository,
osc build --alternative-project Some:Project some_repository some_arch
b) The old version of a depended package is available only locally, on HDD.
osc build --prefer-pkgs some/dir
Regards Michal Vyskocil
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Sep 18, 2012 at 09:25:38PM +0300, openSUSE user wrote:
Hi, Michal.
You wrote:
osc build --alternative-project Some:Project some_repository some_arch
From docs: "alternative project is used, when there is no project at the server", but the project is exist at the server and need the same target, the only thing is different - there is the new version of one build depended package, while I need to build it with the older one from another repo.
The help is a bit confusing - but the --alternative-project will build your package like it will be the part of the Some:Project. To be more concrete - let say you have your build dependency in home:$user:foo. Then you might specify the --alternative-project home:$user:foo and do the build without a need to commit the package into the project. But the prerequisite is having the dependency in some project.
osc build --prefer-pkgs some/dir
I tried this option too, but the "osc" still sees the new version of build depended package from home repo and install only the new one.
Interesting, I was under impression the --prefer-pkgs has the biggest priority. In this case, you need to do some manual work First of all, you have to examine the dependencies of the package run osc build --clean to have a clean buildroot ctrl+c it in a %pre section use rpm -r /var/tmp/buildroot -e some-package to remove the newest dependency use rpm -r /vat/tmp/buildroot -i some-package.rpm to install newest version you can probably spent some time once dependencies will be resolved. After that you might a) use --no-init, which won't reinstall the buildroot b) unpack the some-package.rpm and all it's dependencies to some DIRECTORY and use --overlay DIRECTORY - then osc will copy the content of it to the buildroot once all rpms are installed, so you will get the older dependency BTW: in case the new and old versions are installed in a paralel, it's better to use -x -some-package or #!BuildIgnore: some-package in spec to not install the newest version. Hope that helped Michal Vyskocil
participants (2)
-
Michal Vyskocil
-
openSUSE user