summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* store: trivial: Fix a typo in commentwip/kalev/as-store-lockingKalev Lember2018-12-141-1/+1
|
* store: trivial: Fix a possibly memory leak in as_store_validateKalev Lember2018-12-141-2/+2
| | | | | When returning early we were leaking GPtrArray *probs which never got freed. Change it to use g_autoptr to avoid that.
* store: Add internal lockingKalev Lember2018-12-141-36/+155
| | | | | | | | | | | | | | | | | | 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.
* store: Return deep copy in as_store_get_apps_by_metadataKalev Lember2018-12-142-2/+2
| | | | | | | | | | 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).
* store: Add thread safe dup() functions for multithreaded clientsKalev Lember2018-12-143-3/+69
| | | | | | | | | | | | | | | | | | 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.
* build: Remove unnecessary gtk dependency for builderMart Raudsepp2018-12-051-1/+0
| | | | | | | | | 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
* trivial: Allow using metainfo.xml files with appdata-to-newsRichard Hughes2018-11-271-1/+2
|
* Add as_release_set_install_duration()Richard Hughes2018-11-273-1/+50
|
* trivial: post release version bumpRichard Hughes2018-11-272-5/+5
|
* trivial: Update self test after app ID tokenizing changesKalev Lember2018-11-271-3/+3
|
* app: Tokenize the ID when adding search tokensKalev Lember2018-11-271-0/+4
| | | | | This allows the search to match on e.g. "eog" for an app that has the ID of "org.gnome.org".
* as-store: Guarantee to return G_IO_ERROR_NOT_FOUND when loading failsPhilip Withnall2018-11-011-1/+7
| | | | | | | | | | | | 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>
* Merge pull request #269 from pwithnall/content-rating-idsPhilip Withnall2018-11-013-0/+58
|\ | | | | as-content-rating: Add as_content_rating_get_rating_ids()
| * as-content-rating: Add as_content_rating_get_rating_ids()Philip Withnall2018-11-013-0/+58
|/ | | | | | | | | | 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>
* as-content-rating: fix 'mey' typoWill Thompson2018-10-241-3/+3
| | | | Also tweak a few bits of punctuation I noticed at the same time.
* trivial: Fix the Since: tag for as_utils_vercmp_fullKalev Lember2018-10-241-1/+1
|
* trivial: Add missing prototype for as_utils_vercmp_fullKalev Lember2018-10-241-0/+3
|
* Add as_utils_vercmp_full() for gnome-softwareRichard Hughes2018-10-242-9/+47
| | | | Sometimes we don't want to do the firmware-style heuristics.
* Release version 0.7.14appstream_glib_0_7_14Richard Hughes2018-10-161-0/+11
|
* Set the AppStream ID from the X-Flatpak desktop keyRichard Hughes2018-10-151-0/+5
| | | | This allows us to drop some hacky code in GNOME Software.
* trivial: Compile the DEP-11 stuff in the RPM spec file exampleRichard Hughes2018-10-151-1/+1
|
* Add as_app_to_xml()Richard Hughes2018-10-092-13/+30
| | | | This allows us to load in a file and export it as AppData XML.
* Add as_content_rating_add_attribute()Richard Hughes2018-10-042-1/+30
| | | | This allows us to contruct a AsContentRating without using XML.
* trivial: post release version bumpRichard Hughes2018-09-282-5/+5
|
* Release version 0.7.13appstream_glib_0_7_13Richard Hughes2018-09-283-15/+36
|
* Add ID provides for desktop files with X-Flatpak-RenamedFromRichard Hughes2018-09-281-0/+12
| | | | See https://blogs.gnome.org/hughsie/2017/07/05/using-a-reverse-style-application-ids-in-your-application/
* trivial: Include glib.h for G_STRINGIFYRichard Hughes2018-09-281-0/+2
|
* Throw an error when a launchable desktop-id is invalidBastien Nocera2018-09-111-0/+7
| | | | See https://github.com/flathub/com.adobe.Flash-Player-Projector/issues/2
* Better debug output for appstream-composeBastien Nocera2018-09-111-2/+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.
* Change order of arguments in matrix-html to match status-htmlsuve2018-08-271-4/+5
|
* Do not restrict the maximum number of releases allowed per-componentRichard Hughes2018-08-161-1/+1
| | | | If this needs limiting it needs to be done on the generator.
* trivial: post release version bumpRichard Hughes2018-08-132-5/+5
|
* Release version 0.7.12appstream_glib_0_7_12Richard Hughes2018-08-131-0/+7
|
* Support localised text in agreement sectionswip/hughsie/agreement-localizeRichard Hughes2018-08-101-28/+75
|
* trivial: post release version bumpRichard Hughes2018-08-092-5/+5
|
* Release version 0.7.11appstream_glib_0_7_11Richard Hughes2018-08-092-1/+12
|
* Add AS_APP_QUIRK_DEVELOPER_VERIFIEDRobert Ancell2018-08-071-0/+2
| | | | | | | This quirk allows apps to marked as having an additional level of checking performed on the developer. This is to give confidence to the user that this is the official version of an app. This is a common design pattern used in modern packaging systems (e.g. Apple App Store, Google Play).
* store: Provide async variants of load functionsFlorian Müllner2018-08-062-0/+147
| | | | | | The existing functions may block, which isn't ideal in IO-sensitive contexts. To address this, add async variants that run the functions in a thread.
* Escape quotes in attributesRobin Richtsfeld2018-07-111-0/+2
|
* trivial: post release version bumpRichard Hughes2018-07-112-4/+4
|
* Release version 0.7.10appstream_glib_0_7_10Richard Hughes2018-07-111-0/+10
|
* trivial: Sync translations and remove line numbersRichard Hughes2018-07-1130-10686/+6111
| | | | This will mean we get smaller release diffs in the future.
* trivial: Fix a small memory leak when adding keywords manuallyRichard Hughes2018-07-111-1/+3
|
* Do not require a release transaction when validating in relaxed modeRichard Hughes2018-06-271-1/+3
| | | | | | | This allows upstream projects to prepare (and translate) the release data before know the actual release date. Fixes: https://github.com/hughsie/appstream-glib/issues/246
* Merge pull request #245 from robert-ancell/check-typesRobert Ancell2018-06-2719-7/+271
|\ | | | | Add object type checks on the inputs of all functions
| * Add object type checks on the inputs of all functionsRobert Ancell2018-06-2719-7/+271
|/
* Add COMMITMENT file as part of GPL Common Cure Rights CommitmentRichard Hughes2018-06-181-0/+45
| | | | | | | | | | This is part of more broader commitment Red Hat along with IBM, Google, and Facebook made in November 2017. More on this can be found online: https://www.redhat.com/en/blog/fostering-greater-open-source-development & https://www.redhat.com/en/about/gplv3-enforcement-statement
* trivial: Fix GObjectIntrospection markup for adding metadataRichard Hughes2018-06-131-1/+1
|
* Do not parse firmware filesRichard Hughes2018-06-1224-961/+34
| | | | Firmware should now be distributed using the LVFS and consumed by fwupd.
* its: Extract release descriptions and agreement sections for translationPiotr Drąg2018-06-101-1/+4
|