-
Notifications
You must be signed in to change notification settings - Fork 31
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
Generated Components.yml contains duplicate language in Keywords - invalid YAML #92
Comments
I'm having trouble setting up appstream-generator to reproduce this case, but I think the issue may be in
|
@iainlane seems to be the primary author of this file? |
Very odd... The The easiest fix though is to not feed "bad" values in in the first place, which should be fixed in asgen (which may not necessarily be an issue limited to the Ubuntu backend). |
@ximion can you transfer this issue to appstream please? This is fixed by something like iainlane/appstream@a0246f1 Not proposed yet, because
|
We have some locales which are dupes if we do this, for example ca_ES.UTF-8 and ca_ES.UTF-8@valencia. The latter of these should become ca_ES@valencia in the output. That is what `locale -a` shows. Previously `as_locale_strip_encoding ()` modified the passed-in string in place. However, in the one place where don't `g_strdup ()` the string before passing to this function, it is the key in a `GHashTable`. We can't do this, and only get away with it because the hash table isn't touched after this call. Fix the function to instead return a newly allocated string, and drop the `g_strdup` calls from the other call sites. Add a small test for this function too. ximion/appstream-generator#92
We have some locales which are dupes if we do this, for example ca_ES.UTF-8 and ca_ES.UTF-8@valencia. The latter of these should become ca_ES@valencia in the output. That is what `locale -a` shows. Previously `as_locale_strip_encoding ()` modified the passed-in string in place. However, in the one place where don't `g_strdup ()` the string before passing to this function, it is the key in a `GHashTable`. We can't do this, and only get away with it because the hash table isn't touched after this call. Fix the function to instead return a newly allocated string, and drop the `g_strdup` calls from the other call sites. Add a small test for this function too. ximion/appstream-generator#92
We have some locales which are dupes if we do this, for example ca_ES.UTF-8 and ca_ES.UTF-8@valencia. The latter of these should become ca_ES@valencia in the output. That is what `locale -a` shows. Previously `as_locale_strip_encoding ()` modified the passed-in string in place. However, in the one place where don't `g_strdup ()` the string before passing to this function, it is the key in a `GHashTable`. We can't do this, and only get away with it because the hash table isn't touched after this call. Fix the function to instead return a newly allocated string, and drop the `g_strdup` calls from the other call sites. Add a small test for this function too. ximion/appstream-generator#92
We have some locales which are dupes if we do this, for example ca_ES.UTF-8 and ca_ES.UTF-8@valencia. The latter of these should become ca_ES@valencia in the output. That is what `locale -a` shows. Previously `as_locale_strip_encoding ()` modified the passed-in string in place. However, in the one place where don't `g_strdup ()` the string before passing to this function, it is the key in a `GHashTable`. We can't do this, and only get away with it because the hash table isn't touched after this call. Fix the function to instead return a newly allocated string, and drop the `g_strdup` calls from the other call sites. Add a small test for this function too. ximion/appstream-generator#92
This should be fixed with snap revision 153 (ish) onwards, which is built using the new version of appstream, 0.14.4. Unfortunately, as release pockets are immutable, we have no way of fixing the broken YAML which is out there for hirsute. Fixing that issue would be #29, but it's not fully there yet for this purpose. Thanks for reporting. |
The components file in Ubuntu (
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hirsute_main_dep11_Components-amd64.yml.gz
) fails YAML parsing due to containing duplicate languages in the Keywords mapping.Specifically the first entry fails:
The YAML specification states:
The text was updated successfully, but these errors were encountered: