[devel] apt virtual packages
Alexey Tourbin
=?iso-8859-1?q?at_=CE=C1_altlinux=2Eru?=
Пт Дек 15 02:40:38 MSK 2006
On Fri, Dec 08, 2006 at 01:52:33AM +0300, Dmitry V. Levin wrote:
> У него была проблема с очень похожими симптомами, и она, к сожалению,
> твоим исправлением не решена.
Это совсем другая проблема.
> Как воспроизвести:
> 1. Взять пакет python-2.4.4-alt2.src.rpm из Сизифа, увеличить релиз и
> собрать получившийся python-2.4.4-alt2.1.src.rpm
> 2. Взять пакет python-module-tpg-3.1.0-alt1.src.rpm из Сизифа и
> попробовать собрать (--with-stuff по умолчанию).
> Этот python-module-tpg не соберётся с такой диагностикой:
>
> Reading Package Lists...
> Building Dependency Tree...
> Selected version 2.4.4-alt2 for python-devel
> Selected version 0.29-alt3 for rpm-build-python
> rpm-build-python is already the newest version.
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies:
> python-dev: Depends: python-base (= 2.4.4-alt2) but 2.4.4-alt2.1 is to be installed
> E: Broken packages
> install: failed to calculate package file list.
> install: Failed to generate package file list.
>
> Причём:
> $ rpmquery -pR python-module-tpg-3.1.0-alt1.src.rpm |grep -v ^rpmlib
> python-devel = 2.4
> rpm-build-python >= 0.8
> $ workdir/aptbox/apt-get -y --print-uris install python-devel 2>&1 |grep ^Selecting
> Selecting python-dev for 'python-devel'
> $ workdir/aptbox/apt-get -y --print-uris install python-devel=2.4
> Reading Package Lists...
> Building Dependency Tree...
> Selected version 2.4.4-alt2 for python-devel
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
>
> Since you only requested a single operation it is extremely likely that
> the package is simply not installable and a bug report against
> that package should be filed.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies:
> python-dev: Depends: python-base (= 2.4.4-alt2) but 2.4.4-alt2.1 is to be installed
> E: Broken packages
Суть проблемы в том, что когда просят установить виртуальный пакет с
версией, apt берет первый попавшийся реальный пакет, который дает этот
виртуальный пакет с этой версией.
apt-get.cc:
2102 if (VerTag != 0)
2103 // CNC:2003-11-05
2104 if (TryToChangeVer(Pkg,Cache,VerOp,VerTag,VerIsRel) == false)
2105 return false;
2106 if (TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,ExpectedInst) == false)
2107 return false;
Проблема в процедуре TryToChangeVer. Эта процедура пытается подыскать
реальный пакет (в данном случае для python-devel=2.4) и выбирает первое
что только можно выбрать.
--- apt-get.cc- 2006-12-14 23:36:02 +0000
+++ apt-get.cc 2006-12-14 23:38:04 +0000
@@ -1537,6 +1537,8 @@ bool TryToChangeVer(pkgCache::PkgIterato
pkgVersionMatch::Version),VerOp);
pkgCache::VerIterator Ver = Match.Find(Pkg);
+ for (pkgCache::VerIterator i = Ver; i.end() == false; i++)
+ fprintf(stderr, "Seen pkg %s ver %s\n", Pkg.Name(), i.VerStr());
if (Ver.end() == true)
{
$ PATH=$PWD:$PATH ~tmp/build/aptbox/apt-get --dry-run install python-devel=2.4
Reading Package Lists... Done
Building Dependency Tree... Done
Seen pkg python-devel ver 2.4.4-alt2
^^^
Selected version 2.4.4-alt2 for python-devel
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-dev: Depends: python-base (= 2.4.4-alt2) but 2.4.4-alt2.1 is to be installed
E: Broken packages
$
Т.е. 2.4.4-alt2.1 в этом месте не видно вообще.
Соответственно, дальше, вероятно, стоит ковырять pkgVersionMatch::Find.
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип : application/pgp-signature
Размер : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20061215/8362bd39/attachment-0001.bin>
Подробная информация о списке рассылки Devel