* [devel] Странная бага в rpm
@ 2004-03-28 17:35 Alexey Morozov
2004-03-28 17:52 ` Dmitry V. Levin
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Morozov @ 2004-03-28 17:35 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1.1: Type: text/plain, Size: 635 bytes --]
Такое ощущение что я (точнее, мы с Андреем Орловым) набрели на
"Ужасную Багу" (TM) в rpm и его макроязыке
(эх, говорила мне мама использовать dpkg :-)):
итак демонстрация проблемы в аттачменте. Файлик rpmtest следует положить
в /etc/rpm/macros.d/
Спеки test.spec и test1.spec отличаются одной единственной вещью:
В test.spec явно задана архитектура сборки (через BuildArch), а в
test1.spec эта строчка закомментирована.
Для проведения теста достаточно последовательно сказать
rpm -bp test1.spec
rpm -bp test.spec
и затем сравнить выводы этих команд.
alex@pyro ~/RPM/SPECS $ rpm -q rpm
rpm-4.0.4-alt36
alex@pyro ~/RPM/SPECS $ _
[-- Attachment #1.2: rpmtest --]
[-- Type: text/plain, Size: 179 bytes --]
%test_rpm_lang() \
%{expand: %%{?__rpm_test_variable: %%global __rpm_result_variable "ОШИБКА RPM!!!"}} \
%{expand: %%{!?__rpm_test_variable: %%global __rpm_test_variable %%nil}}
[-- Attachment #1.3: test.spec --]
[-- Type: text/plain, Size: 302 bytes --]
Version: 0.1
Release: alt1
%test_rpm_lang
Name: test
Summary: A test spec
License: GPL
Group: Test
BuildArch: noarch
%description
This is a test spec
%prep
echo %__rpm_result_variable
%build
%install
%files
%changelog
* Sun Mar 28 2004 Alexey Morozov <morozov@altlinux.org>
- Initial build.
[-- Attachment #1.4: test1.spec --]
[-- Type: text/plain, Size: 303 bytes --]
Version: 0.1
Release: alt1
%test_rpm_lang
Name: test
Summary: A test spec
License: GPL
Group: Test
#BuildArch: noarch
%description
This is a test spec
%prep
echo %__rpm_result_variable
%build
%install
%files
%changelog
* Sun Mar 28 2004 Alexey Morozov <morozov@altlinux.org>
- Initial build.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [devel] Странная бага в rpm
2004-03-28 17:35 [devel] Странная бага в rpm Alexey Morozov
@ 2004-03-28 17:52 ` Dmitry V. Levin
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry V. Levin @ 2004-03-28 17:52 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
On Mon, Mar 29, 2004 at 12:35:53AM +0700, Alexey Morozov wrote:
> Такое ощущение что я (точнее, мы с Андреем Орловым) набрели на
> "Ужасную Багу" (TM) в rpm и его макроязыке
> (эх, говорила мне мама использовать dpkg :-)):
>
> итак демонстрация проблемы в аттачменте. Файлик rpmtest следует положить
> в /etc/rpm/macros.d/
>
> Спеки test.spec и test1.spec отличаются одной единственной вещью:
> В test.spec явно задана архитектура сборки (через BuildArch), а в
> test1.spec эта строчка закомментирована.
Кажется, вас предупреждали, что как только вы захотите получить от rpm
что-то нетривиальное, то готовьтесь встретиться с его особенностями.
> Для проведения теста достаточно последовательно сказать
>
> rpm -bp test1.spec
> rpm -bp test.spec
>
> и затем сравнить выводы этих команд.
Перенесите вызов %test_rpm_lang _после_ директивы BuildArch, ибо у неё
много побочных эффектов.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-28 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-28 17:35 [devel] Странная бага в rpm Alexey Morozov
2004-03-28 17:52 ` Dmitry V. Levin
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git