[devel] kde4games & dep optimizations
Alexey Tourbin
at на altlinux.ru
Сб Фев 12 13:13:05 UTC 2011
On Mon, Feb 07, 2011 at 12:27:02AM +0300, Dmitry V. Levin wrote:
> Для того, чтобы проставлять такие зависимости автоматически, нужно
> - научиться диагностировать нехватку таких зависимостей;
> - выдать packager'ам интерфейс для отключения новой автоматики в случае,
> если она принимает неправильное решение.
Попробовал исправить зависимости у qt4. Вроде бы это не очень сложно,
т.к. rpm теперь говорит, что нужно исправлять. С другой стороны,
пакет монструозный, а rpm говорит очень много. Так что пришлось
несколько раз запускать 'gear-rpm -bl', а это не очень быстро выходит.
В общем даже не знаю, стоит ли надеяться, что другие пакеты будут
исправлены packager'ами таким же образом, как я исправил qt4, или нет.
Вообще много кривоватых пакетов попадается. Как из такой груды кривоватых
пакетов можно создать Национальную ОС, или хотя бы стабильный LTS бранч,
не понятно.
Взять например тот же qt4.
%package -n lib%{name}-clucene
Summary: CLucene library for the Qt%major GUI toolkit
%description -n lib%{name}-clucene
CLucene library for the Qt%major GUI toolkit
Оказывается, libqt4-clucene - это библиотека CLucene для Qt4.
Не хватает разве что локализации этого замечательного факта:
libqt4-clucene - это библиотека "клюсене" для кью-ти-фоур.
commit 4aab082715fa94c2bb61a8fd8b57462941ef9fd1
Author: Alexey Tourbin <at на altlinux.ru>
Date: Sat Feb 12 12:56:47 2011 +0300
- enabled strict dependencies between subpackages
Before this change, dependencies between subpackages were arranged like
this (arrows indicate strict dependencies - Requires: N = [E:]V-R).
libqt4-core libqt4-gui
| |
v v
qt4-common
This scheme does not ensure strict dependency between libqt4-core
and libqt4-gui, though (note that libqt4-gui requires libQtCore.so.4).
Logically, it is possible that another package provides libQtCore.so.4.
Hence it is not possible to deduce strict dependency between libqt4-gui
and libqt4-core.
With this change, I rearrange dependencies like this:
libqt4-gui
|
v
libqt4-core
|
v
qt4-common
Note that, since rpm will propagate strict dependencies, it is also
safe to assume that there is strict dependency between libqt4-gui and
qt4-common: libqt4-gui -> qt4-common.
As to why rearrangement is needed.
1) With strict dependencies between subpackages, rpm will optimize
/usr/src/debug files in their corresponding debuginfo packages.
E.g. rpm will remove libqt4-gui-debuginfo sources which are already
part of libqt4-core-debuginfo. (Normally, there won't be many source
dups between subpackages, with one notable exception: header files).
2) With strict dependencies between subpackages, rpm will optimize
dependencies. E.g. rpm will remove libQtCore.so.4 dependency from
libqt4-gui, along with its set-version, since it is provided by
libqt4-core. Furthermore, rpm will also remove dependencies which
are already required by libqt4-core, such as libstdc++.so.6.
diff --git a/altlinux/qt4.spec b/altlinux/qt4.spec
index d0def3b..995e4a4 100644
--- a/altlinux/qt4.spec
+++ b/altlinux/qt4.spec
@@ -52,11 +52,13 @@ Summary: Shared library for the Qt%major GUI toolkit
Url: http://www.trolltech.com/products/qt/
License: GPLv3 / LGPLv2.1
-Provides: %name-x11 = %version-%release
-Requires: %name-sql lib%name %name-assistant
+Requires: lib%name = %version-%release
+Requires: %name-sql = %version-%release
+Requires: %name-assistant = %version-%release
%if_enabled dbus
-Requires: %name-dbus
+Requires: %name-dbus = %version-%release
%endif
+Provides: %name-x11 = %version-%release
Source0: kde-qt-everywhere-opensource-src-%version%beta.tar
#
@@ -158,14 +160,27 @@ Common package for Qt%major
BuildArch: noarch
Summary: Shared library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: lib%{name}-core lib%{name}-gui lib%{name}-network
-Requires: lib%{name}-opengl lib%{name}-sql lib%{name}-xml
-Requires: lib%{name}-qt3support lib%{name}-svg lib%{name}-script
-Requires: lib%{name}-designer lib%{name}-uitools
-Requires: lib%{name}-webkit lib%{name}-xmlpatterns lib%{name}-multimedia
-Requires: lib%{name}-help lib%{name}-declarative
-Requires: lib%{name}-clucene %{?_enable_dbus:lib%{name}-dbus}
-Provides: lib%{name}-x11 = %version-%release
+Requires: lib%name-core = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-network = %version-%release
+Requires: lib%name-opengl = %version-%release
+Requires: lib%name-sql = %version-%release
+Requires: lib%name-xml = %version-%release
+Requires: lib%name-qt3support = %version-%release
+Requires: lib%name-svg = %version-%release
+Requires: lib%name-script = %version-%release
+Requires: lib%name-designer = %version-%release
+Requires: lib%name-uitools = %version-%release
+Requires: lib%name-webkit = %version-%release
+Requires: lib%name-xmlpatterns = %version-%release
+Requires: lib%name-multimedia = %version-%release
+Requires: lib%name-help = %version-%release
+Requires: lib%name-declarative = %version-%release
+Requires: lib%name-clucene = %version-%release
+%if_enabled dbus
+Requires: lib%name-dbus = %version-%release
+%endif
+Provides: lib%name-x11 = %version-%release
%description -n lib%name
Qt is a GUI software toolkit. Qt simplifies the task of writing and maintaining
@@ -186,7 +201,10 @@ well as the README files for Qt.
%package -n lib%{name}-qt3support
Summary: Qt3 support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-network = %version-%release
+Requires: lib%name-sql = %version-%release
+Requires: lib%name-xml = %version-%release
%description -n lib%{name}-qt3support
Qt3 support library for the Qt%major GUI toolkit
@@ -203,7 +221,7 @@ Core library for the Qt%major GUI toolkit
%package -n lib%{name}-gui
Summary: GUI support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
Provides: libqtgui%major = %version-%release
Conflicts: yachat < 3.1.0 yapsi < 3.1.0
%description -n lib%{name}-gui
@@ -213,7 +231,7 @@ GUI support library for the Qt%major GUI toolkit
%package -n lib%{name}-dbus
Summary: DBus support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-xml = %version-%release
%description -n lib%{name}-dbus
DBus support library for the Qt%major GUI toolkit
@@ -221,7 +239,7 @@ DBus support library for the Qt%major GUI toolkit
%package -n lib%{name}-network
Summary: Network support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-dbus = %version-%release
%description -n lib%{name}-network
Network support library for the Qt%major GUI toolkit
@@ -229,7 +247,7 @@ Network support library for the Qt%major GUI toolkit
%package -n lib%{name}-uitools
Summary: Designer UI tools library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
%description -n lib%{name}-uitools
Designer UI tools library for the Qt%major GUI toolkit
@@ -237,7 +255,7 @@ Designer UI tools library for the Qt%major GUI toolkit
%package -n lib%{name}-svg
Summary: SVG support for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
%description -n lib%{name}-svg
Support for rendering Scalable Vector Graphics (SVG)
drawings and animations for the Qt%major GUI toolkit
@@ -246,7 +264,7 @@ drawings and animations for the Qt%major GUI toolkit
%package -n lib%{name}-opengl
Summary: OpenGL support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
%description -n lib%{name}-opengl
OpenGL support library for the Qt%major GUI toolkit
@@ -254,7 +272,7 @@ OpenGL support library for the Qt%major GUI toolkit
%package -n lib%{name}-sql
Summary: SQL support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n lib%{name}-sql
SQL support library for the Qt%major GUI toolkit
@@ -262,7 +280,7 @@ SQL support library for the Qt%major GUI toolkit
%package -n lib%{name}-test
Summary: Unit Testing Library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n lib%{name}-test
Unit Testing Library for the Qt%major GUI toolkit
@@ -270,7 +288,9 @@ Unit Testing Library for the Qt%major GUI toolkit
%package -n lib%{name}-designer
Summary: Libraries for the Qt%major Designer
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-script = %version-%release
+Requires: lib%name-xml = %version-%release
%description -n lib%{name}-designer
Libraries for the Qt%major Designer
@@ -278,7 +298,7 @@ Libraries for the Qt%major Designer
%package -n lib%{name}-xml
Summary: XML support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n lib%{name}-xml
XML support library for the Qt%major GUI toolkit
@@ -286,7 +306,7 @@ XML support library for the Qt%major GUI toolkit
%package -n lib%{name}-script
Summary: Scripting support library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-dbus = %version-%release
%description -n lib%{name}-script
Qt Script is based on the ECMAScript scripting language, as defined in
standard ECMA-262. Microsoft's JScript, and Netscape's JavaScript are
@@ -296,7 +316,7 @@ also based on the ECMAScript standard.
%package -n lib%{name}-xmlpatterns
Summary: XmlPatterns library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-network = %version-%release
%description -n lib%{name}-xmlpatterns
XmlPatterns library for the Qt%major GUI toolkit
@@ -304,7 +324,8 @@ XmlPatterns library for the Qt%major GUI toolkit
%package -n lib%{name}-scripttools
Summary: ScriptTools library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-script = %version-%release
%description -n lib%{name}-scripttools
ScriptTools library for the Qt%major GUI toolkit
@@ -312,7 +333,10 @@ ScriptTools library for the Qt%major GUI toolkit
%package -n lib%{name}-help
Summary: Help library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-clucene = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-network = %version-%release
+Requires: lib%name-sql = %version-%release
%description -n lib%{name}-help
Help library for the Qt%major GUI toolkit
@@ -320,7 +344,8 @@ Help library for the Qt%major GUI toolkit
%package -n lib%{name}-webkit
Summary: WebKit library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-network = %version-%release
%description -n lib%{name}-webkit
WebKit library for the Qt%major GUI toolkit
@@ -328,7 +353,7 @@ WebKit library for the Qt%major GUI toolkit
%package -n lib%{name}-clucene
Summary: CLucene library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n lib%{name}-clucene
CLucene library for the Qt%major GUI toolkit
@@ -336,7 +361,7 @@ CLucene library for the Qt%major GUI toolkit
%package -n lib%{name}-multimedia
Summary: Multimedia framework library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
%description -n lib%{name}-multimedia
Multimedia framework library for the Qt%major GUI toolkit
@@ -344,7 +369,13 @@ Multimedia framework library for the Qt%major GUI toolkit
%package -n lib%{name}-declarative
Summary: Ddeclarative framework library for the Qt%major GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-network = %version-%release
+Requires: lib%name-opengl = %version-%release
+Requires: lib%name-script = %version-%release
+Requires: lib%name-sql = %version-%release
+Requires: lib%name-webkit = %version-%release
+Requires: lib%name-xmlpatterns = %version-%release
%description -n lib%{name}-declarative
Declarative framework library for the Qt%major GUI toolkit
Declarative module provides a declarative framework
@@ -355,9 +386,11 @@ for building highly dynamic, custom user interfaces
BuildArch: noarch
Group: System/Libraries
Summary: Meta-package for development with Qt%major GUI toolkit
-Requires: lib%name-devel %name-designer %name-assistant
+Requires: lib%name-devel = %version-%release
+Requires: %name-designer = %version-%release
+Requires: %name-assistant = %version-%release
%if_enabled docs
-Requires: %name-doc
+Requires: %name-doc = %version-%release
%endif
%description devel
Meta-package for development with Qt%major GUI toolkit
@@ -366,10 +399,10 @@ Meta-package for development with Qt%major GUI toolkit
%package -n lib%name-devel
Summary: Header files and libraries for developing apps which will use Qt%major
Group: Development/KDE and QT
-Requires: %name-common = %version-%release
-Requires: lib%name
+Requires: lib%name = %version-%release
+Requires: lib%name-test = %version-%release
+Requires: lib%name-scripttools = %version-%release
Requires: xorg-devel libssl-devel freetype2-devel fontconfig-devel libpng-devel zlib-devel libtiff-devel libGLU-devel
-Requires: lib%{name}-test lib%{name}-scripttools
%if_enabled dbus
Requires: libdbus-devel
%endif
@@ -398,8 +431,7 @@ This package contains the files necessary to develop applications
%package -n lib%name-devel-static
Summary: Version of the Qt GUI toolkit for static linking
Group: Development/KDE and QT
-Requires: %name-common = %version-%release
-Requires: lib%name-devel
+Requires: lib%name-devel = %version-%release
Obsoletes: %name-devel-static
%description -n lib%name-devel-static
This package package contains the files necessary to link applications
@@ -411,8 +443,7 @@ on the system running the application.
%package qml
Summary: QML modules Qt%major
Group: Development/KDE and QT
-Requires: %name-common = %version-%release
-Requires: lib%name-devel
+Requires: lib%name-devel = %version-%release
%description qml
The package contains a QML modules and viewer for the Qt%major toolkit.
@@ -420,8 +451,7 @@ The package contains a QML modules and viewer for the Qt%major toolkit.
%package designer
Summary: Designer for the Qt%major
Group: Development/KDE and QT
-Requires: %name-common = %version-%release
-Requires: lib%name-devel
+Requires: lib%name-devel = %version-%release
%description designer
The package contains an User Interface designer
tool for the Qt%major toolkit.
@@ -430,7 +460,7 @@ tool for the Qt%major toolkit.
%package -n lib%name-styles
Summary: Extra styles for the Qt GUI toolkit
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n lib%name-styles
Extra styles (themes) for the Qt GUI toolkit.
@@ -439,25 +469,25 @@ Extra styles (themes) for the Qt GUI toolkit.
BuildArch: noarch
Group: System/Libraries
Summary: Meta-package for SQL support of Qt%major GUI toolkit
-Requires: lib%name-sql-mysql
-Requires: lib%name-sql-sqlite
+Requires: lib%name-sql-mysql = %version-%release
+Requires: lib%name-sql-sqlite = %version-%release
%if_enabled sql_tds
-Requires: lib%name-sql-tds
+Requires: lib%name-sql-tds = %version-%release
%endif
%if_enabled sql_ibase
-Requires: lib%name-sql-interbase
+Requires: lib%name-sql-interbase = %version-%release
%endif
%if_enabled sql_pgsql
-Requires: lib%name-sql-postgresql
+Requires: lib%name-sql-postgresql = %version-%release
%endif
%if_enabled sql_ibase
-Requires: lib%name-sql-interbase
+Requires: lib%name-sql-interbase = %version-%release
%endif
%if_enabled sql_sqlite2
-Requires: lib%name-sql-sqlite2
+Requires: lib%name-sql-sqlite2 = %version-%release
%endif
%if_enabled sql_odbc
-Requires: lib%name-sql-odbc
+Requires: lib%name-sql-odbc = %version-%release
%endif
%description sql
Meta-package for SQL support of Qt%major GUI toolkit
@@ -466,7 +496,7 @@ Meta-package for SQL support of Qt%major GUI toolkit
%package -n lib%name-sql-odbc
Summary: ODBC drivers for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-odbc
ODBC driver for Qt's SQL classes (QODBC)
@@ -475,7 +505,7 @@ ODBC driver for Qt's SQL classes (QODBC)
%package -n lib%name-sql-tds
Summary: FreeTDS(Sybase) driver for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-tds
FreeTDS(Sybase) driver for Qt's SQL classes (QTDS)
@@ -484,7 +514,7 @@ FreeTDS(Sybase) driver for Qt's SQL classes (QTDS)
%package -n lib%name-sql-mysql
Summary: MySQL driver for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-mysql
MySQL driver for Qt's SQL classes (QMYSQL)
@@ -493,7 +523,7 @@ MySQL driver for Qt's SQL classes (QMYSQL)
%package -n lib%name-sql-postgresql
Summary: PostgreSQL drivers for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-postgresql
PostgreSQL driver for Qt's SQL classes (QPSQL)
@@ -502,7 +532,7 @@ PostgreSQL driver for Qt's SQL classes (QPSQL)
%package -n lib%name-sql-interbase
Summary: InterBase drivers for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-interbase
InterBase driver for Qt's SQL classes (QIBASE)
@@ -511,7 +541,7 @@ InterBase driver for Qt's SQL classes (QIBASE)
%package -n lib%name-sql-sqlite
Summary: SQLite driver for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite
SQLite driver for Qt's SQL classes (QSQLITE)
@@ -520,7 +550,7 @@ SQLite driver for Qt's SQL classes (QSQLITE)
%package -n lib%name-sql-sqlite2
Summary: SQLite2 driver for Qt%major SQL classes
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-sql = %version-%release
Provides: lib%name-plugin-sql = %version-%release
%description -n lib%name-sql-sqlite2
SQLite2 driver for Qt's SQL classes (QSQLITE2)
@@ -560,7 +590,7 @@ This package contains documentation in man format.
%package doc-examples
Summary: Examples for developing apps which will use Qt%{major}
Group: Development/KDE and QT
-Requires: %name-common = %version
+Requires: lib%name = %version-%release
%description doc-examples
This package contains sources for example programs.
@@ -568,8 +598,9 @@ This package contains sources for example programs.
%package assistant
Summary: Assistant for the Qt%major
Group: Text tools
-Requires: %name-common = %version-%release
-Requires: lib%name-sql-sqlite
+Requires: lib%name-help = %version-%release
+Requires: lib%name-webkit = %version-%release
+Requires: lib%name-sql-sqlite = %version-%release
%description assistant
This package contains an documentation browser
for the Qt%major toolkit and Qt-based programs.
@@ -578,7 +609,9 @@ for the Qt%major toolkit and Qt-based programs.
%package dbus
Summary: D-Bus utilities for the Qt%major
Group: System/Configuration/Other
-Requires: %name-common = %version-%release
+Requires: lib%name-dbus = %version-%release
+Requires: lib%name-gui = %version-%release
+Requires: lib%name-xml = %version-%release
Requires: dbus-tools-gui
%description dbus
This package contains D-Bus utilities
@@ -589,7 +622,7 @@ for the Qt%major toolkit and Qt-based programs.
Version: %phonon_ver
Summary: Phonon Multimedia Framework library
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n libphonon
Phonon Multimedia Framework library
@@ -598,7 +631,7 @@ Phonon Multimedia Framework library
Version: %phonon_ver
Summary: Development files for Phonon
Group: System/Libraries
-Requires: %name-common = %version-%release
+Requires: lib%name-core = %version-%release
%description -n phonon-devel
Development files for Phonon
Подробная информация о списке рассылки Devel