Bug 16086 - Не хватает Requires(post,preun): pear-core
Summary: Не хватает Requires(post,preun): pear-core
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: pear-PhpDocumentor (show other bugs)
Version: unstable
Hardware: x86 Linux
: P2 normal
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-18 22:23 MSD by Slava Semushin
Modified: 2012-03-16 13:59 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Semushin 2008-06-18 22:23:05 MSD
Словил следующую странность:

[c0der@rock ~]$ sudo apt-get install pear-Validate
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  pear-Date pear-PhpDocumentor pear-core
The following NEW packages will be installed:
  pear-Date pear-PhpDocumentor pear-Validate pear-core
0 upgraded, 4 newly installed, 0 removed and 96 not upgraded.
Need to get 2981kB of archives.
After unpacking 10.8MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 ftp://ftp.altlinux.org noarch/classic pear-PhpDocumentor 1.4.1-alt1 [2536kB]
Get:2 ftp://ftp.altlinux.org noarch/classic pear-core 1.7.1-alt1 [365kB]                  
Get:3 ftp://ftp.altlinux.org noarch/classic pear-Date 1.4.7-alt2 [62.4kB]                 
Get:4 ftp://ftp.altlinux.org noarch/classic pear-Validate 0.8.1-alt1 [18.2kB]             
Fetched 2981kB in 49s (60.1kB/s)                                                          
Committing changes...
Preparing...                 ###################################################### [100%]
1: pear-PhpDocumentor        ###################################################### [ 25%]
/root/tmp/rpm-tmp.63929: line 2: pear: command not found
2: pear-core                 ###################################################### [ 50%]
3: pear-Date                 ###################################################### [ 75%]
4: pear-Validate             ###################################################### [100%]
Done.

Сначала, решил, что у пакета нет зависимости на пакет с бинарником pear, но это не так -- pear-PhpDocumentor имеет в зависимостях pear-core, в котором и находится бинарник. Но мы видим, что он устанавливается не до, а после pear-PhpDocumentor, видимо, из-за этого и ошибка.

Вся странность в том, почему пакет который есть в зависимостях устанавливается не до, а после. Возможно, это даже не вина пакета pear-PhpDocumentor, а вина, скажем, rpm! :)
Comment 1 Vitaly Lipatov 2008-06-18 23:59:28 MSD
Ну вообще я не собираюсь предпринимать никаких действий.
Comment 2 Slava Semushin 2008-06-19 08:43:49 MSD
В %post вызывается макрос %pear_install:

pear install --nodeps -s --force --register-only /usr/share/php/pear/.pkgxml/%{pear_name}.xml >/dev/null || :

Как видим, здесь случай с отсутствующей командой pear предусматривался -- в этом случае скриплет не падает, а возвращает успешный код завершения.

Я думаю, что этот макрос нужно поправить, добавив 2>/dev/null также, чтобы не было лишней ругани, способной взволновать пользователя.

Перевешиваю на пакет rpm-build-pear.
Comment 3 Vitaly Lipatov 2008-06-19 09:55:07 MSD
Денис, может будут какие-то идеи?
Comment 4 Sir Raorn 2008-06-19 12:25:08 MSD
pear-PhpDocumentor, Build Date: Wed Jan 23 18:12:13 2008

* Sun Feb 24 2008 Alexey Tourbin <at@altlinux> 4.0.4-alt87
- implemented automatic dependencies for %pre, %preun, %post,
  and %postun scriptlets (#7409)

Ещё вопросы есть?  Это (была) бага упаковки pear-PhpDocumentor.  Раньше зависимости вида Reqiores(post) надо было проставлять руками.  Теперь это неактуально, но пакет был собран до того как поддержка post-скриптов появилась в rpm-build.
Comment 5 Vitaly Lipatov 2008-06-20 02:31:41 MSD
С 1.4.2-alt1 всё хорошо.