Support zip files as source #523

Merged
merged 2 commits into from May 26, 2016

Conversation

Projects
None yet
2 participants
Collaborator

sergiusens commented May 26, 2016

LP: #1577062

Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com

sergiusens added some commits May 26, 2016

Support zip files as source
LP: #1577062

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>

@sergiusens sergiusens merged commit c9fe150 into snapcore:master May 26, 2016

3 of 4 checks passed

Examples tests
Details
autopkgtest Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.008%) to 95.652%
Details

@sergiusens sergiusens deleted the sergiusens:feature/1577062/zip-source branch May 26, 2016

+ else:
+ shutil.copy2(self.source, self.source_dir)
+
+ self.provision(self.source_dir)
@kyrofa

kyrofa May 27, 2016

Member

This doesn't seem to be implemented in this class. Should it be, and raise a NotImplemented or something?

@sergiusens

sergiusens May 27, 2016

Collaborator

I've been told lately it is not really necessary, it just needs to behave and act like a duct :-)

I am only saying this since it is tightly controlled code.

@kyrofa

kyrofa May 27, 2016

Member

Alrighty.

+ file = os.path.join(self.source_dir, os.path.basename(self.source))
+ with open(file, 'wb') as f:
+ for chunk in req.iter_content(1024):
+ f.write(chunk)
@kyrofa

kyrofa May 27, 2016

Member

Not for this PR, but we really need a progress bar here. Perfect use-case for one. I made a bug for it.

@sergiusens

sergiusens May 27, 2016

Collaborator

Good idea. I hope not, this already merged 😩

Member

kyrofa commented May 27, 2016

You have my retroactive 👍

josepht added a commit to josepht/snapcraft that referenced this pull request May 31, 2016

Support zip files as source (#523)
LP: #1577062

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Support zip files as source (#523)
LP: #1577062

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment