[pacman-dev] [PATCH 13/23] doc: document misc

morganamilo morganamilo at archlinux.org
Mon Dec 7 22:19:46 UTC 2020


---
 lib/libalpm/alpm.h | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 76ae5722..494a8319 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -2068,11 +2068,6 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive);
 /* End of alpm_packages */
 /** @} */
 
-/** Check for new version of pkg in sync repos
- * (only the first occurrence is considered in sync)
- */
-alpm_pkg_t *alpm_sync_get_new_version(alpm_pkg_t *pkg, alpm_list_t *dbs_sync);
-
 /** @addtogroup alpm_trans Transaction
  * @brief Functions to manipulate libalpm transactions
  *
@@ -2212,20 +2207,25 @@ int alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg);
 /* End of add/remove packages */
 /** @} */
 
+
 /* End of alpm_trans */
 /** @} */
 
-/*
- * Helpers
- */
-
-/* checksums */
 
 /** \addtogroup alpm_misc Miscellaneous Functions
  * @brief Various libalpm functions
  * @{
  */
 
+/** Check for new version of pkg in syncdbs.
+ *
+ * If the same package appears multiple dbs only the first will be checked
+ *
+ * This only checks the syncdb for a newer version. It does not access the network at all.
+ * See \link alpm_db_update \endlink to update a database.
+ */
+alpm_pkg_t *alpm_sync_get_new_version(alpm_pkg_t *pkg, alpm_list_t *dbs_sync);
+
 /** Get the md5 sum of file.
  * @param filename name of the file
  * @return the checksum on success, NULL on error
@@ -2238,8 +2238,6 @@ char *alpm_compute_md5sum(const char *filename);
  */
 char *alpm_compute_sha256sum(const char *filename);
 
-/** @} */
-
 /** Remove the database lock file
  * @param handle the context handle
  * @return 0 on success, -1 on error
@@ -2248,10 +2246,14 @@ char *alpm_compute_sha256sum(const char *filename);
  */
 int alpm_unlock(alpm_handle_t *handle);
 
+/** Enum of possible compile time features */
 enum alpm_caps {
-	ALPM_CAPABILITY_NLS = (1 << 0),
-	ALPM_CAPABILITY_DOWNLOADER = (1 << 1),
-	ALPM_CAPABILITY_SIGNATURES = (1 << 2)
+        /** localization */
+        ALPM_CAPABILITY_NLS = (1 << 0),
+        /** Ability to download */
+        ALPM_CAPABILITY_DOWNLOADER = (1 << 1),
+        /** Signature checking */
+        ALPM_CAPABILITY_SIGNATURES = (1 << 2)
 };
 
 /** Get the version of library.
@@ -2264,6 +2266,9 @@ const char *alpm_version(void);
  * */
 int alpm_capabilities(void);
 
+/* End of alpm_misc */
+/** @} */
+
 /* End of alpm_api */
 /** @} */
 
-- 
2.29.2


More information about the pacman-dev mailing list