From patchwork Mon Dec 7 22:19:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1823 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id BAAE31C9979AC for ; Mon, 7 Dec 2020 22:46:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, MAILING_LIST_MULTI=-1,RCVD_IN_MSPIKE_H4=-0.01,RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: [127.0.0.19] Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379740; bh=yW6F7MEUAFRBzA8kaOOMBq429wgxJwByTgp2sKaLmQs=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=i1FJFSTulcSi8ZxkV5q05kHCgo3YmoAB1Z+NmptfNuAonU9sHAWJRoDbQ5dBngq9P U0cvwLf6EI1otiYbsl+jiaU3LwykiGsofX5RAht56g0lTxqU8oEO17gZKyP0hAT5yk cBJZOICrWEp/T7SnwXXGgKiC0mzPHpxj7YsVD+3pWocyylv+65xc4JpBIZrFq/AuXZ Xku2w9JlU9ewOVrna+xbbDWe6QzgoDjBFqR+ScGhY9lilNDQB0OIZCiifbdnB1XRKz NXQIsCr8XecScLa/+xizDg4AkT7Rhbezy8ydFCoqwj7RK9ITkeExXLr7sYY2EL+Sfd ALtAceoBMQ6xD0DUp+VTNfXb9sFRBOjXSxia6YDqT6yeT553UpsmpnGq1H7+2tuyFf Lkm0mhTRPwfdtzFMGt6+HU334p5gtj/2qE+Iw/mlplOJapYgjIdGCXrY5p5PAqpxnk V7iEuBNDDm0yzTZu/qUbn2euT28XO+iVYNXEag5NoJaHaJaMN+2Khc6VqeqNi5+j3C oZ+E2GD6Q5pk8EHsFXWHn5QdWVh63+ltqjGETWsqFFB6lVR6HFkIUR5NmdAd5BEHi+ Gof//4UmAi8Rlx1dSZy4m2+Bw714rlvPflYwtuNwATKWqP3VvznqjACgCMyGp8DPcY 9gQRbanatGNCzQhwsUpMKCiI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607381189; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/Er8rRgmBg0yqtmns5uzTv4lwbrzeyWTlHyFt7qlO6g=; b=Ws5aZJfQK25AGAgC4+7VFGnQ/oQMbvuynHJ5Z+oKAJKvz9ocEWXNqFmtAs5B0u2gx3qxEU z20oJJH3JzBCDV0VqnyyLDg8LRinvraKi4gU3EsTVL5v1GP0L4jECNXpYHIyyyONBi+aP1 /2jqZg0ekDZtcko3dAxbsKRkW8T2vuAI2CxVippwNvDauefUC4TmFoRQHSCjxYqZbG3661 9jtE80lB5UYvpaq4TWgOi2BiX7U6uqnIiGU9ml3JI/GAgOdZT0Rv3+cbo178kKzZ8NK3/L uK78Ps+Y5YFAM0n/v5qG1/Vx3rnGZNkQDcOLZX2HZ2O2H5hm/m6zw1NgKd7JGapkxkRPCh +MyIBGdw6nMn/iFM6mB+GNFNDXEev35qpewD1pzekww8d1GD0/aWv4XJX7BFfTHuyS9BO1 l8lVBMT7aVj2K2KZKMIgJ+7ltamzsRCS6q7UMkTmcSIqteS1eq4X5kHPHXFIqNUE+Rwxgu cmWDrHCnJmQwVpyctvzN82Aue419eKaRGJNyBsSgxKb37Go3Z7hJh9VSmEgosC97tNjNmV dxeuqZCXre5ELsd1ZD0B+i67zRo+9NhrtK8B/Sx1GpZyiT0JkTMUYydIF3m1TiWaDsSnPy HpZv0Td14HZwubtcQuAGSm4JVR79kIRME6mHSTrc0XIlERefq8ZRU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607381189; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/Er8rRgmBg0yqtmns5uzTv4lwbrzeyWTlHyFt7qlO6g=; b=JazH0BuR8J5/yDA88e0ZwE7fqDQXok+aq7oWRLv5RLz1fiMEUTga8EtAEFz2po7Nv241BT +LkQK2SMWSOUsSDA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Er8rRgmBg0yqtmns5uzTv4lwbrzeyWTlHyFt7qlO6g=; b=egDDrMtNZDrS7/0G+e68+kTiDgXA9xBj3JZ4BoX9OvQXzTZGSiTDao7EvU9y5q1juyi4lX xgV79qGHaJCa6DLANOuO3DhSdTiTfjGMHu4hSO+QGdfqepOrR+HALMd1mQ/M8+jzBaMV6F itTx0Sb1yb7YtQzl328RWBAFoNRbCvpH0lngHQZIk4eu/XN8WWq6fOqh+U5pLCnMMPluVP 2HripI2tiva07Vrqfwj+S+7+AdycO3pgvM9VTI5VIOwl7zxj5gXcQ1tJjQCpwB8i2iYRvj GWd/AOPIW3jPBb8IRPeXUaV9IyP0vWAetdDCGzUK59wsOomeegarpv5R+0uV6+RUf3m/K9 baTQ9Mi15SZZPJPx8fbjjTKOr8OXv55WGVRaW5f1LebKe3XJNZQYI2gSpYY3r8bliFpz24 H0EFqNCcWrxf9PXEVL3kA8LmGjSXP4KoxfRoaZEaeyHNa9q0lmkX0ynJ2/NPDTySHaywxk IKLK+ddGp9locqCILpI6yaNdv+G6FGWNK1ycn0PbAjy9K3PGDf27EXBaDjPWLwFUZdMrTu S3Hoc5i9KYINH/t6k/wrxwkgj9+YquVPRxdkVlzwiTNXa/+qVmtpfzTCEQK8RnL2Ax1Is4 PinwiLhYWQ7XzDclDGom8S0cz0tS/BX3oMEwq4RoEEmvH1CRcjJYA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Er8rRgmBg0yqtmns5uzTv4lwbrzeyWTlHyFt7qlO6g=; b=ruB2yT7dhwz1jLKirtrvZPdbx4ZxtXFP+hV93cwKtgXiB8WZXJ0PVfvO3mYXmC6k4xr6P2 2gpNnITJp+1FaXDw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:46 +0000 Message-Id: <20201207221956.667322-14-morganamilo@archlinux.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201207221956.667322-1-morganamilo@archlinux.org> References: <20201207221956.667322-1-morganamilo@archlinux.org> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 13/23] doc: document misc X-BeenThere: pacman-dev@archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; auth=pass smtp.auth=luna smtp.mailfrom=pacman-dev-bounces@archlinux.org --- 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 */ /** @} */