ubports / ubuntu-ui-toolkit

Moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit
https://gitlab.com/ubports/core/lomiri-ui-toolkit
GNU Lesser General Public License v3.0
13 stars 21 forks source link

Replace dpkg-architecture with uname -m #13

Closed vanyasem closed 3 years ago

vanyasem commented 6 years ago

Some test like tests/unit/runtest.sh run dpkg-architecture to determine host's architecture.

That's not the best solution, as dpkg-architecture is Debian-specific, and not available on Arch GNU/Linux, for example.

A possible solution would be to replace dpkg-architecture with uname -m.

vanyasem commented 6 years ago

uname -m can return armv7l, aarch64, i686, x86_64

dobey commented 5 years ago

Unfortunately uname -m is not a sufficient replacement here, as the values needed are not what uname gives. For example, we need armhf instead of armv7l and amd64 instead of x86_64.

vanyasem commented 5 years ago

@dobey you can replace them in a switch statement for compatibility reasons. sticking to dpkg-architecture is worse, as it only works on debian-based systems

dobey commented 5 years ago

@vanyasem What I mean is, we can't straight up replace them, and depending on what the usage is, there's probably a far better thing to do. Running uname -m and then replacing with the correct values seems wrong, especially if it's something we'd have to copy around to multiple trees.

vanyasem commented 5 years ago

@dobey you're welcome to suggest a better solution. In any case, there is no solution implemented yet, and no PRs open

UniversalSuperBox commented 3 years ago

Ubuntu UI Toolkit has moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit. If this issue is still relevant, please file it again at https://gitlab.com/ubports/core/lomiri-ui-toolkit/-/issues.