On Sun, Sep 07, 2008 at 02:32:57PM -0400, Jeff Johnson wrote: > On Sep 7, 2008, at 2:28 PM, Alexey Tourbin wrote: > >On Sun, Sep 07, 2008 at 02:22:26PM -0400, Jeff Johnson wrote: > >>>Forbid manifest files from within manifests. > >>Forbid manifests entirely is a similarly Draconian solution. > > > >I expect manifests to have <list> semanitcs, not #include semantics. > > Sure manifests have list semantics.
List semantics means that we have basic type rpm, and manifests are of type list<rpm>. Include semantics has a bit more vague notion of basic type: [ <code_snippet> | <cpp_include_instruction> ]+, the latter is recurisve and should be reduced to terminal code_snippets. cpp(1) provides a device to prevent infinite recursion, which is #ifndef FOO_H #define FOO_H [ <code_snippet> | <cpp_include_instruction> ]+ #endif and otherwise has no special way to handle recursion, except for nesting limit. $ cat foo.h #include "foo.h" $ cpp -I. -E foo.h 2>&1 >/dev/null |tail from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1, from foo.h:1: foo.h:1:17: error: #include nested too deeply $ So, right, the best thing you can do is set up nesting limit. However, to me, the fact that manifests can include manifests is not the least surprising thing.
pgp5cHW149MX2.pgp
Description: PGP signature