From 31bd2912e1cd4c3db71b703023e475ae1bf0970b Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Thu, 25 Jan 2018 08:06:54 +0800 Subject: [PATCH] lib: Document that flatpak_installation_update_fulls throws if up to date This is not the ideal outcome, but it does avoid breaking behaviour stability across versions. Fixes #1336 Closes: #1337 Approved by: alexlarsson --- lib/flatpak-installation.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/flatpak-installation.c b/lib/flatpak-installation.c index 953f842f..fbf3b8b3 100644 --- a/lib/flatpak-installation.c +++ b/lib/flatpak-installation.c @@ -1524,7 +1524,13 @@ flatpak_installation_install (FlatpakInstallation *self, * * Update an application or runtime. * - * Returns: (transfer full): The ref for the newly updated app (or the same if no update) or %NULL on failure + * If the specified package is not installed, then %FLATPAK_ERROR_NOT_INSTALLED + * will be thrown. + * + * If no updates could be found on the remote end and the package is + * already up to date, then %FLATPAK_ERROR_ALREADY_INSTALLED will be thrown. + * + * Returns: (transfer full): The ref for the newly updated app or %NULL on failure */ FlatpakInstalledRef * flatpak_installation_update_full (FlatpakInstallation *self, @@ -1629,7 +1635,13 @@ out: * * Update an application or runtime. * - * Returns: (transfer full): The ref for the newly updated app (or the same if no update) or %NULL on failure + * If the specified package is not installed, then %FLATPAK_ERROR_NOT_INSTALLED + * will be thrown. + * + * If no updates could be found on the remote end and the package is + * already up to date, then %FLATPAK_ERROR_ALREADY_INSTALLED will be thrown. + * + * Returns: (transfer full): The ref for the newly updated app or %NULL on failure */ FlatpakInstalledRef * flatpak_installation_update (FlatpakInstallation *self,