Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Copy entire source, even if source-subdir is specified. #344
Conversation
sergiusens
reviewed
Feb 27, 2016
| - tmpdir = tempfile.TemporaryDirectory() | ||
| - self.addCleanup(tmpdir.cleanup) | ||
| - plugin.builddir = tmpdir.name | ||
| + self.assertEqual(os.path.join(plugin.buildbasedir, |
sergiusens
Feb 27, 2016
Collaborator
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
reviewed
Feb 27, 2016
| plugin.build() | ||
| - self.assertTrue(os.path.exists( | ||
| - os.path.join(plugin.builddir, 'src', 'file'))) | ||
| + self.assertTrue(os.path.exists(os.path.join(plugin.buildbasedir, |
sergiusens
Feb 27, 2016
Collaborator
Same comment about eyeballs :-)
self.assertTrue(
os.path.exists(os.path.join(plugin.buildbasedir, 'file')))or
self.assertTrue(os.path.exists(
os.path.join(plugin.buildbasedir, 'file')))
sergiusens
reviewed
Feb 27, 2016
| plugin.build() | ||
| - self.assertTrue(os.path.exists(os.path.join(plugin.builddir, 'file'))) | ||
| + self.assertTrue(os.path.exists(os.path.join(plugin.buildbasedir, |
sergiusens
Feb 27, 2016
Collaborator
ditto
self.assertTrue(os.path.exists(
os.path.join(plugin.buildbasedir, 'file1')))
sergiusens
reviewed
Feb 27, 2016
| self.installdir = os.path.join(self.partdir, 'install') | ||
| + self.buildbasedir = os.path.join(self.partdir, 'build') |
|
I am |
|
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 |
|
Grr... over quota or some such thing... |
|
retest this please |
|
retest this please |
|
Tested locally-- examples pass. |
added a commit
that referenced
this pull request
Feb 29, 2016
kyrofa
merged commit 27e36fe
into
snapcore:master
Feb 29, 2016
kyrofa
deleted the
kyrofa:bugfix/1549676/source_subdir_still_copy_all
branch
Feb 29, 2016
kyrofa
referenced this pull request
Feb 29, 2016
Merged
Backport to 1.x: Copy entire source, even if source-subdir is specified. #349
pushed a commit
to smoser/snapcraft
that referenced
this pull request
Sep 14, 2016
pushed a commit
to kalikiana/snapcraft
that referenced
this pull request
Apr 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kyrofa commentedFeb 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.