ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Fwd: rpm macros tmp.spec
@ 2003-06-13  4:22 Alexey Tourbin
  2003-06-13  6:02 ` Alexey Voinov
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Tourbin @ 2003-06-13  4:22 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]

Господа, может кто-нибудь знает, в чем тут дело?

----- Forwarded message from Alexey Tourbin <at@altlinux.ru> -----

Date: Sat, 24 May 2003 09:34:02 +0400
From: Alexey Tourbin <at@altlinux.ru>
Subject: rpm macros tmp.spec
To: "Dmitry V. Levin" <ldv@altlinux.org>

Привет,

Кажется, я плохо понимаю, как работают макросы в RPM.  В данном случае
мне кажется, что они должны работать, но они не работают.  Где я
ошибаюсь?

> $ rpm -bc tmp.spec
> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.93192
> + umask 022
> + /bin/mkdir -p /home/at/RPM/BUILD
> + cd /home/at/RPM/BUILD
> + : perl_arch = i386
> + : perl_arch_os = i386-linux
> + : binary_compat_versions = 5.8.0
> + : binary_inc_version_list = 5.8.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Должно быть то же самое, что и на следующей строчке.
> + : binary_inc_version_list CAST = 5.8.0/i386-linux
> + exit 0
> $


Name: sucks
Version: 0
Release: 0
Summary: really %name
Group: the one that %name
License: also %name

%ifarch %ix86
%define perl_arch i386
%else
%define perl_arch %_arch
%endif
%define perl_arch_os %perl_arch-%_os
%define binary_compat_versions 5.8.0
%define binary_inc_version_list %(echo %binary_compat_versions | sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')

%description
It's about things that %name.

%build
: perl_arch = %perl_arch
: perl_arch_os = %perl_arch_os
: binary_compat_versions = %binary_compat_versions
: binary_inc_version_list = %binary_inc_version_list
: binary_inc_version_list CAST = %(echo %binary_compat_versions | sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')


----- End forwarded message -----

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [devel] Fwd: rpm macros tmp.spec
  2003-06-13  4:22 [devel] Fwd: rpm macros tmp.spec Alexey Tourbin
@ 2003-06-13  6:02 ` Alexey Voinov
  2003-06-13 13:43   ` [devel] " Alexey Tourbin
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Voinov @ 2003-06-13  6:02 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Alexey Tourbin wrote
> Господа, может кто-нибудь знает, в чем тут дело?
> 
> ----- Forwarded message from Alexey Tourbin <at@altlinux.ru> -----

> > + : binary_inc_version_list = 5.8.0
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Должно быть то же самое, что и на следующей строчке.
> > + : binary_inc_version_list CAST = 5.8.0/i386-linux
> > + exit 0
> > $

> %define binary_compat_versions 5.8.0
> %define binary_inc_version_list %(echo %binary_compat_versions | sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')

Макросы здесь не при чём.
Вот это вот:
sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')
всегда будет добавлять /%perl_arch_os к номеру версии, состоящему из цифр
и точек.

-- 
Best Regards!           | Когда вам платят за работу, надо по крайней мере
Alexey Voinov           | делать вид, что вы работаете...
                        |                         Б.Виан "Осень в Пекине"
voins@voins.program.ru
vns@altlinux.ru


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [devel] Re: Fwd: rpm macros tmp.spec
  2003-06-13  6:02 ` Alexey Voinov
@ 2003-06-13 13:43   ` Alexey Tourbin
  2003-06-13 14:36     ` Alexey Voinov
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Tourbin @ 2003-06-13 13:43 UTC (permalink / raw)
  To: devel; +Cc: Alexey Voinov

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

On Fri, Jun 13, 2003 at 10:02:34AM +0400, Alexey Voinov wrote:
> Макросы здесь не при чём.
> Вот это вот:
> sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')
> всегда будет добавлять /%perl_arch_os к номеру версии, состоящему из цифр
> и точек.

Пожалуйста, посмотрите spec-файл внимательнее.  Может я уж совсем торможу.
Проблема в том, что в одном случае добавляется, а в другом -- нет.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [devel] Re: Fwd: rpm macros tmp.spec
  2003-06-13 13:43   ` [devel] " Alexey Tourbin
@ 2003-06-13 14:36     ` Alexey Voinov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Voinov @ 2003-06-13 14:36 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

Alexey Tourbin wrote
> On Fri, Jun 13, 2003 at 10:02:34AM +0400, Alexey Voinov wrote:
> > Макросы здесь не при чём.
> > Вот это вот:
> > sed 's!\([0-9.]\+\)!\1/%perl_arch_os!g')
> > всегда будет добавлять /%perl_arch_os к номеру версии, состоящему из цифр
> > и точек.
> 
> Пожалуйста, посмотрите spec-файл внимательнее.  Может я уж совсем торможу.
> Проблема в том, что в одном случае добавляется, а в другом -- нет.
Увидел проблему.
Решается так:
%define binary_inc_version_list %(echo %binary_compat_versions | sed 's!\\([0-9.]\\+\\)!\\1/%perl_arch_os!g')

т.е. удвоение всех символов '\\'. Почему так? Видимо потому, что '\\'
является спец-символом внутри %define.

-- 
Best Regards!           | Когда вам платят за работу, надо по крайней мере
Alexey Voinov           | делать вид, что вы работаете...
                        |                         Б.Виан "Осень в Пекине"
voins@voins.program.ru
vns@altlinux.ru


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-13 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-13  4:22 [devel] Fwd: rpm macros tmp.spec Alexey Tourbin
2003-06-13  6:02 ` Alexey Voinov
2003-06-13 13:43   ` [devel] " Alexey Tourbin
2003-06-13 14:36     ` Alexey Voinov

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