Author: jkupec Date: Tue Mar 25 13:49:42 2008 New Revision: 9265 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9265&view=rev Log: - find the correct source package - require the source package instead of require its build deps to install the build deps - TODO fix the whole source-install after libzypp is fixed Modified: trunk/zypper/src/zypper-misc.cc Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=9265&r1=9264&r2=9265&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Tue Mar 25 13:49:42 2008 @@ -1883,7 +1883,7 @@ pool.byIdentEnd<SrcPackage>(arg) ) { DBG << *srcit << endl; - if ( ! srcit->status().isInstalled() ) + if ( ! srcit->status().isInstalled() ) // this will be true for all of the srcpackages, won't it? { SrcPackage::constPtr _srcpkg = asKind<SrcPackage>(srcit->resolvable()); @@ -1891,18 +1891,22 @@ if (srcpkg) { if (_srcpkg->edition() > srcpkg->edition()) + { DBG << "newer edition (" << srcpkg->edition() << " > " << _srcpkg->edition() << ")"; + _srcpkg.swap(srcpkg); + } else DBG << "is older than the current candidate"; } else + { DBG << "first candindate"; - + _srcpkg.swap(srcpkg); + } DBG << endl; - - _srcpkg.swap(srcpkg); } } + return srcpkg; } @@ -1925,12 +1929,17 @@ DBG << format("Injecting build requieres for source package %s-%s") % srcpkg->name() % srcpkg->edition() << endl; - // add all src requires to pool + // add all src requires to pool DEPRECATED: srcpakcages will be in + // the pool (together with their build-deps) like normal packages + // so only require the srcpackage + /* for_( itc, srcpkg->dep(Dep::REQUIRES).begin(), srcpkg->dep(Dep::REQUIRES).end() ) { God->resolver()->addRequire(*itc); DBG << "added req: " << *itc << endl; - } + }*/ + God->resolver()->addRequire(Capability(srcpkg->name(), Rel::EQ, srcpkg->edition(), ResTraits<SrcPackage>::kind)); + //installer.item.status().setToBeInstalled( zypp::ResStatus::USER ); } else { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org