* Re: [devel] rpm's shell.req
2007-11-23 18:18 [devel] rpm's shell.req led
@ 2007-11-23 21:00 ` Alexey Tourbin
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Tourbin @ 2007-11-23 21:00 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]
On Fri, Nov 23, 2007 at 08:18:31PM +0200, led@altlinux.ru wrote:
> При сборке получаем:
>
> shell.req: /home/led/tmp/icc-buildroot/opt/intel/cce/10.1.008/bin/icc: invalid
> command: -a
>
> Ругань идёт на строку типа
>
> exec -a "${BINARY}" "${BINARY}" "$@"
Это не ругань, а некий внутренний warning, то есть что-то не склеилось
столь просто, как того хотелось бы.
Замечу на всякий случай, что именно в этом примере из exec'а нельзя
извлечь никакой полезной информации (а именно, какой бинарь запускает
этот exec).
Примитивная логика того что выводит 'sh --rpm-requires' состоит в том,
что есть некие "команды-префиксы", после которых идёт "настоящая
команда".
Выглядит это так -- bash-3.1-rh-alt-requires.patch
+static char *requires_builtins[] =
+{
+ ".", "command", "exec", "source",
+#if defined (apollo)
+ "inlib",
+#endif
+ (char *)NULL
+};
Соответственно берётся следующее "слово" после префикса.
То что у некоторых "префиксов" бывают гнутые опции это пока выше
разумения rh-alt-requires.patch.
$ sh --rpm-requires <<<'exec -a TRUE true'
executable(-a)
$
КСТАТИ, то что выводится "...: invalid command: -a" это плод моих
усилий. Раньше этого дела не выводилось, и людям жилось спокойнее
(наверное). Теперь я решил честно везде писать что где-то что-то
не клеится (и что именно).
> -a - вроде бы, документированный ключ для bash'евского exec.
>
> В скрипте:
>
> #!/bin/bash
>
> Баг? Нужно куда то "повесить" или так исправят?:)
Можно на это не обращать внимания.
Если Вы умеете программировать Си и вам понятно что такое AST, при этом
Вы знаете неплохой способ совместить программирование бизнес-логики
обработки AST и Си, тогда Вам, конечно, нужно взяться за
rh-alt-requires.patch. Только мне кажется туда бизнес-логику вносить
не надо, лучше научиться выплёвывать AST, дальше уж как-нибудь сами
разберёмся.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread