-
Notifications
You must be signed in to change notification settings - Fork 657
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
<lsb-release> reader #1781 #2096
Conversation
…eprecated flags in <QString> <split>.
Hi @surahman, thanks a lot for your work on this! Unfortunately, we've discussed the disparity between Instead, we should probably read from We're still discussing details, and we'll get back to you again, but we wanted to let you know so that you don't spend any more time. |
Hi again @surahman, So we discussed a bit and confirmed Multipass needs to work on macOS/Windows too, so this would need to be a platform dependent implementation. That can be achieved by declaring a free function in Notice that the Linux implementation should still use std::string multipass::platform::host_version() // returning single string probably enough for our purposes
{
return mu::in_multipass_snap() ?
our_snap_impl_reading_os_release() :
fmt::format("{}-{}", QSysInfo::productType(), QSysInfo::productVersion());
} Let us know if you have questions and thanks again for your involvement! |
I am on it. I am happy to help and I am learning a lot from your codebase. These interactions and exercises are a great learning/practice tool and it is even better if it is of assistance to someone. |
I will go ahead and abandon this branch and PR to start on a new branch - it is the cleanest way to revert changes. I will cross-reference the two PR's once I have the new one up. |
I have created a new branch instead of doing a hard reset on this one: #2105 |
Thanks @surahman, I'll close this one then. |
2105: [platform] Read Snap Linux OS Release r=ricab a=surahman **_Issue #1781:_** Creating changes requested in #2096 on a new branch instead of doing a hard reset on the original branch to maintain the changes in the original files whilst I work. Tests have been added to the `PlatformLinux` fixture and an empty value in a field is treated as `unknown`: ``` NAME="" ... VERSION_ID="" ``` I have not wired into `/src/daemon/daemon.cpp` string pollination because the suggested format of `distro_name-distro_rel` does not match the original. Co-authored-by: Saad Ur Rahman <saad.ur.rahman@gmail.com>
With respect to issue #1781:
I have developed tests and utility routines to read the
lsb-release
file on Ubuntu-based systems when applicable. When it is unavailable, or parsing fails, there will be a failover to the previous method of usingSysInfo::productType()
andQSysInfo::productVersion()
.