> On 05/14/2014 09:39 AM, Sergio Schvezov wrote:
> > How about using 'adb shell dpkg --print-architecture's result as another key
> entry to lookup in the map? Just in case we add some other arch sooner than
> later
>
> can you elaborate? I'm not sure I understand what you are saying here.
I guess I was too sleepy when I commented on this :-/
> On 05/14/2014 09:39 AM, Sergio Schvezov wrote: architecture' s result as another key
> > How about using 'adb shell dpkg --print-
> entry to lookup in the map? Just in case we add some other arch sooner than
> later
>
> can you elaborate? I'm not sure I understand what you are saying here.
I guess I was too sleepy when I commented on this :-/
arch = adb.shell('dpkg --print- architecture' ).strip( )
But instead of constructing the 'key' from appending two strings, a map from the arches seems cleaner:
basic_packages = ( ui-toolkit' , -ubuntu- ui-toolkit- plugin' ,
'i386' : 'qtdeclarative5 -ubuntu- ui-toolkit- plugin- gles'})
{'source': 'unity8', 'binary': 'unity8'},
{'source': 'ubuntu-
'binary': {'armhf': 'qtdeclarative5
But this is just a hassle for the case where they are the same, so this could work:
basic_packages = ( ui-toolkit' , -ubuntu- ui-toolkit- plugin' ,
'i386' : 'qtdeclarative5 -ubuntu- ui-toolkit- plugin- gles'}} )
{'source': 'unity8', 'binary': {'all': 'unity8'}},
{'source': 'ubuntu-
'binary': {'armhf': 'qtdeclarative5
then when looping over basic_packages just
binary = p['binary'][arch] if arch in p['binary'] else p['binary']['all']
or something like that