| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
| |
This just exposes the list of valid OARS IDs, so callers don’t have to
keep a copy themselves.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
|
| |
This means they can be reused in another upcoming function.
This introduces no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
| |
This will allow it to be tested in a unit test.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
|
| |
Make it more compact in lines of code and in memory. This introduces no
functional changes (all the mappings should be the same), but it should
make it harder to make typos when editing the table in future.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These mappings were missing from the table, which could result in
as_content_rating_id_value_to_csm_age() returning 0 for
some #AsContentRatingValues even though it would return >0 for a
less-intense #AsContentRatingValue for the same ID.
Fix that by adding additional mappings. There’s no child psychology
knowledge behind the choices: they’re simply copies of the next age for
the same ID, chosen to avoid exposing young children to content which
the mappings didn’t already explicitly expose them to.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While I cannot be 100% sure, this looks like a typo because:
• There is already a social-chat/moderate mapping higher up in the
table.
• social-chat is not an OARS v1.1 addition.
• It’s right below a money-purchasing/mild mapping, and there is no
money-purchasing/moderate mapping.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, it’s not possible to do a round trip from a CSM age to a
set of OARS ratings and back to a CSM age without the age changing; this
is because there are no mappings for ages 16 and 17. Fix that by adding
them.
There is no child psychology knowledge behind the choices of ages here:
they were chosen purely to fit in with the existing ratings and to fix
round trips.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://github.com/hughsie/appstream-glib/issues/280
|
|
|
|
| |
These could be specified per-release or per-component as required.
|
| |
|
|
|
|
|
|
| |
This gets us new meson for https://github.com/hughsie/appstream-glib/pull/281,
and also makes it possible to enable -Ddep11=true for Debian as it's no
longer blocked by too old meson in Stretch.
|
|
|
|
|
|
|
|
|
|
| |
This fixes crashes in gnome-software when concurrently calling
as_app_get_unique_id() from multiple threads.
https://bugzilla.redhat.com/show_bug.cgi?id=1655775
https://bugzilla.redhat.com/show_bug.cgi?id=1643702
https://bugzilla.redhat.com/show_bug.cgi?id=1640446
https://bugzilla.redhat.com/show_bug.cgi?id=1530719
|
|
|
|
|
|
|
|
|
| |
This fixes, among other things, appdata validation when the version goes
from 9.5 to 10, or 0.9 to 1.
This partially fixes https://github.com/hughsie/appstream-glib/issues/270
We're still failing to correctly compare "Build 9.5" to "Build 10".
|
|
|
|
| |
https://github.com/hughsie/appstream-glib/issues/270
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Keep a ref on the AsApp in the worker thread to make sure it doesn't get
destroyed in another thread while being processed.
https://bugzilla.redhat.com/show_bug.cgi?id=1662130
https://bugzilla.redhat.com/show_bug.cgi?id=1661701
https://bugzilla.redhat.com/show_bug.cgi?id=1661382
https://bugzilla.redhat.com/show_bug.cgi?id=1658140
https://bugzilla.redhat.com/show_bug.cgi?id=1644026
https://bugzilla.redhat.com/show_bug.cgi?id=1639558
https://bugzilla.redhat.com/show_bug.cgi?id=1570096
|
| |
|
|\
| |
| | |
Various locking and thread safety fixes for AsStore
|
| | |
|
| |
| |
| |
| |
| | |
When returning early we were leaking GPtrArray *probs which never got
freed. Change it to use g_autoptr to avoid that.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds fine-grained locking around priv->array and various
priv-stored hash table use. There are more thread safe issues in
AsStore, but this should take care of those that cause frequent
gnome-software crashes in F29.
This may regress the perfomance a bit because it changes a few places to
keep a deep copy to simplify locking, but I haven't observed any visible
performance regressions in gnome-software. Also, gnome-software is in
the process of switching to libxmlb anyway so it shouldn't matter a
whole lot in the long run.
This patch takes care to make sure that locking is fine grained enough
so that we can be sure it doesn't lead into deadlocks, and also makes
sure that we never invoke any callbacks (signals) while locked to
prevent deadlocks when a client app calls back into AsStore code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is strictly not necessary for making gnome-software's AsStore use
thread safe as gnome-software doesn't actually use this function, but
let's fix it anyway while I'm at it.
This also updates tests that test the performance of the function as the
deep copying makes it noticably slower (but that's fine because nothing
actually uses it and it's still reasonably fast).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
gnome-software spawns a new worker thread for each of its plugin
operations and occasionally this leads to issues where one thread is
reading from AsStore, and another one is changing it. There's also file
monitor callbacks in AsStore that run in a yet another thread and can
update internal data structures as well.
This leads to a situation where functions returning pointers to internal
data structures can't guarantee the data structure lifetime because
another thread might be changing it in the background.
To fix this, this commit adds new as_store_dup_apps() and
as_store_dup_apps_by_id_merge() functions that return a deep copy of the
internal structure, and updates existing "transfer container"
as_store_get_apps_by_id() to return a deep copy, instead just returning
a reffed container.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Builder checks for gtk+, but the result isn't used anywhere, thus
introducing an unnecessary gtk+ dependency.
-Dbuilder=true -Dfonts=true would still depend on gdk, but a
-Dbuilder=true -Dfonts=false build doesn't anymore.
Closes: #274
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This allows the search to match on e.g. "eog" for an app that has
the ID of "org.gnome.org".
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, as_store_from_file() would either return
G_IO_ERROR_NOT_FOUND or AS_STORE_ERROR_FAILED if the given file did not
exist, depending on its file extension. That is not particularly helpful
for callers.
Instead, guarantee to always return G_IO_ERROR_NOT_FOUND if the file was
not found.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|\
| |
| | |
as-content-rating: Add as_content_rating_get_rating_ids()
|
|/
|
|
|
|
|
|
|
|
| |
This allows the set of rating IDs in the AsContentRating to be returned,
allowing the caller to iterate over them to check their values, rather
than having to hard-code their own list of OARS rating IDs.
Includes a basic test.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
| |
Also tweak a few bits of punctuation I noticed at the same time.
|
| |
|
| |
|
|
|
|
| |
Sometimes we don't want to do the firmware-style heuristics.
|
| |
|
|
|
|
| |
This allows us to drop some hacky code in GNOME Software.
|
| |
|
|
|
|
| |
This allows us to load in a file and export it as AppData XML.
|
|
|
|
| |
This allows us to contruct a AsContentRating without using XML.
|
| |
|
| |
|
|
|
|
| |
See https://blogs.gnome.org/hughsie/2017/07/05/using-a-reverse-style-application-ids-in-your-application/
|
| |
|
|
|
|
| |
See https://github.com/flathub/com.adobe.Flash-Player-Projector/issues/2
|
|
|
|
|
| |
When "looking for" a file, mention which type of file we're looking for,
making it easier to find the debug message this corresponds to.
|
| |
|
|
|
|
| |
If this needs limiting it needs to be done on the generator.
|
| |
|