From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 10 Oct 2006 04:40:28 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20061010004028.GH23308@localhost.localdomain> Mail-Followup-To: ALT Devel discussion list References: <20061009223236.GG23308@localhost.localdomain> <20061009224152.GC18762@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvuyDaC2GNSBQusT" Content-Disposition: inline In-Reply-To: <20061009224152.GC18762@basalt.office.altlinux.org> Subject: Re: [devel] apt virtual packages X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 00:40:30 -0000 Archived-At: List-Archive: List-Post: --GvuyDaC2GNSBQusT Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 10, 2006 at 02:41:52AM +0400, Dmitry V. Levin wrote: > > =ED=CF=D6=CE=CF =CB=CF=CE=C5=DE=CE=CF =D7 =C2=C1=C7=DA=C9=CC=CC=D5 =CE= =C1=D0=C9=D3=C1=D4=D8 =C9=CC=C9 =D3=C1=CD=CF=CD=D5 > > =D7 =C1=D0=D4=C5 =CB=CF=D7=D9=D2=D1=D4=D8=D3=D1, =CE=CF =CD=CF=D6=C5=D4= =C2=D9=D4=D8 =D5=D6=C5 =CB=D4=CF-=D4=CF =DA=CE=C1=C5=D4? >=20 > =F1 =C2=D5=C4=D5 =D0=D2=C9=DA=CE=C1=D4=C5=CC=C5=CE =D4=CF=CD=D5, =CB=D4= =CF =D2=C5=DB=C9=D4 =DC=D4=D5 =DA=C1=C4=C1=DE=D5 (=D4.=C5. =DA=C1=C6=C9=CB= =D3=C9=D4 apt). =F1 =D7=D2=CF=C4=C5 =C2=D9 =DA=C1=C6=C9=CB=D3=C9=CC, =C8=CF=D4=D1 =CD=C5=CE= =D1 =C7=CC=CF=D6=D5=D4 =D3=CF=CD=CE=C5=CE=C9=D1. --- apt-get.cc- 2006-10-10 03:04:25 +0400 +++ apt-get.cc 2006-10-10 04:30:30 +0400 @@ -1275,14 +1275,18 @@ bool TryToInstall(pkgCache::PkgIterator=20 continue; } // Is the provides pointing to the candidate version? - if (PrvPkgCandVer =3D=3D Prv.OwnerVer()) + bool good =3D false; + for (; PrvPkgCandVer.end() =3D=3D false; ++PrvPkgCandVer) { - // Yes, it is. This is a good solution. - GoodSolutions.push_back(PrvPkg); - if (instVirtual) - break; - continue; + if (PrvPkgCandVer =3D=3D Prv.OwnerVer()) + { + // Yes, it is. This is a good solution. + good =3D true; + GoodSolutions.push_back(PrvPkg); + } } + if (good && instVirtual) + break; } vector GoodSolutionNames; unsigned int GoodSolutionsInstalled =3D 0, GoodSolutionInstallNumber= =3D 0; End of patch =F7=CF=D4 =D0=CF=CC=CE=CF=D3=D4=D8=C0 =D2=C5=CC=C5=D7=C1=CE=D4=CE=D9=CA =CB= =D5=D3=CF=CB =CB=CF=C4=C1 (=C9=D3=D0=D2=C1=D7=CC=C5=CE=CE=D9=CA). 1270 pkgCache::VerIterator PrvPkgCandVer =3D 1271 Cache[PrvPkg].CandidateVerIter(Cac= he); 1272 if (PrvPkgCandVer.end() =3D=3D true) 1273 { 1274 // Packages without a candidate version are not good so= lutions. 1275 continue; 1276 } 1277 // Is the provides pointing to the candidate version? 1278 bool good =3D false; 1279 for (; PrvPkgCandVer.end() =3D=3D false; ++PrvPkgCandVer) 1280 { 1281 if (PrvPkgCandVer =3D=3D Prv.OwnerVer()) 1282 { 1283 // Yes, it is. This is a good solution. 1284 good =3D true; 1285 GoodSolutions.push_back(PrvPkg); 1286 } 1287 } 1288 if (good && instVirtual) 1289 break; 1290 } =FA=C4=C5=D3=D8 PrvPkg -- =DC=D4=CF =D2=C5=C1=CC=D8=CE=D9=CA =D0=C1=CB=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=CE=C9=C2=D5=C4=D8 =D0=CF=CE=C9=CD=C1=C5= =D4 =D7=CE=D5=D4=D2=C5=CE=CE=C9=C5 =D3=D4=D2=D5=CB=D4=D5=D2=D9 =C1=D0=D4=C1= ? =ED=D5=D4=D8 =CB=C1=CB=C1=D1-=D4=CF. =E7=C4=C5 =CF=C2 =DC=D4=CF=CD =CD=CF=D6=CE=CF =DE=D4=CF-=CE=C9=C2=D5=C4=D8 = =D0=D2=CF=DE=C9=D4=C1=D4=D8? --GvuyDaC2GNSBQusT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFKuv8fBKgtDjnu0YRAuhgAKDlgMBnWG1C57kAzPdq6AujQ8W/CACgxP/b 6qIbrnjkoiUWstLXurEYUsU= =Hsjk -----END PGP SIGNATURE----- --GvuyDaC2GNSBQusT--