| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
According to the specification, there is no difference between both kinds
of upstream metainfo files.
Fixes #381
|
|
|
|
| |
Fixes https://github.com/hughsie/appstream-glib/issues/422
|
|
|
|
| |
This reverts commit 3fa624026f608ef8465fb339f86725aaf648e09f.
|
| |
|
|
|
|
|
|
| |
Always store the AppStream metadata version as a string and compare it
like any other version.
This allows to have 0.10 > 0.8 for instance.
|
|
|
|
| |
mingw clang does not support --version-script linker option.
|
|
|
|
|
|
| |
We are now in version 0.14
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
|
|
|
|
| |
Some appstream-data packages add <em> and </em> or <code> and </code> to the files. Not all package manager can handle that. An example would be pamac from Manjaro
|
|
|
|
|
|
|
|
| |
AppStream license syntax allows constructs of form "LICENSE1 AND
LICENSE2". It is possible to confuse this with writing multiple license
xml elements in a metainfo file. In order to spot this type of error,
duplicate detection is added for xml elements metadata_license and
project_license.
|
|
|
|
|
|
|
|
|
| |
Ideally only libappstream-builder would be fixed, but
asb_utils_ensure_exists is (transitively) called from builder too, so
fixing also that.
Fixes: #399
Merges: #400
|
|
|
|
| |
Fixes https://github.com/hughsie/appstream-glib/issues/396
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Align the OARS/CSM mappings of sex-homosexuality and sex-themes, as the
two are identical apart from discriminating on sexual orientation.
This is a follow-up to commit 01e9ee8113a8ad.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoiding storing identical strings is a clever measure to keep the
appstream file small and clean, but it ignores translation differences
between languages and their specific locales.
Applications tend to "fallback" from missing locales by picking a
translation of the same language but from a different locale.
For instance, when missing a "pt_BR" translation, some apps will
pick the "pt" translation instead. That usually works but there
are some cases when it doesn't, such as for international words:
Brazilian Portuguese (pt_BR) tends to use them, while European
Portuguese (pt) has a translation for everything.
This way, "GNOME Boxes" gets translated to "Caixas GNOME" in
European Portuguese (pt) but the same "GNOME Boxes" name is
expected in Brazilian Portuguese (pt_BR).
This was initially reported as a Flatpak issue in
https://lists.freedesktop.org/archives/flatpak/2019-May/001578.html
Because OP was seeing the wrong translations in Flathub and
GNOME Software.
Original commit was done by @felipeborges in his personal branch at
github, commit 54f97aadcd2c00f3d95b472db6e4dda1c0c9865b
|
| |
|
|
|
|
|
| |
We managed to merge two MRs to initialize the unique id mutex. Remove
one of the g_mutex_init calls to avoid doing it twice.
|
|
|
|
|
|
| |
This might make the descriptions a little clearer.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This rationalises it with the OARS/CSM mapping of
sex-themes/intense, and with many western societal norms. It is
against the laws and morals of various western countries to discriminate
on sexual orientation, so the mappings for sex-homosexuality/intense and
sex-themes/intense should be the same.
The mappings for the other values of sex-homosexuality and sex-themes
remain different, as their descriptions aren’t as comparable (for
example, for `mild`, the descriptions are “Indirect references to
homosexuality” vs “Provocative references or descriptions”).
The sex-homosexuality ratings category does need to continue to exist,
though, as it’s illegal in some countries to *not* discriminate on
sexual orientation. Those countries can provide and maintain their own
OARS/age mappings.
See https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/21.
This issue is now being solved in appstream-glib as the content rating
code has been moved there so it can be shared between malcontent and
gnome-software.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are moving to libappstream-glib as they are used by gnome-software
and libmalcontent-ui, and are potentially useful in other projects. In
particular, there are a number of translatable strings which need to be
centralised so that translation work isn’t repeated.
This code was originally written by:
• Richard Hughes <richard@hughsie.com>
• Piotr Drąg <piotrdrag@gmail.com>
• Philip Withnall <withnall@endlessm.com>
• Jordi Mas <jmas@softcatala.org>
It was previously in `src/gs-content-rating.[ch]` in gnome-software,
under the GPL-2.0+; and in `libmalcontent-ui/gs-content-rating.[ch]` in
malcontent, also under the GPL-2.0+. It has been relicensed from
GPL-2.0+ to LGPL-2.1+ for the move to appstream-glib, and all the
previous contributors have agreed. See
https://github.com/hughsie/appstream-glib/pull/364#issuecomment-632773905
and below for their agreements.
In moving it from one project to the other, I have added documentation
comments and tweaked some of the APIs to make them more usable.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| |
|
|
|
|
|
|
| |
It segfaulted when building the error message as data_c->name was invalid.
data_c was a valid tag, so only the data_c->tag union member was active.
Fix the crash by calling the proper function instead and add a test case.
|
|
|
|
|
| |
That should fix FTBFS on some architectures
Fixes: #356
|
| |
|
| |
|
| |
|
|
|
|
| |
2020 seemed like such a long time in the future all those years ago...
|
|
|
|
|
|
|
|
|
|
| |
We are using it, clearing it, but e never initialize it.
For some reasons it seems to work, not sure how or why,
but when glib is uilt with clang, then the problem
surfaces and we get a nice segmentation fault.
Properly initializing it fixes this
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
|
|
|
|
|
|
| |
Win32 docs says that GetFullPathNameA() is not recommended with
multi-threaded applications, since it uses a global variable. As
appstream-glib is a library and can potentially be used in any software,
included in multi-thread cases, let's use _fullpath() instead.
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason, with mingw-w64 64-bit builds, this was just a warning.
But building for 32-bit, linking was failing:
> libappstream-glib/as-self-test.c:99: undefined reference to `GetFullPathNameA'
> collect2: error: ld returned 1 exit status
Adding the appropriate header fixes both the warning and error (since
windows.h includes windef.h, it's actually a replacement).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If an OARS key is missing from a `<content_rating/>` element, the
default value should be `none`, not `unknown`. Change the implementation
of `as_content_rating_get_value()` to do that, and add some tests.
See the OARS specification:
https://github.com/hughsie/oars/blob/master/specification/oars-1.1.md
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
| |
This fixes showing local apps in GNOME Software without AppStream information.
|
|
|
|
| |
Fixes hughsie/appstream-glib#323
|
|
|
|
|
|
| |
Sometimes it is quite helpful to see the values the validator objects.
Especially when it is hard to comprehend why the validation fails if one has,
say, an image in a stale cache which the validator does not have.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timestamp comes from a converted release date but it is in UTC. So anyone
east of UTC will get a "timestamp is in the future" warning for today's date
until UTC ticks past midnight.
According to Wikipedia the highest offset is UTC+14 so let's offset our time
by that much. This way we treat "today" as valid release date anywhere on the
planet.
Fixes https://github.com/hughsie/appstream-glib/issues/317
|
|
|
|
| |
Fixes https://github.com/hughsie/appstream-glib/issues/312
|
| |
|
| |
|
|
|
|
|
|
| |
Flathub is already patching appstream-glib to remove this check.
Fixes https://github.com/hughsie/appstream-glib/issues/302
|
|
|
|
| |
Fixes some of https://github.com/hughsie/appstream-glib/issues/302
|
| |
|