A nicer error message for incorrect stage-packages #524

Merged
merged 2 commits into from May 27, 2016

Conversation

Projects
None yet
3 participants
Collaborator

sergiusens commented May 27, 2016

LP: #1568131

snapcraft/internal/pluginhandler.py
self.ubuntu.get(self.code.stage_packages)
+ except repo.PackageNotFoundError as e:
+ raise RuntimeError("Cannot find {!r} defined as 'stage-packages' "
+ "for {!r}".format(e.package_name, self.name))
@kyrofa

kyrofa May 27, 2016

Member

"Cannot find 'libfoo' defined as 'stage-packages' for 'bar'" doesn't read very well. What about "Error downloading stage packages for part 'bar': no such package 'libfoo'" ?

@sergiusens

sergiusens May 27, 2016

Collaborator

El 27/05/16 a las 11:57, Kyle Fazzari escribió:

In snapcraft/internal/pluginhandler.py
ubuntu-core#524 (comment):

         self.ubuntu.get(self.code.stage_packages)
  •    except repo.PackageNotFoundError as e:
    
  •        raise RuntimeError("Cannot find {!r} defined as 'stage-packages' "
    
  •                           "for {!r}".format(e.package_name, self.name))
    

"Cannot find 'libfoo' defined as 'stage-packages' for 'bar'" doesn't
read very well. What about "Error downloading stage packages for part
'bar': no such package 'libfoo'" ?

sure

Member

elopio commented May 27, 2016

👍 , but I agree with Kyle, his message is better.

Collaborator

sergiusens commented May 27, 2016

@kyrofa @elopio that better?

Member

elopio commented May 27, 2016

💯

Member

kyrofa commented May 27, 2016

Beautiful! 👍

@sergiusens sergiusens merged commit 0c05bd6 into snapcore:master May 27, 2016

2 of 4 checks passed

Examples tests Started
Details
autopkgtest Started
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.1%) to 95.793%
Details

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

@sergiusens sergiusens deleted the sergiusens:bugfix/1568131/error-message-for-stage-packages branch Aug 30, 2016

kalikiana 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