Globstar syntax not working?

I have the following filesets snippet in my recipe:

      library-shared:
      - lib/**.so*
      - usr/lib/**.so*

      library-static:
      - lib/**.a
      - usr/lib/**.a

However it doesn’t seem to select any files, is it normal?

I see nothing in the filesets docs to indicate that double asterisks have any special meaning.

1 Like

I somehow have a faint feeling that it did sometime ago…

Also, Use a recursive iglob for filesets (#765) · kalikiana/snapcraft@93c82f5

/cc @sergiusens

ok, I see. It should work then, even though it’s not documented (the code has moved but it’s still there)

Now, playing around with iglob, it seems that if what you want is "any *.so* file anywhere under lib, the way to write that is lib/**/*.so*. From the docs,

the pattern “**” will match any files and zero or more directories and subdirectories. If the pattern is followed by an os.sep, only directories and subdirectories match.

meaning that lib/**.so* will match lib/foo.so and lib/foo/.sowhat but not lib/foo/bar.so.

1 Like

meaning that lib/**.so* will match lib/foo.so and lib/foo/.sowhat but not lib/foo/bar.so .

Thanks a million.