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

repo: add multiarch support for stage packages. #1050

Merged

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Jan 14, 2017

Resolve LP: #1655797 by adding support for staging packages meant for another architecture with the 'name:arch' syntax. Note that the build machine needs to be configured to pull packages for that architecture, though (dpkg --add-architecture).

Now stage packages can use 'name:arch' syntax to stage packages meant
for another architecture. Note that the build machine needs to be
configured to pull packages for that architecture, though
(`dpkg --add-architecture`).

LP: #1655797
LP: #1592022

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
@codecov-io
Copy link

codecov-io commented Jan 14, 2017

Current coverage is 96.33% (diff: 74.07%)

Merging #1050 into master will decrease coverage by 0.03%

@@             master      #1050   diff @@
==========================================
  Files           194        194          
  Lines         17441      17467    +26   
  Methods           0          0          
  Messages          0          0          
  Branches       1345       1349     +4   
==========================================
+ Hits          16808      16827    +19   
- Misses          432        436     +4   
- Partials        201        204     +3   

Powered by Codecov. Last update 81f56fd...128a262

@sergiusens
Copy link
Collaborator

hmmm, I guess you missed the comment on the mailing list where I said I would fix this. It would be ideal to focus on the other cases. There is a simpler solution for this.

@kyrofa
Copy link
Contributor Author

kyrofa commented Jan 17, 2017

hmmm, I guess you missed the comment on the mailing list where I said I would fix this. It would be ideal to focus on the other cases. There is a simpler solution for this.

Indeed I did. Alright, I'll assign it to you.

@kyrofa kyrofa closed this Jan 17, 2017
@kyrofa kyrofa reopened this Jan 17, 2017
# __getitem__ is tricky
self.assertThat(
mock_apt.Cache().__getitem__.call_args_list,
Contains(call('fake-package:arch')))
Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, this seems to be the way :-)

In [7]: p = a['bash']

In [9]: p.architecture()
Out[9]: 'amd64'

In [10]: p = a['bash:i386']

In [12]: p.architecture()
Out[12]: 'i386'

self.assertThat(
exception.output, Contains(
"Error downloading stage packages for part 'my-part': The "
"Ubuntu package 'hello:fake-arch' was not found. You may need "
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a newline after the . and before the You? Would make it much more readable on a console

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good call-- done.

Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

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

Finally had time to test this out 👍

@sergiusens sergiusens merged commit 298f2fe into canonical:master Jan 25, 2017
@mardy
Copy link
Contributor

mardy commented Feb 13, 2017

Filed a bug about the same feature, just for build-packages:
https://bugs.launchpad.net/snapcraft/+bug/1664141

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017
Now stage packages can use 'name:arch' syntax to stage packages meant
for another architecture. Note that the build machine needs to be
configured to pull packages for that architecture, though
(`dpkg --add-architecture`).

LP: #1655797
LP: #1592022

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
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

4 participants