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