Conversation
Made adjustments to support an acceptable layout for actions on the product selection page. This change is expected to be temporary until the migration to PatternFly 6 is completed, at which point the entire page will be revamped.
Still pending retrieving the license to display it in the dialog open when user clicks on the license link.
Apart from displaying only available languages, still pending interface improvements and unit tests.
Pull Request Test Coverage Report for Build 12866228169Details
💛 - Coveralls |
They were there just for testing purposes.
| Jiné. Uplatnění Konvence OSN o smlouvách v mezinárodním obchodě se | ||
| zbožím je tímto výslovně vyloučeno. | ||
|
|
||
| ©2013 SUSE LLC nebo její přidružené společnosti. Všechna práva |
There was a problem hiding this comment.
license copyright looks quite old :)
|
|
||
| let body: String = std::fs::read_to_string(license_path).ok()?; | ||
|
|
||
| Some(LicenseContent { |
There was a problem hiding this comment.
I would like to see here at least a bit of logging, like candidates and found licese so we know from logs why given license is shown.
There was a problem hiding this comment.
IMHO that's too much logging just for retrieving a license (the logic is pretty straightforward). But I can live with that :-)
| /// The language is inferred from the file name (e.g., "es-ES" for license.es_ES.txt"). | ||
| fn language_tag_from_file(name: &str) -> Option<LanguageTag> { | ||
| if !name.starts_with("license") { | ||
| return None; |
There was a problem hiding this comment.
this basically means there is some mess in our directory. Maybe we should also log here.
|
|
||
| let mut licenses_repo = LicensesRepo::default(); | ||
| if let Err(error) = licenses_repo.read() { | ||
| tracing::error!("Could not read the licenses repository: {:?}", error); |
| let software_issues = issues_router(&dbus, DBUS_SERVICE, DBUS_PATH).await?; | ||
| let product_issues = issues_router(&dbus, DBUS_SERVICE, DBUS_PRODUCT_PATH).await?; | ||
|
|
||
| let mut licenses_repo = LicensesRepo::default(); |
There was a problem hiding this comment.
so if read below failed it will act as NulObject? And not display any license?
There was a problem hiding this comment.
It considers there repository is empty. We could add some logging.
mvidner
left a comment
There was a problem hiding this comment.
For traceability, we should mention where we took the license texts from
- in this commit message 'feat(live): add licenses to the live image '
- or in the PR description (which will get committed too)
| const { products, selectedProduct } = useProduct({ suspense: true }); | ||
| const [nextProduct, setNextProduct] = useState(selectedProduct); | ||
| // FIXME: should not be accepted by default first selectedProduct is accepted | ||
| // because it's a singleProduct iso. |
There was a problem hiding this comment.
this can be really issue with s390 SLES iso as it is single product. So I would ask in advance
There was a problem hiding this comment.
In a single product ISO, if there is a license, the product will not be auto-selected. So we should be safe.
Good point. I am adding it to the PR description. Thanks! |
Prepare for releasing Agama 12: * #1858 * #1887 * #1890 * #1892 * #1893 * #1894 * #1896 * #1898 * #1899 * #1900 * #1901 * #1906 * #1908 * #1909 * #1910 * #1911 * #1912 * #1914 * #1915 * #1917 * #1919 * #1920 * #1921 * #1922 * #1923 * #1924 * #1926 * #1927 * #1928 * #1929 * #1930 * #1931 * #1932 * #1933 * #1934 * #1935 * #1936 * #1937 * #1938 * #1939 * #1942 * #1943 * #1945 * #1948 * #1949 * #1952 * #1953 * #1954 * #1955 * #1957 * #1958 * #1959 * #1961 * #1963 * #1964 * #1967 * #1969 * #1970 * #1971 * #1972 * #1973 * #1974 * #1975 * #1976 * #1977 * #1979 * #1980 * #1981 * #1982 * #1984 * #1986 * #1987 * #1988 * #1990 * #1991 * #1992 * #1993 * #1995 * #1996 * #1997 * #1999 * #2000 * #2001 * #2002 * #2003 * #2004 * #2005 * #2006 * #2007 * #2008 * #2009 * #2010 * #2011 * #2012 * #2013 * #2014 * #2015 * #2016 * #2017 * #2019 * #2021 * #2022 * #2025 * #2027 * #2029 * #2030 * #2031 * #2033 * #2034 * #2035 * #2036 * #2037 * #2038 * #2039 * #2040 * #2045 * #2046 * #2050 * #2053 * #2054 * #2055 * #2056 * #2058 * #2060 * #2061 * #2062 * #2063 * #2064 * #2066 * #2067 * #2068 * #2069 * #2070 * #2071 * #2072 * #2073 * #2075 * #2076 * #2080 * #2082 * #2083
Problem
Agama does not show the license of any product and does not ask the user to accept it. This is a requirement for beta 1, and it needs to be implemented as soon as possible.
Solution
Extend Agama to allow the specification of a license per product. The license should be accepted on the product selection page. The solution does not cover all cases (e.g., openSUSE licenses are not there yet) and the technical details might change soon. But it is expected to be good enough for beta 1.
The licenses are included in
/usr/share/agama/eulawith one directory per license. The directory name is used as the license ID (license.betaandlicense.final) and it contains the translations.Licenses
The licenses come from the https://build.suse.de/package/show/SUSE:SLE-15-SP7:GA/skelcd package.
Testing
Screenshots
Click to show/hide some screenshots
Be aware below screenshots were taken using mock data for emulating a license in a product and illustrating the new interface controls and behavior.