You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
The dbus method com.canonical.SystemImage GetChannels returns all channels from the system-image server. This would be acceptable if every device had its own system-image server, but we have many devices and channels on a single server. This causes a huge list of channels to be returned for the call:
qml: CHANNEL IS 16.04,arm64,mainline,rc
qml: CHANNEL IS 16.04,arm64,mainline,stable
qml: CHANNEL IS 16.04,armhf,hybris,devel
qml: CHANNEL IS 16.04,community,anpok,devel
qml: CHANNEL IS 16.04,community,fredldotme,devel
qml: CHANNEL IS 16.04,community,guf,devel
qml: CHANNEL IS 16.04,community,kuailexs,devel
qml: CHANNEL IS 16.04,community,walid,devel
qml: CHANNEL IS ubports-touch,16.04,devel
qml: CHANNEL IS ubports-touch,16.04,edge
qml: CHANNEL IS ubports-touch,16.04,rc
qml: CHANNEL IS ubports-touch,16.04,stable
This is not desirable, as it puts the work on the client to determine if a channel is appropriate for the device or not. This is not possible using any of the data which can be returned by system-image via dbus. Instead, we should only return a list of channels which are applicable for the current device.
The current code for returning this list inside system-image is not terribly smart. It only checks to make sure the channel is not hidden, an alias, or a redirect. If none of those are the case, the channel is fine as far as it's concerned.
Prior to this commit, get_channels would return every channel which was
available on the system-image server, which was not at all desirable.
Some changes to the test helpers were needed to make this happen. All
tests were previously written to assume only the nexus7 was available,
and my new test cases needed a different device as well.
Fixes#12
Prior to this commit, get_channels would return every channel which was
available on the system-image server, which was not at all desirable.
Some changes to the test helpers were needed to make this happen. All
tests were previously written to assume only the nexus7 was available,
and my new test cases needed a different device as well.
Fixes#12
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The dbus method
com.canonical.SystemImage GetChannels
returns all channels from the system-image server. This would be acceptable if every device had its own system-image server, but we have many devices and channels on a single server. This causes a huge list of channels to be returned for the call:This is not desirable, as it puts the work on the client to determine if a channel is appropriate for the device or not. This is not possible using any of the data which can be returned by system-image via dbus. Instead, we should only return a list of channels which are applicable for the current device.
The current code for returning this list inside system-image is not terribly smart. It only checks to make sure the channel is not hidden, an alias, or a redirect. If none of those are the case, the channel is fine as far as it's concerned.
system-image/systemimage/dbus.py
Lines 403 to 412 in aabc2fd
The code which it eventually calls back to is in the Mediator:
system-image/systemimage/api.py
Lines 124 to 131 in aabc2fd
And, through a couple more levels of indirection, the Channels class:
system-image/systemimage/channel.py
Lines 42 to 58 in aabc2fd
We should be able to change GetChannels so it only returns the channels applicable for the current device.
The text was updated successfully, but these errors were encountered: