New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a recursive iglob for filesets #765
Use a recursive iglob for filesets #765
Conversation
This adds support for `**` in filesets for parts. LP: #1616464 Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
retest this please |
os.unlink(os.path.join(root, file_name)) | ||
def snap_fileset(self): | ||
fileset = super().snap_fileset() | ||
fileset.append('-**/*.la') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please copy the comment:
Remove .la files which don't work when they are moved around
👍 |
El 30/08/16 a las 00:49, Leo Arias escribió:
He said he was going to be happy with this one as well ;-) |
…ergiusens/snapcraft into bugfix/1616464/better-fileset-globbing
pth_files.extend([f for f in files if f.endswith('pth')]) | ||
|
||
self.assertEqual([], pyc_files) | ||
self.assertEqual([], pth_files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fails, it might be much easier to digest an error based on the length of the lists rather than directly comparing their contents (it'll print the lists, right?). You could still print the list in the failure message if you wanted.
Very nice! I made one ignorable suggestion, 👍 from me. |
So this is actually a problem. Specifically with the .pth removal. There are several projects that I know of that have the .pth to (ab)use python importing. Here is a line from the dogpile.cache pth file that allows it to import from site-packages/dogpile/cache without having site-packages/dogpile/init.py
there are many such projects that do things like this unfortunately. |
El 22/09/16 a las 13:44, Sam Yaple escribió:
In your snapcraft.yaml, can you try to explicitly add it? |
Thats a silly thing to suggest. This was rather complicated to even figure out why it was broken. Even though I can add this file specifically in, this will lead many people to believe that python does not work well with snapcraft. Indeed, looking through the IRC logs show several cases where people are complaining about it not being able to import a package after this patch merged, I would bet at least some of those are this exact issue. Why is removing the pth file something that is even needed? |
El 22/09/16 a las 14:25, Sam Yaple escribió:
I am not saying we should keep it this way! :-)
I think this was just oversight |
Submitting a patch :) Not a big deal in the grand scheme of things. Shame i just missed 2.18 window though |
El 22/09/16 a las 14:29, Sam Yaple escribió:
don't worry, I am preparing 2.18.1 right now. |
This makes use of `**` in filesets for parts. LP: #1616464 Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
This adds support for
**
in filesets for parts.LP: #1616464
Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com