Skip to content
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

Copy entire source, even if source-subdir is specified. #344

Merged

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Feb 27, 2016

Currently, if source-subdir is specified, Snapcraft copies ONLY that subdir (and excludes the rest of the source) and attempts to build from it. This only works for some projects, not all. A better solution is to copy the entire source and simply build from WITHIN the subdir. This PR fixes LP: #1549676 by introducing exactly that change. It does so without changing the plugin API or semantics.

@kyrofa kyrofa force-pushed the bugfix/1549676/source_subdir_still_copy_all branch from 92a5e00 to 45667dc Compare February 27, 2016 19:05
tmpdir = tempfile.TemporaryDirectory()
self.addCleanup(tmpdir.cleanup)
plugin.builddir = tmpdir.name
self.assertEqual(os.path.join(plugin.buildbasedir,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there will be less indentation eyeball matching if done like

self.assertEqual(
    os.path.join(plugin.buildbasedir, options.source_subdir),
    plugin.builddir)

@sergiusens
Copy link
Collaborator

I am 👍 but would really like those cosmetics fixed as I have difficulties aligning if it is too deep 😉

@kyrofa
Copy link
Contributor Author

kyrofa commented Feb 27, 2016

Easy changes! I'll keep that in mind for the future-- I've always tried to stretch the line as far as it'll go but you're right, it has its limits. Thanks for the review 😃 .

Currently, if source-subdir is specified, Snapcraft copies
ONLY that subdir (and excludes the rest of the source) and
attempts to build from it. This only works for some projects,
not all. A better solution is to copy the entire source and
simply build from WITHIN the subdir. That is the change
introduced here.

LP: #1549676

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
@kyrofa kyrofa force-pushed the bugfix/1549676/source_subdir_still_copy_all branch from 45667dc to 6beb6fe Compare February 28, 2016 00:46
@kyrofa
Copy link
Contributor Author

kyrofa commented Feb 28, 2016

Grr... over quota or some such thing...

@sergiusens
Copy link
Collaborator

retest this please

1 similar comment
@sergiusens
Copy link
Collaborator

retest this please

@kyrofa
Copy link
Contributor Author

kyrofa commented Feb 29, 2016

Tested locally-- examples pass.

kyrofa pushed a commit that referenced this pull request Feb 29, 2016
…l_copy_all

Copy entire source, even if source-subdir is specified.
@kyrofa kyrofa merged commit 27e36fe into canonical:master Feb 29, 2016
@kyrofa kyrofa deleted the bugfix/1549676/source_subdir_still_copy_all branch February 29, 2016 15:22
smoser pushed a commit to smoser/snapcraft that referenced this pull request Sep 14, 2016
Exceptions thrown from rdma processing thread running in
the background were not logged properly.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017
…bdir_still_copy_all

Copy entire source, even if source-subdir is specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants