From patchwork Mon Dec 7 22:19:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1810 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 A22BC1C9966F0 for ; Mon, 7 Dec 2020 22:22:17 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379725; bh=PXbhFNmKecoInhF8edsv7zrzWszjQRm14xUCS7ArOmY=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=GHQi8VV0HBh6m9pZ0lrWsKAUDIX2KphgNdHdCDLS9Spl9e5UizEQcB8dawFGs1ZeM tDMHva++QPHsbl6QdqmmXT59lQ+j6GRChvjS6eB3ZHU0n29nelZq6hey0Wrj3IXiad +T2/8QALuvScQmLGDkZXln1fj6t8G2wl1Fv667t5Gtf3VMSPTa2DhnoMlP9mVUM/+u XkGp/tk0mZBdP30B32cWlb12V48hGvXSB8oAmdXN2zFRHZEhmVl6qqTxmYJHH1owD0 nN2TwRFzTqjp/vus/pmJ6JvyQVpKLl4zzbqbWGVgohee88SHT4+MQcBdX9KbZz3OK3 pKGazku+XxLCD09korB5lsI2SYPOzY8IsaPRZI8imPxqEXFH/xp0b8vVvnSUqqZ9QO fZfrJqW9oYRqrRaUL6YSpVUPVRT+etlbnuwozef7h62jEzqpPJNAHN3br+OMNHg0eg +B45Gr64Vc2COfqjRJEuXLFIu/uPoPLEKFmw8smXe6Fete/2/mfFCNhb34Ht2aoOpQ n8ULFfm126+0RS+o9AUozFhRsTDuVm7/sR59RCT0L93dmYRLnJkc5oJLpk5B3cGNgz Fj/kabURyeodhQV664npIgSTsWZQJRvQbyUHbzheBKC5erlig4+8CmxX5IKFnx1m6s 7YosxzbfwVkj/brZ2wh9dtaE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379726; 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=n8Sq0+XnriAvg1vsRW1X/mJf/jBSy+wXPgq10niw7ao=; b=wAjMCrPAp/1I2Bv8rf1UB2nhrMzJJK1SzwcYRoSyCqvQWTCGF0MPJJoXfDUF0s6KYtQLrw srWoy7YsU336csmDcDOPAClT9buGo5sdin5Bz8GwxIT5MnElng5M02C6C9CNT/NeObuvlP 4KjyZFkO59h/32lxJMZUHTkBsKWrZNjgH29/Vjz3NKmJ7PRsi9m0e1wnWocAKAAZoO89YT oVoTRaanyRHnaWO66EmPzQf1y8QcbrnFxd+E4Q2N/qH9h1QdV0ZvazzuwD422ptgo2xib0 FdNHL88yqd5PoG6OszarTlom+u+piqGOdveQFk79dbW5Di1ZTkn4lLO8usPg9JAxrJa2qR 4l1dp/YanvkXzeI0EHmrGEuiq2Fpa4vBXglCJBkjRFAQ3rnBVvARkiHMdFfQTWzw68dAUI FKsk1lFpq4oUG15gBsbs5NNLy4kzZne8pQcW5wgN8FJ2LANf0F8msJojvw5EYBJArIk/qp HAn54aYW37GXXDnXuYZ1okQ8jUimVJMgAJ7sFX88VE45P3ngfMbfFxSgQWPm/LMJk4m6gL +WTL7lxc9t/+hif8ds8QfSGmFCvLZWdLKwfk245PCyTgdw6RElPDa+sdpKMtjlU5H7BW3A 5eHwr3Z6q19brovjumi5MTVRwJ2Wgx8nCw1+fSQ0tI3Nvy/IbGGfs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379726; 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=n8Sq0+XnriAvg1vsRW1X/mJf/jBSy+wXPgq10niw7ao=; b=g7b98MAayFsS/KfBARnkZKFRc7Gyd7c4XB9Y5yfnBK7w3sGo+3igwM8v3bF2qRTd2yoPIf YsrUtrk94AsLHACA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379722; 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=n8Sq0+XnriAvg1vsRW1X/mJf/jBSy+wXPgq10niw7ao=; b=NpuFfmMZPTjTUTVkD42g1xkSB2R4lvWL3r+TKzrXWlM5htL2kNKTpxvdEUlsUzsc2a0QhA gHu4ywJaGl5WWArtktC0/r7Wm8oegWlA14fmEGwrMYMPfluRnLx+VJapkcpmZocZRkJIQZ DI2Cqgmvg3lXGPKRzfokO02ax69shS0AJeXaFxumYPhyrn2ha5wh+1XcNT6JKj+JG6VSUx FyY74LKqKoOcBOEXU2s+sWDKXZicF0ddIrOksCeI2JnDnlaQ73UfOY+P34+6KpEf4kwr5Z Xoeula/Y2MH0UzFHUJJa5EBSp8jfangZpuB6K498UPr+2JzC1tbssQab6ACLTDAamSvbVu rrwGHvkS1xh2VNARa7qKYriyLTapCR5dYJ9C6ESMVb5RIcB9Ux5cibcc/EIwYS2G+EPoH7 JVAXLE94qunU+5nFbEZBMGJJa/ENDHF8yzX2JpRcaTGEA4JOv5zPGUWxlcQH/nZtdYUAis ApB6DruQgMze8wyOYuapjbvDQ4fmipymyLbM2LldijQrZdYP4tcfIkTwLvnwkTz5pF/CtV 41NfbIUmIWX1HdyrAHYC+ryQeFkXhQobFijBvjGFUUDK8uqy/J5cVUckZo0IFmz+NNw7t1 wGWdgzSUhS+nLTYQxwus0etATocwH8nCwSF7JDxby33Zwt/CD7WhE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379722; 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=n8Sq0+XnriAvg1vsRW1X/mJf/jBSy+wXPgq10niw7ao=; b=kWfrT0A8P0CG1JXP9CmI8CfWyfMBEfhknt7K0VxIKR9Tla52DHDtT6SOOI31UwXggE9Fep Wm26LPDarCLnn3Cw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:34 +0000 Message-Id: <20201207221956.667322-2-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 01/23] doc: remove stray doxygen comment 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/trans.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index c7317c15..303d2fca 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -266,8 +266,6 @@ int SYMEXPORT alpm_trans_release(alpm_handle_t *handle) return 0; } -/** @} */ - void _alpm_trans_free(alpm_trans_t *trans) { if(trans == NULL) { From patchwork Mon Dec 7 22:19:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1811 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 344611C99670A for ; Mon, 7 Dec 2020 22:22:21 +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=-0.6 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, LOCAL_FAKEBUSINESS=0.5,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:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379728; bh=Hsb2R2h7sFeRAgsgHpQcmwwXrl4SArBYB/Cn/PKezp0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=n/XqyGtug9lk0rfjzty5C+wQWtByQw+tILXqYcpIXGdTCTPzJDs/r/tyB6eVdRYeX PbGXs34ZBOnPXp8M2Xk1/Hbv2Xe7x2Z4VoiaMrAzj0c7um0nsKP56tV22sVeKO7GQ6 daazBKFH5mrNBqjXM0FPpRtn0k+TkOGksSB8YVU8o6Lu1oMzMae+BSvFb6KtSWEBpn TGWJVmn/Eher0v4CnbWp2/O7f0jXexi+hbsKZeCIErinn6VbGNmoFpbqBTLUQ9oCX1 +Ub/8+ggv+lUIudVErO+wo8nORi+ZPreACNtJ2WDtKkhUnMtVI8MauTDGTC0Tf9QhQ Jx/N+8X8UNoN7azZ7CC41GTUYp6QjvZeTKb1FZFAODhnOC1WyXpe5O4R9sW5iLCI+o tZwYmNeX4zamc+O41dTUqVRTCrrZ2DhOEXAVYkhm9pu2xNKK4gJncNyqXt+aie9k83 NeND+K2qjaR996gzBJQc3EfNFLZkl+R08h+z7pm4oIG2OLZxDJQIrdN3Wak/fQHguh 5oP3ywUZtd69woZU0dd19YSC1h+pRDpyO330qxY278sOFa9RVhNSk7BT1OU635FGw/ G9iFCIQsSGeZ9M7jyUR8N4GTiC/HK62H3OoAxLMtK/S1Ceu12bdTgG79Br4uVQ+yE3 e+SJIFjweZF2cHekdaw6Swts= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379729; 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=JU3L3IUMKYFlPpIKO7R1yzmQuYbN4nsZwPBXVF4Pajg=; b=AL61WWnFLEmWYnyqzocwv61TbnWWP7bpzfxgnEoBLud5cD08FS3ZTrgb8mswHASWFh8XI3 FDKdszK3RSnsQey2SE8fnRnY75o4B5SogzUskZ5yubYf8IiOsgWJoH65r4n3qzTg+fHPAh F/upYz+U0Bm/p36UE+IizQDX6uEw/Re6pdDFFvQf8X7if+HgQsnryLLOrVXfKrRW0wLTIx 6wBkyIHelYJ9SMqnYldIYKnUJuJgNYKT6kUKdF95gS4IQxQW4zi0lcgnm813qwy147NuOu q/KmHizPvvDFGygzE4kcy49C9vEnqJaix14a145qENrtcHsnOEXxUqCvEqEG32e3k/iORO 02uElJNVLn6U0PaX7823MDlizvbTjF1J3wkw2mKyfixLmowAuz45FRGIucEa1qb05PqvYX 91Yq58TEjYbGLFpERbOp+vg3hDtEwEZ9eYHJMGDl1/4v9GR4RLWvui+Q6LlwBI0yFG249Z DrovfS6AhC04WlzMVYNMwUwZZ8y954DxtSk87JIjodhpSVa23nOJigcA3K1Cr9GdfUFOBI Z5im6iyapxX+Sl5qzUxyuNSkZXoRkRMBXoHxAYZEQ5fYet5Zq71rtYfsb4GzGEG02McocM IpoTsDnOLkKX+eBSKbQwf05X34xs0MrIPricuWItddB0HaIX7qY90= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379729; 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=JU3L3IUMKYFlPpIKO7R1yzmQuYbN4nsZwPBXVF4Pajg=; b=CZQmiUzdIzQOmj4PAtraOP0mBbdTcys74JETst7zL6sih+2Waz7LTf5n3zNlc0wZWFVRT1 2hWPM38L9ZFhyfBg== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379723; 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=JU3L3IUMKYFlPpIKO7R1yzmQuYbN4nsZwPBXVF4Pajg=; b=UXKnYIM/BFIQlDVRfvdRnJEZ9wguTFc+7yu67jhGOKxBNPxVSFphixWbZHi9z0PksVlejj b7GqrGF9M5ukgMqZPBPUod7dSD68QC/uTan1ObBdRvqMD18xp7TtR7S6lS2V47XHM1uE7a eyx5MqhzRj6AteO8EFlABp/VohbjUErWLd3D2r0wo3YhckCLMQi+C1PjlhDBdAm9l6F7cp QyJuMA1uOxIoPksRD7Xcsj1sxqPJiO7f48vX9Hm1HmPdCz/bnDxdTdllesn7y2w7h21SjX nCzFyAMyMxu4QA2btbPVyHJRRF0/kRCqWvP2jdp4Of4Oh7NCTt1PB/i5OFLiaSRFr0xDZz 0Z46yhUQBLNV651jOlJ2oPPFhOjTP6lAXFtWuHs5mKEYsbgW1XdgzhFZetD0Hh0WN/DW5M JX9rjhWD6dT6F9Y2MScMIMKRAar0N/aRdh85depVlrbT9cbRiq592TSY6YcLdbxoLPHHnm jllc1MWhY4bjpg7FXEgS9jX2HISu2XYDm09bJCLDrjkA+JqkUCaXrChX9+XU0dSNk/cw54 z6OIWICoOioROgc3RvdzsRAus1mSOmRZtFFJNC+yZ/GJCGdl5lrAMcXoYhiz6bM08iwPfY yPFDL+Gh/aYxeLSZDIL8B6jcGEyYpFEQtY3rUAUaIIfn56aLRXj8I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379723; 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=JU3L3IUMKYFlPpIKO7R1yzmQuYbN4nsZwPBXVF4Pajg=; b=q/vLa+koOk3g+ttXDkioR0kvHCBtdrdc1tCjd1ozs/Jd8ksBjoFSGl+MF/734wBeTWGcjA dpLeKBQs8mY4TxAg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:35 +0000 Message-Id: <20201207221956.667322-3-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 02/23] doc: add doc header to alpm.h 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 50c4bb6b..48ba7fdc 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -20,6 +20,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +/** + * @file alpm.h + * @author Pacman Development Team + * @date 7 Dec 2020 + * @brief Arch Linux Package Manager Library + */ + +/** @mainpage alpm + * + * libalpm is a package management library, primaraly used by pacman. + */ + #ifndef ALPM_H #define ALPM_H From patchwork Mon Dec 7 22:19:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1812 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 6C2911C996712 for ; Mon, 7 Dec 2020 22:22:24 +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:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379728; bh=Fu2M/Kj/5AsDGRc0Mb5JIfPTYLC9aeO6epNLxyQ4q14=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=K+0PoBvlkq6Z95DUIqR5kyCU/ogSY2GvU/9g3d2hLhzd7QGjzFjZ+X2ItD/AePm5Y 3siRJ0KI+CKnJlO/ro00nfb6XuaFQuVvCQpl59JEyrUAl0gujcX4zEdmOE01KMsU/z l7BztI6mIgwAeWbfwNeW2mEl6SqBtS7oiY//M4fCHw9LzdKy7VuJp5lYv+PEb7TWZk 64hTJt3PAJOlwnSn+6/d3/SXCRjaeM2isI6N6J+JvkmToW5t3Tv3SQHpuKe2MwfQTP zU51ATD/laAZ0AE5C9YapIkJlAgYLHhNcG8ARGUWafQ8Jztwi81FncjuKGBSMkJgIK BDALoEajl6eyf9dwaciEt10s7Q4zEGnXpRGbc2FFseqvRedd/vPHPjKDbAnzkPUegJ ipk/K2/o/8bvI/WtOErxcce3dQZOo9+QrLBSfGOXeE99WadrS6ZUuT8XeBzLQbxy1g B+sMCMOTSjbnrY608r9HV0nhfvFTEa12+v9MrGF1JqgEY0FWYZYsQic95d3Bfvzroa LH7v8M262T47tICq6kr8BzN8Qrf/Qvqg3ypfj28rzI8/ob6N4VvjB2HhLUSsOKiUOA i49ehUJ7zB05fqOY55I+ZvdvkFwqaPN/XmNNi08VB1EahXWZJLQIIfpXhfOJvqOs8s hJD/842TTdkGQgXqW4SBxLKc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379730; 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=x9K+fEjMABNWEC0XNIvj8xE5reYj0gBbe9qH0gQVTh4=; b=z5corx2G0uZorqqg3h5jio16eVW+4CX5HFFZgiyclbQWnDi6NB6GNwiLFCQQAh7Jq/N6CF 9lk6welRiFoQd1kLqG5Fs6NCVziKuxs7GZ+5fhv2p22fLe7NyeHz2W+/FM2ipflxpA1h1h w+1vWUVyEht7vZFsDRAO+62/VXAtlJB71/75cgJzq2MIY4JeNuhV01q0pe17JOlTQYift6 FsLfz3kyU0XFQxBGNw3zm7WB8NbZ7ylhCs1YNfQehkqUSzZ1ws3DuYkyPCIX8vPv2QxSsS LplYqKFky+6c8NW38TA4LLrqkScFEZ+v7qAJtqEbGgom4ahrJOdIMiD08/pFChn3aNJGeq QvXjkQeZyNR6cJln1QQH7CaE7HBC6HvJ3sFeHxXYxN6qOXq+2JCTf8tei9PiPBZe4BtKIm 7KS7EH50mMiIPynMv15+gAXpDOQ2RguOHVSYb09qnbsW34/VMjszN6dxLwAZWfioAUo60T Q69gl/iiQFgT/zFG8tj5l60oYXyewTXpxKfnNIHkzRtj1tRb8O3F37vAVeFtK2JAcmMjxV 04XaPgD4jkOYX28t8oVuAgQNUDeKcYNkdTYBvJCr4AYb4pNaji9ExDXK3MpHX6Pr6Z9+c0 osB3wvB4udbgfrqjgZLya46YT4DWeY+UIGT3/U8AhGZwOIASe/no8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379730; 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=x9K+fEjMABNWEC0XNIvj8xE5reYj0gBbe9qH0gQVTh4=; b=jkuiP/XqiHgcgqEWg0rEqETUZ5O492BOYSFzYMuyZ4xHskgCw61XolEcuWxkA4agAMlfLJ 5RRmGBxJ2WFfMvAA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379724; 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=x9K+fEjMABNWEC0XNIvj8xE5reYj0gBbe9qH0gQVTh4=; b=SnSRWQHHtyjdMri88lFSVED+XvW+Ymp5pU4spw71OO2E/GVS2jfZyraBI5gtXerJald85V q1OmB0k5knthDw7qEKn9oL/fjKHl0AQvZi2J694Rx/KTkSueOFb9lvx/QBmyx3d5ZF/WWS mDyRbTV6OOFAyZAgKkkk/oBhJ9ht1dv2ZRcZMaKyCe2crXn/3rAEwJry9LGitRTNa+XorE 4ShkHNJ/MWW2MHThM8uuO1lBDWa4fVvqIGgjRH9oLZp2qfakcEaKrJYKUfEDiuPG74j7In 3t0MT+XtGeMAEXoxUAVfcU5+JEKKijcx9qFPzVyYrt1623gxe5hIt5khXzyhXShtunvtxe wp3koWaeug++G8yacnW2DDp2IfMYSFMwR3U88HfWbgyXs8JJYY6UFzwQZxbBbZ6Vf6aMCR iGijroVRBIeHlGjjbed6vjpo0TwLseDE5sapSFXlruLgkPJDXL6nzS2f4wLI8rAtTkKdbI quFCl3ZVUWcTbfh0MSYAGQpc3nYZ7bkRCNBIefKapKgNd6Y5VPDQWXMoHu/DTqO9JtpMDc 9TbnbxtItRRmF4QrY2YzaSyq93weTxWjjd5eTNNgmtSndxZ7UyIdhe1eSOywRWREHvT0ZV W2fl0s7okZnmdryUREbma9t9WHxp6qKLtPeIpKYPO6mW3Vh6YhpIY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379724; 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=x9K+fEjMABNWEC0XNIvj8xE5reYj0gBbe9qH0gQVTh4=; b=WcEonef1JYO7XEZnsnIyy2n0FdmpQ9Wyfv6ZwIkQ7ra7TVlhXwyz+p68xauLjeZ7OmKn6f 5KkT9cYhGSOiBxAw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:36 +0000 Message-Id: <20201207221956.667322-4-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 03/23] doc: document error 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 | 122 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 109 insertions(+), 13 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 48ba7fdc..1c2422ca 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -51,102 +51,198 @@ extern "C" { #include /* - * Arch Linux Package Management library + * Opaque Structures */ -/* - * Opaque Structures +/** The libalpm context handle. + * + * This struct represents an instance of libalpm. */ typedef struct __alpm_handle_t alpm_handle_t; + +/** A database. + * + * A database is a container that stores metadata about packages. + * + * A database can be located on the local filesystem or on a remote server. + * + * To use a database, it must first be registered via \link alpm_register_syncdb \endlink. + * If the database is already preasant in dbpath then it will be usable. Otherwise, + * the database needs to be downloaded using \link alpm_db_update \endlink. Even if the + * source of the database is the local filesystem. + * + * After this, the database can be used to query packages and groups. Any packages or groups + * from the database will continue to be owned by the database and do not need to be freed by + * the user. They will be freed when the database is unregistered. + * + * Databases are automatically unregistered when the \link alpm_handle_t \endlink is released. + */ typedef struct __alpm_db_t alpm_db_t; + + +/** A package + * + * A package can be loaded from disk via \link alpm_pkg_load \endlink or retrieved from a database. + * Packages from databases are automatically freed when the database is unregistered. Packages loaded + * from a file must be freed manually. + * + * Packages can then be queried for metadata or added to a \link alpm_trans_t transaction \endlink + * to be added or removed from the system. + */ typedef struct __alpm_pkg_t alpm_pkg_t; + +/** Transaction structure used internally by libalpm */ typedef struct __alpm_trans_t alpm_trans_t; -/** @addtogroup alpm_api_errors Error Codes + +/** @addtogroup alpm_api ALPM + * @brief The libalpm Public API + * @{ + */ + +/** @addtogroup alpm_errors Error Codes + * Error codes returned by libalpm. * @{ */ + +/** libalpm's error type */ typedef enum _alpm_errno_t { + /** No error */ ALPM_ERR_OK = 0, + /** Failed to allocate memory */ ALPM_ERR_MEMORY, + /** A system error occurred */ ALPM_ERR_SYSTEM, + /** Permmision denied */ ALPM_ERR_BADPERMS, + /** Should be a file */ ALPM_ERR_NOT_A_FILE, + /** Should be a directory */ ALPM_ERR_NOT_A_DIR, + /** Function was called with invalid arguments */ ALPM_ERR_WRONG_ARGS, + /** Insufficient disk space */ ALPM_ERR_DISK_SPACE, /* Interface */ + /** Handle should be null */ ALPM_ERR_HANDLE_NULL, + /** Handle should not be null */ ALPM_ERR_HANDLE_NOT_NULL, + /** Failed to acquire lock */ ALPM_ERR_HANDLE_LOCK, /* Databases */ + /** Failed to open database */ ALPM_ERR_DB_OPEN, + /** Failed to create database */ ALPM_ERR_DB_CREATE, + /** Database should not be null */ ALPM_ERR_DB_NULL, + /** Database should be null */ ALPM_ERR_DB_NOT_NULL, + /** The database could not be found */ ALPM_ERR_DB_NOT_FOUND, + /** Database is invalid */ ALPM_ERR_DB_INVALID, + /** Database has an invalid signature */ ALPM_ERR_DB_INVALID_SIG, + /** The localdb is in a newer/older format than libalpm expects */ ALPM_ERR_DB_VERSION, + /** Failed to write to the database */ ALPM_ERR_DB_WRITE, + /** Failed to remove entry from database */ ALPM_ERR_DB_REMOVE, /* Servers */ + /** Server URL is in an invalid format */ ALPM_ERR_SERVER_BAD_URL, + /** The database has no configured servers */ ALPM_ERR_SERVER_NONE, /* Transactions */ + /** A transaction is already initialized */ ALPM_ERR_TRANS_NOT_NULL, + /** A transaction has not been initialized */ ALPM_ERR_TRANS_NULL, + /** Duplicate target in transaction */ ALPM_ERR_TRANS_DUP_TARGET, + /** A transaction has not been initialized */ ALPM_ERR_TRANS_NOT_INITIALIZED, + /** Transaction has not been prepared */ ALPM_ERR_TRANS_NOT_PREPARED, + /** Transaction was aborted */ ALPM_ERR_TRANS_ABORT, + /** Failed to interrupt transaction */ ALPM_ERR_TRANS_TYPE, + /** Tried to commit transaction without locking the database */ ALPM_ERR_TRANS_NOT_LOCKED, + /** A hook failed to run */ ALPM_ERR_TRANS_HOOK_FAILED, /* Packages */ + /** Package not found */ ALPM_ERR_PKG_NOT_FOUND, + /** Package is in ignorepkg */ ALPM_ERR_PKG_IGNORED, + /** Package is invalid */ ALPM_ERR_PKG_INVALID, + /** Package has an invalid checksum */ ALPM_ERR_PKG_INVALID_CHECKSUM, + /** Package has an invalid signature */ ALPM_ERR_PKG_INVALID_SIG, + /** Package does not have a signature */ ALPM_ERR_PKG_MISSING_SIG, + /** Cannot open the package file */ ALPM_ERR_PKG_OPEN, + /** Failed to remove package files */ ALPM_ERR_PKG_CANT_REMOVE, + /** Package has an invalid name */ ALPM_ERR_PKG_INVALID_NAME, + /** Package has an invalid architecute */ ALPM_ERR_PKG_INVALID_ARCH, + /** Unused */ ALPM_ERR_PKG_REPO_NOT_FOUND, /* Signatures */ + /** Signatues are missing */ ALPM_ERR_SIG_MISSING, + /** Signatures are invalid */ ALPM_ERR_SIG_INVALID, /* Dependencies */ + /** Dependencies could not be satisfied */ ALPM_ERR_UNSATISFIED_DEPS, + /** Conflicting dependencies */ ALPM_ERR_CONFLICTING_DEPS, + /** Files conflict */ ALPM_ERR_FILE_CONFLICTS, /* Misc */ + /** Download failed */ ALPM_ERR_RETRIEVE, + /** Invalid Regex */ ALPM_ERR_INVALID_REGEX, /* External library errors */ + /** Error in libarchive */ ALPM_ERR_LIBARCHIVE, + /** Error in libcurl */ ALPM_ERR_LIBCURL, + /** Error in external download program */ ALPM_ERR_EXTERNAL_DOWNLOAD, + /** Error in gpgme */ ALPM_ERR_GPGME, - /* Missing compile-time features */ + /** Missing compile-time features */ ALPM_ERR_MISSING_CAPABILITY_SIGNATURES } alpm_errno_t; -/** Returns the current error code from the handle. */ +/** Returns the current error code from the handle. + * @param handle the context handle + * @return the current error code of the handle + */ alpm_errno_t alpm_errno(alpm_handle_t *handle); -/** Returns the string corresponding to an error number. */ +/** Returns the string corresponding to an error number. + * @param err the error code to get the string for + * @return the string relating to the given error code + */ const char *alpm_strerror(alpm_errno_t err); -/* End of alpm_api_errors */ +/* End of alpm_errors */ /** @} */ -/** @addtogroup alpm_api Public API - * The libalpm Public API - * @{ - */ - typedef int64_t alpm_time_t; /* From patchwork Mon Dec 7 22:19:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1813 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 384441C99671C for ; Mon, 7 Dec 2020 22:22:27 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379728; bh=+V6JiqHdHMpB+x3gluPCJE1qUbe5hS1X0g7N+RK/Vog=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=RUqz94MXIN/KedTXVqfPM7psTwK//SfjhhndJoWE4bxcgAwTmM9INt00EWUPuZ2Ct Dk2j+n1uKMkgP3O6K9qZtMHRPz39r2GksgAraHO5IvZ1UhgGXY5S2f9nI3ffZBYHp8 7840tAnbw8ORzyYNDRftHIf+e1ljtSsV8Kr3BgKEqGmNNHBFCJK9N6SElCa0A1oG74 g7X+UmnKU3DikzH8Ym4Bu61hTjys1Z8J4W1wEsFWyaqEUL3yuyKNUe1VZEHKR52u3/ PjmYJ+YRoJW2ceoGsvsWUuinKdKcw8rPCPQnvpedT+suz9wn4QqQ59dh8EHUuvoYiW o6Dfh/cZeYt5iEbHXvl0StIYGVfC9BlYbYOsCFGoAALnArRdTr382EV3N9LKrW6PFt OKmjsQ7mmOcZ2Xtm6ZJiytx3ccNtUHt7BpyL8TF5xuRhFS7ycWkKYmIRaduKn+HmOb HX1wd4prJYawz6qCeas7CQzWUhSXJJLiXhQEOauXbz36SG7hJzlx/Vnsqzol5tSoWP g3CgtX8HCziUXVW1ZW52CIpQz72frLXVEFgXFTRYl83HeWxCcUD6gwrzZ2R1IanZRS nspwJhpzHUbvqzNqeDNy9m51g85hrX/0ZAXvEtjceSg2gMDzdrbyhsfCDbASQG7fNv T174WCNr3pWdCHQREABps7cs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379733; 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=vjl+2ONJxVfZ04xVq0FgLRlooLCxiXytIRv5HpjsVRk=; b=2mgLeONTeVIIrpvwcmZ2g5/FmlPh1/F3h9aWBssA6mfhRbFL+KlCI8ZbXwdsU70XHLo0ij nhmBB9WuNi/divCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379733; 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=vjl+2ONJxVfZ04xVq0FgLRlooLCxiXytIRv5HpjsVRk=; b=Bc/7IhDxRy5UnVgBKpvqnmlR0+3HB5//uZL29TAEn/jaJlGvBwKUm/P3/jiZ35Rnl7vn31 JH/shHPAA+S8nUfSN/g4xzjvl1b7hxvBbTlVBgMjQRxTFeUoEjUaa8vqTm4XkIsc5e+YJN vM4Qz595aZ/8WUNUyavLCTcR5aqyM2NwORD67mhega+fQa5f8wkW0jduiBrakgf4yC1yEl /stI7UZGD2B10jNMKBGY64RzuPlOLm0Kq+pHC+OQS+Ii82cw474O/MqIf7ne/EhVCUgfT9 JZ/WjTHbVEcUL8mzS8BWs2VsbZEhtfgBcA0GOHyEJlrTUgvd3AkpBYzDzxJdoq87gEmtKO lW+P3243s+XfYQVulexvE2qK7Vw1BcbT12G9jK1O/CBRwmjyWQyqZCiOJD6gViySyxmNL7 gFYGsGOYc+7jpVgKSBpyxqz+JAQROmbuTQhq7rKwcpHkTUjZWHs6jXUiLYFBIbXTzVfyXy i6LXd+UkOHuuXtgq/Fn3BYPGcS0iYDHShaL+NV9aCABi8CMPkW70cYFzQ2cBD5BaVcwiC6 hwEFhP1L/ZasYEzi+ajAL1fGcBbC5J36iaovUvbB1R4jKzuxMcXcEmuTsXeL61aNwzOlfE VLoRyIZuWgJ5EvfKrVpNBEDZW+ZduVgrpCuMJKBU/smeSFgytW0Vk= From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379725; 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=vjl+2ONJxVfZ04xVq0FgLRlooLCxiXytIRv5HpjsVRk=; b=tf7rg2yxZKsr+vqSE9CSbcfsRtFSvdKj4XZiwg2AKwWF4cPPU0Byg4NyC57kVMAIzqhjGX dEsQHjRQG2zELGFW6d7SkXAi4/sBH9COIhqZO6PgwrcJLcPYCqvnJo4DfN0o7z/towrGyV j1BQsYSahVvcGRGTM1Spz/vn+aXQuZIQhIRk9TBQ7qsIr64eBZbz+vq6Lrum0mKnES2N+t j2uVk8pt8Mg00FpUXgO7VKXCo7UoVOz15iXOO93WLI/e4nxNKKKBKRZCkPPCot8R+ydZ1q vuIdKUqD0bPKSNOZmf8aPSXxZhNIZz7dpQI36wBvJb0z090701Bc6FoP404vZ9U4N5AP6c eUD3tyn4IjVHd+YL7jVMJh1qX56qdVQLG15GBApa+ThqulCp0IopuI3CQRZXOyVLo9bHQn jyNFlCB8RUl5gBgkR8+fJ0kUGyAuYSGGVhB+g+g8z5d/Vj0TENZBUv3DHmjzu8UFS32WcZ FqvJIV6xi0Rg2TDAS9OvftY5GHlxKOBMGL/DLEZZWDAWkdtiat/NRe5lA4kZd1VgjgnjIR 98hsGVIXhXvIWWBgtR6RJJNOEHaL+TE3mrrWVuqM6RQquXyjM+1o2rmAj+hir2Il6U2rkr 0CMgKjrYFgi537Qau63MlvmEH9cAMfNCbmY4+7QpoGZJvNxqHwe/s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379725; 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=vjl+2ONJxVfZ04xVq0FgLRlooLCxiXytIRv5HpjsVRk=; b=69lrZgUYWLW/xI/VjGQKN7cNAiscjKtk5AUO/d01QiXPBuLuS1CLTBaRS4v8WDN+UfFakS Muf3gba/qxfc4fBQ== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:37 +0000 Message-Id: <20201207221956.667322-5-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 04/23] doc: document handle 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 | 58 ++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 1c2422ca..178c8f6a 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -243,6 +243,36 @@ const char *alpm_strerror(alpm_errno_t err); /* End of alpm_errors */ /** @} */ + +/** \addtogroup alpm_handle Handle + * @brief Functions to initialize and release libalpm + * @{ + */ + +/** Initializes the library. + * Creates handle, connects to database and creates lockfile. + * This must be called before any other functions are called. + * @param root the root path for all filesystem operations + * @param dbpath the absolute path to the libalpm database + * @param err an optional variable to hold any error return codes + * @return a context handle on success, NULL on error, err will be set if provided + */ +alpm_handle_t *alpm_initialize(const char *root, const char *dbpath, + alpm_errno_t *err); + +/** Release the library. + * Disconnects from the database, removes handle and lockfile + * This should be the last alpm call you make. + * After this returns, handle should be considered invalid and cannot be reused + * in any way. + * @param myhandle the context handle + * @return 0 on success, -1 on error + */ +int alpm_release(alpm_handle_t *handle); + +/* End of alpm_handle */ +/** @} */ + typedef int64_t alpm_time_t; /* @@ -1915,34 +1945,6 @@ char *alpm_compute_sha256sum(const char *filename); /** @} */ -/** \addtogroup alpm_interface Interface Functions - * @brief Functions to initialize and release libalpm - * @{ - */ - -/** Initializes the library. - * Creates handle, connects to database and creates lockfile. - * This must be called before any other functions are called. - * @param root the root path for all filesystem operations - * @param dbpath the absolute path to the libalpm database - * @param err an optional variable to hold any error return codes - * @return a context handle on success, NULL on error, err will be set if provided - */ -alpm_handle_t *alpm_initialize(const char *root, const char *dbpath, - alpm_errno_t *err); - -/** Release the library. - * Disconnects from the database, removes handle and lockfile - * This should be the last alpm call you make. - * After this returns, handle should be considered invalid and cannot be reused - * in any way. - * @param myhandle the context handle - * @return 0 on success, -1 on error - */ -int alpm_release(alpm_handle_t *handle); - -/** @} */ - /** Remove the database lock file * @param handle the context handle * @return 0 on success, -1 on error From patchwork Mon Dec 7 22:19:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1824 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 E2E171C9979B0 for ; Mon, 7 Dec 2020 22:46:37 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379730; bh=o/d2yeZZJvdeKrHwZqS+ZHTCKiSzHFHCT+3U/Jtff5s=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=qO5FHs+PK23zzfwwxEx1c+k0rRuQ/MxHK4ijKlZDYf7cEwyRWJ5WwY/5oANwpEyXJ WKi+vBZ06e/H7+N3lXCNVASKZb7h6QlA6tyzcepHXc+9fxUVRAGHjgl4ydQ8OAnHHY tam38opXi25U3DTJo8nS23WvlCTyGT5vYmqjyBqeEH5eS1jBWnTxX7+63Hz0Dwjqy/ 2K+NLlK3p/XGqSpsJTRDLQ+2bt6cs/5Erf5xxGWH5JrBpl7NLtbAGnE/t5kLfNfCOv nialnHDnE6PikRUwNEaeEK8xvc0EIVLVaWb/M3NUpyMndLr92UU/L9XO+LR9ymqx/A GzwJeQpoOi8heNhMYEMhq4TIplaXOp8szdX6Htl7BvxBX40D7biBvLFC/7/qxAQf6t FCpbEUMRwBUbAAQv0fi+O1hlmO8hDKT8OemWm1TjLmbBATMARVc2r0rHwww+kC+Jni iwntEVcwDtWB85wUNDhaU5VL0qBqc3eXMvcl6EQQUvCWpO2fSvFPv7qKH0glhOCvDM A5g07tYvAJdxRkzyqsXTJw+KWa7ze6YA2RU+TF2TkR0yqeoV+1TURiOxLJBm+MN1bw qqdr0BZ9LQBr6/XLI+q35zl6ICP5z2ImHOOLM1luNAjKgFsZWIYE5CmiwQq9VjeRB/ VTUaHJZG7g0rPGIZCcFO9pIs= 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=2T5HW1K5uJRBc/+3D/g9kaE6kQG4n3JnsK7TggMss8o=; b=YpPzT5h4TXbST8lE3JBOrOhCXIQq2kJLE2wbWTIdqyJefGndhZ+o5fQVMczXROHuxYlJxM yPiec+yQpK1Y82NzhVeM2lMvccuu9CJMKsBAvrKnG5CD5W8/1G0KV3CarNVw6nK4ep8Ly3 2Ph4nFpFGGFn8Gwtihc69OHQZyDxCcHpjd/ly7v6GMX33GcNaPG8OQ9CM1dj93un031Eie IQKehirM3ukfyESzrnjyHe+Ry3ChUQSxG9N+9jm8sjOvyJRPPIRml4DbFBhoRrBRoqeg31 8lBBmPjqNZwQLP234kUimeAruyvqT0xWNqi3heSE3W63t7Qums9ADcX7HHwxAOIzo5TQLs goiVpcIZtDW4zoqodgn6xqo99tI2niQP8JsL2GkmmKh+OYuKrGIAI012+lXpl9tyGJ0cS8 tBLkUrcQF/BZs6ttBE0OgadwD6MSVLV4u/ifdjXnVZrG4T8FG6eaKcNG3iQjPXgSr0TmV6 /AeUpmciN7gN+p8+g6zfvhkbVTtvrPIIn9xHAcrsRFX+UoDyijW/obdQqdDna8kjJm3no1 GcUDRS8L2DJlG8/YOdFKfT+c5Ungy/0qfsz4aVl59bl133d+YCBszynM7Ng8XzQ8UrwGBZ byfeVuRyPFKefQgmxYOmSyiEUkTF6YfQOcsxNqRGtBFp4uCtXKxvU= 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=2T5HW1K5uJRBc/+3D/g9kaE6kQG4n3JnsK7TggMss8o=; b=Q5NM/dQwzEBDQIHmRtIp7HgiqJ6L24UeqEjQzXjjuDvHylu3Lq8WM4iCYmduxRabz9ji7k GrJuWoQVrcGTNaBA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379726; 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=2T5HW1K5uJRBc/+3D/g9kaE6kQG4n3JnsK7TggMss8o=; b=iyluZ4ShaGHaXxdPEoGE77w98TMQebRWaUbRXMP5Ly1iNxj1dAxn7Y6t2a0qU5zpSBPPZN L55WPKFJSaggMG0AfcR5FA/DsuTUZJ5MxvGTrQi/hpZyokKO+Te0wxPczoeT+zLv6HqU9N WXuluF6j8M/KW2CQX2HvVFxTd1oSbcC4H2/xOcSLwVPG2hv7TSmZYLX0j7uuLpYpE3EFlV 4EjtgEsQCV4h8du4bqNQQh/nHkLmTmxCTYsc4CcQHecgif/7sE0LBotS+bYayITZMu3Deo fPN7K1jzW3zGS3dsD6zD839B3X4P04KAbYYi3ciRSN9jOTvX9KcNzly54s6wdtDah4eFoD AWhu7aHMdWCUupO1hmCOYxvndKPnHFA3mrCICUn8JNvzgfzIwhIy4TGJR3DbIwax9UC45P 0ewelytttZTrU4RNXH5FaKZIIobOjSzHL7hBSi3YXR/algMadrQv4aSKEeQJ1LZNXATw0I +I5DF+Btz7Z+CcTfoyrYce2ff+ZbfHOqnSUBUa7y/fzjJC+2Wc2OdEIJ/7AiUUog3rSxmJ Cm9WnHnS/apnWAWoXFCsWTaLwa3/NJwuweqbrtT37+GDIahIkIxSysjg4mRMIn2iSHf1a+ 9nbQQX+rgI5bK9NxpDznx0zYGRQ/gCF/K+Hz+NvzPjeapxT67WdpQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379726; 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=2T5HW1K5uJRBc/+3D/g9kaE6kQG4n3JnsK7TggMss8o=; b=0RoCXbJ2mhQN5mdBcSG80/ieRx3b47oPMlzbOjp+ZJMfftXT/kBaBXy9XD3lQOC2at9Z8X yyEVGjNdQQ5P03Dg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:38 +0000 Message-Id: <20201207221956.667322-6-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 05/23] doc: document signatures 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 | 282 +++++++++++++++++++++++++++------------------ 1 file changed, 167 insertions(+), 115 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 178c8f6a..43a47d54 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -265,7 +265,7 @@ alpm_handle_t *alpm_initialize(const char *root, const char *dbpath, * This should be the last alpm call you make. * After this returns, handle should be considered invalid and cannot be reused * in any way. - * @param myhandle the context handle + * @param handle the context handle * @return 0 on success, -1 on error */ int alpm_release(alpm_handle_t *handle); @@ -275,6 +275,172 @@ int alpm_release(alpm_handle_t *handle); typedef int64_t alpm_time_t; +/** @addtogroup alpm_sig Signature checking + * @brief Functions to check signatures + * @{ + */ + +/** PGP signature verification options */ +typedef enum _alpm_siglevel_t { + /** Packages require a signature */ + ALPM_SIG_PACKAGE = (1 << 0), + /** Packages do not require a signature, + * but check packages that do have signatures */ + ALPM_SIG_PACKAGE_OPTIONAL = (1 << 1), + /* Allow packages with signatures that are marginal trust */ + ALPM_SIG_PACKAGE_MARGINAL_OK = (1 << 2), + /** Allow packages with signatues that are unknown trust */ + ALPM_SIG_PACKAGE_UNKNOWN_OK = (1 << 3), + + /** Databases require a signature */ + ALPM_SIG_DATABASE = (1 << 10), + /** Databases do not require a signature, + * but check databases that do have signatures */ + ALPM_SIG_DATABASE_OPTIONAL = (1 << 11), + /** Allow databases with signatures that are marginal trust */ + ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12), + /** Allow databases with signatues that are unknown trust */ + ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13), + + /** The Default siglevel */ + ALPM_SIG_USE_DEFAULT = (1 << 30) +} alpm_siglevel_t; + +/** PGP signature verification status return codes */ +typedef enum _alpm_sigstatus_t { + /** Signature is valid */ + ALPM_SIGSTATUS_VALID, + /** The key has expired */ + ALPM_SIGSTATUS_KEY_EXPIRED, + /** The signature has expired */ + ALPM_SIGSTATUS_SIG_EXPIRED, + /** The key is not in the keyring */ + ALPM_SIGSTATUS_KEY_UNKNOWN, + /** The key has been disabled */ + ALPM_SIGSTATUS_KEY_DISABLED, + /** The signature is invalid */ + ALPM_SIGSTATUS_INVALID +} alpm_sigstatus_t; + + +/** The trust level of a PGP key */ +typedef enum _alpm_sigvalidity_t { + /** The signature is fully trusted */ + ALPM_SIGVALIDITY_FULL, + /** The signature is marginally trusted */ + ALPM_SIGVALIDITY_MARGINAL, + /** The signature is never trusted */ + ALPM_SIGVALIDITY_NEVER, + /** The signature has unknown trust */ + ALPM_SIGVALIDITY_UNKNOWN +} alpm_sigvalidity_t; + +/** A PGP key */ +typedef struct _alpm_pgpkey_t { + /** The actual key data */ + void *data; + /** The key's fingerprint */ + char *fingerprint; + /** UID of the key */ + char *uid; + /** Name of the key's owner */ + char *name; + /** Email of the key's owner */ + char *email; + /** When the key was created */ + alpm_time_t created; + /** When the key expires */ + alpm_time_t expires; + /** The length of the key */ + unsigned int length; + /** has the key been revoked */ + unsigned int revoked; + /** A character representing the encryption algorithm used by the public key + * + * ? = unknown + * R = RSA + * D = DSA + * E = EDDSA + */ + char pubkey_algo; +} alpm_pgpkey_t; + +/** + * Signature result. Contains the key, status, and validity of a given + * signature. + */ +typedef struct _alpm_sigresult_t { + /** The key of the signature */ + alpm_pgpkey_t key; + /** The status of the signature */ + alpm_sigstatus_t status; + /** The validity of the signature */ + alpm_sigvalidity_t validity; +} alpm_sigresult_t; + +/** + * Signature list. Contains the number of signatures found and a pointer to an + * array of results. The array is of size count. + */ +typedef struct _alpm_siglist_t { + /** The amount of results in the array */ + size_t count; + /** An array of sigresults */ + alpm_sigresult_t *results; +} alpm_siglist_t; + +/** + * Check the PGP signature for the given package file. + * @param pkg the package to check + * @param siglist a pointer to storage for signature results + * @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred) + */ +int alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg, alpm_siglist_t *siglist); + +/** + * Check the PGP signature for the given database. + * @param db the database to check + * @param siglist a pointer to storage for signature results + * @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred) + */ +int alpm_db_check_pgp_signature(alpm_db_t *db, alpm_siglist_t *siglist); + +/** + * Clean up and free a signature result list. + * Note that this does not free the siglist object itself in case that + * was allocated on the stack; this is the responsibility of the caller. + * @param siglist a pointer to storage for signature results + * @return 0 on success, -1 on error + */ +int alpm_siglist_cleanup(alpm_siglist_t *siglist); + +/** + * Decode a loaded signature in base64 form. + * @param base64_data the signature to attempt to decode + * @param data the decoded data; must be freed by the caller + * @param data_len the length of the returned data + * @return 0 on success, -1 on failure to properly decode + */ +int alpm_decode_signature(const char *base64_data, + unsigned char **data, size_t *data_len); + +/** + * Extract the Issuer Key ID from a signature + * @param handle the context handle + * @param identifier the identifier of the key. + * This may be the name of the package or the path to the package. + * @param sig PGP signature + * @param len length of signature + * @param keys a pointer to storage for key IDs + * @return 0 on success, -1 on error + */ +int alpm_extract_keyid(alpm_handle_t *handle, const char *identifier, + const unsigned char *sig, const size_t len, alpm_list_t **keys); + +/* End of alpm_sig */ +/** @} */ + + /* * Enumerations * These ones are used in multiple contexts, so are forward-declared. @@ -330,39 +496,6 @@ typedef enum _alpm_fileconflicttype_t { ALPM_FILECONFLICT_FILESYSTEM } alpm_fileconflicttype_t; -/** PGP signature verification options */ -typedef enum _alpm_siglevel_t { - ALPM_SIG_PACKAGE = (1 << 0), - ALPM_SIG_PACKAGE_OPTIONAL = (1 << 1), - ALPM_SIG_PACKAGE_MARGINAL_OK = (1 << 2), - ALPM_SIG_PACKAGE_UNKNOWN_OK = (1 << 3), - - ALPM_SIG_DATABASE = (1 << 10), - ALPM_SIG_DATABASE_OPTIONAL = (1 << 11), - ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12), - ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13), - - ALPM_SIG_USE_DEFAULT = (1 << 30) -} alpm_siglevel_t; - -/** PGP signature verification status return codes */ -typedef enum _alpm_sigstatus_t { - ALPM_SIGSTATUS_VALID, - ALPM_SIGSTATUS_KEY_EXPIRED, - ALPM_SIGSTATUS_SIG_EXPIRED, - ALPM_SIGSTATUS_KEY_UNKNOWN, - ALPM_SIGSTATUS_KEY_DISABLED, - ALPM_SIGSTATUS_INVALID -} alpm_sigstatus_t; - -/** PGP signature verification status return codes */ -typedef enum _alpm_sigvalidity_t { - ALPM_SIGVALIDITY_FULL, - ALPM_SIGVALIDITY_MARGINAL, - ALPM_SIGVALIDITY_NEVER, - ALPM_SIGVALIDITY_UNKNOWN -} alpm_sigvalidity_t; - /* * Structures */ @@ -428,39 +561,6 @@ typedef struct _alpm_backup_t { char *hash; } alpm_backup_t; -typedef struct _alpm_pgpkey_t { - void *data; - char *fingerprint; - char *uid; - char *name; - char *email; - alpm_time_t created; - alpm_time_t expires; - unsigned int length; - unsigned int revoked; - char pubkey_algo; -} alpm_pgpkey_t; - -/** - * Signature result. Contains the key, status, and validity of a given - * signature. - */ -typedef struct _alpm_sigresult_t { - alpm_pgpkey_t key; - alpm_sigstatus_t status; - alpm_sigvalidity_t validity; -} alpm_sigresult_t; - -/** - * Signature list. Contains the number of signatures found and a pointer to an - * array of results. The array is of size count. - */ -typedef struct _alpm_siglist_t { - size_t count; - alpm_sigresult_t *results; -} alpm_siglist_t; - - /* * Hooks */ @@ -1653,54 +1753,6 @@ int alpm_pkg_set_reason(alpm_pkg_t *pkg, alpm_pkgreason_t reason); */ alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path); -/* - * Signatures - */ - -/** - * Check the PGP signature for the given package file. - * @param pkg the package to check - * @param siglist a pointer to storage for signature results - * @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred) - */ -int alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg, alpm_siglist_t *siglist); - -/** - * Check the PGP signature for the given database. - * @param db the database to check - * @param siglist a pointer to storage for signature results - * @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred) - */ -int alpm_db_check_pgp_signature(alpm_db_t *db, alpm_siglist_t *siglist); - -/** - * Clean up and free a signature result list. - * Note that this does not free the siglist object itself in case that - * was allocated on the stack; this is the responsibility of the caller. - * @param siglist a pointer to storage for signature results - * @return 0 on success, -1 on error - */ -int alpm_siglist_cleanup(alpm_siglist_t *siglist); - -/** - * Decode a loaded signature in base64 form. - * @param base64_data the signature to attempt to decode - * @param data the decoded data; must be freed by the caller - * @param data_len the length of the returned data - * @return 0 on success, -1 on failure to properly decode - */ -int alpm_decode_signature(const char *base64_data, - unsigned char **data, size_t *data_len); - -/** - * Extract the Issuer Key ID from a signature - * @param sig PGP signature - * @param len length of signature - * @param keys a pointer to storage for key IDs - * @return 0 on success, -1 on error - */ -int alpm_extract_keyid(alpm_handle_t *handle, const char *identifier, - const unsigned char *sig, const size_t len, alpm_list_t **keys); /* * Groups From patchwork Mon Dec 7 22:19:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1825 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 BE0E21C9979BE for ; Mon, 7 Dec 2020 22:46:41 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379730; bh=t91UClIjHgoiDTvrHgwMvsxR7CrIELIFCgWYHuXqfV0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=VIBS5lvyxTFLYy1viiMdImCxKa70npZNqafAfVHYer0xEsffrYmxEwo7fsLLdlvei c85/h9/Y4Nqtv/t4iNvOkkFhR88y5fFxwm01KkhqelR7aNZSFQLtqe7rJuqGhQfp6g wYOb+5dwM2SJ8CXktYoqk3eHv0nr5lx+H2wUKof5IGMCthwIUex0VsJZjEpRfQ6Qhk 0wRj0zZ7wUpoJQ+OZwlL3PSHkoolbiN4C4IZd+6H47/AJZrslvBd1pHI2fmnJjm0G1 LfIvlxhx4SxELYEMyINIZ4R6Lmb52OD4zTZNJYAkgZv+UHX9zRwCZEoj4xshbknGjf Pog1WssXs2uLjtXsoooIHzXQbyySkLTBcATI/vJS0+hP9uHWnsYTZ/i9lJorzU2aBY GFHOC3HaEyTrRiFaprjWio3YTfKY4lDYt899ilQb++sYuIK8V/H1Ta6o2xlIFQMj8P Ovo3DeccVEjJNOEk5xmRsGDzjupbA6KAWucff2mZyL53CjTVmJ92lRx4PP5TpwFtEI +vQZuFJkLRUwHaMp9mJJGkja9Re0IQ3tIQNlJbjdzSgDD/ip0Ue2m+N7ZDxhB9IQRR eyxr2MwZZOyni+KjNosPPNu4s61v1r7yCeUFP6uIw2xeLfBSoJ5YhZwCdXgiBoQQXh fFPPDRq7QCn+BblGDAAGBVF4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607381192; 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=Kr929elsnEuTr7fF+8ZLsDapjAhQa0W274kragatftE=; b=CUj8ODThuzGLTc3eyftbJADJRKmYqSjOtEOdeM9wgYDYWib9XbNEunjkMQsI17B7fAVHWu jETN9AIQrRFrkEcYkvLNyObJ5c4toyUhzjSjtr0effCrobhLdxNP8vMi2dw/5uITzmYMal ElBUglIH/YE66HF0xuKrO1gtvubyf/4+yO4Vy+SlorLixGcFoJPiBeDCLVrWA+GwRd38ZT 6BMckv8SyQY6gmKFSGrlTxZHU7pnn/y0zkivYn4inAnZlerwUMAGX2R4JDJsOoznQZLFmn BWFaLmSO9T5mHMedOnyDYtJzrt16WB+K/b4pSvDEsJjKp/e71r49SM1cahNZmqhItQYu0X J0AtjtOqQBkufPVJdfKaQ0MlMwkoaiV7sUQaTFm27l0QZH+G9KTEPzy3epnYcgP+xP3vX5 iAszgYvuvHmGD7k+6D60rq3ZNUrNY1r68Gin9l/nGgFgL1eYVCHDQWAAfHCLhA7JpjTBhv O+yWIgiKOhsjE7knHbdxlGmEH59hOuWp+mqfpF/g3U+V/cmUqqhJxqHXImrR/5rL9RvTCh rkU7TST9ZXp/Q7hxLwkwL2XryjJ8GLlAEZAx5meLJl3uX9CfxrukU3lVcgktZvhjt107i7 Q5MNSxd3rLDKF16a54zcvLD2x9hXXbXnSeMbo3wFWIpxTb4rW5miE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607381192; 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=Kr929elsnEuTr7fF+8ZLsDapjAhQa0W274kragatftE=; b=FTWIf2NLaNqxs6WQTmtKnlXkC1j0gpc/yLmKbpgo3Xu6VdE95At5GE+Z+nxCiizkLP/YkC lnSB+fO7MPEdIVBw== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379727; 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=Kr929elsnEuTr7fF+8ZLsDapjAhQa0W274kragatftE=; b=nUMHN7DcOPA6ZDkXk+hVPh04pdDiSpY9lEFLOrk8gq1lC2ery6UxZs1jXmYPjrXcCInU4H C3aHTgrPt3GemY1yw0DXh4gHArHqjNIZGR/9R9m1jgweA2ObCANXTDB21rFRPNIYKv5sGT SSyjq8I5EEHm+taxiopqpYRWIEpT8daKCF42ma6EPbG3/lPmqULeUe0MccC7AbkvEx8VH3 +bWyp8D1cQJNUC8HlUhEhv2AfjgtgeIRNldjk7YB3hQNbe+yykTHi7YepLVQflk1UYZuNS M3Hq7czZM4ZfAm5MjyTjdbjZ+gsnxNkU18JFV91I2feiguWM9PeP0NWQV+Hneb/FIrYu0d lQs3X2ng1heCzqH9rTR0fRWD+C1l+zC9OF3miaHtHxN0oRiKxHVNwkfO0YbEGmAspp82Gs M/95xqAhPiyGG4Tax+8qpOXFYOXh3pyCmsgWAod/pzf/ClU3MBt0oFAq7b7VHD6Rh5otIq IpaM9JBe6Sw2lqfEy8gXN9KK/hCXHJKTJMMZzfw7bjC6S0g0p4xfIQ1icsjWlXidtG4bDt qkTW44saZI8whcPzvLZwSp+r8Sk0WVyV1kyZLd6cxnO0ovEujxbTIlbo/bhQYnjZuoWVIe yMnAehcDGUD5k2jQC6W3+VMU14I1sUzc7dPcG4o0UadwdpwJwZ9Eo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379727; 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=Kr929elsnEuTr7fF+8ZLsDapjAhQa0W274kragatftE=; b=8K5q+KLLPA64GI4qJo7PHwYt5KCVL9opJgw04lZWtoiBcD1KWRSdNWUUbALbdgL6Ga3Ik3 0j/t2d7HplP/YlDw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:39 +0000 Message-Id: <20201207221956.667322-7-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 06/23] doc: document depends 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 | 295 +++++++++++++++++++++++++-------------------- 1 file changed, 164 insertions(+), 131 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 43a47d54..ea99a8b3 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -441,49 +441,26 @@ int alpm_extract_keyid(alpm_handle_t *handle, const char *identifier, /** @} */ -/* - * Enumerations - * These ones are used in multiple contexts, so are forward-declared. +/** @addtogroup alpm_depends Dependency + * @brief Functions dealing with libalpm's dependency and conflict + * information. + * @{ */ -/** Package install reasons. */ -typedef enum _alpm_pkgreason_t { - /** Explicitly requested by the user. */ - ALPM_PKG_REASON_EXPLICIT = 0, - /** Installed as a dependency for another package. */ - ALPM_PKG_REASON_DEPEND = 1 -} alpm_pkgreason_t; - -/** Location a package object was loaded from. */ -typedef enum _alpm_pkgfrom_t { - ALPM_PKG_FROM_FILE = 1, - ALPM_PKG_FROM_LOCALDB, - ALPM_PKG_FROM_SYNCDB -} alpm_pkgfrom_t; - -/** Method used to validate a package. */ -typedef enum _alpm_pkgvalidation_t { - ALPM_PKG_VALIDATION_UNKNOWN = 0, - ALPM_PKG_VALIDATION_NONE = (1 << 0), - ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), - ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), - ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) -} alpm_pkgvalidation_t; - /** Types of version constraints in dependency specs. */ typedef enum _alpm_depmod_t { - /** No version constraint */ - ALPM_DEP_MOD_ANY = 1, - /** Test version equality (package=x.y.z) */ - ALPM_DEP_MOD_EQ, - /** Test for at least a version (package>=x.y.z) */ - ALPM_DEP_MOD_GE, - /** Test for at most a version (package<=x.y.z) */ - ALPM_DEP_MOD_LE, - /** Test for greater than some version (package>x.y.z) */ - ALPM_DEP_MOD_GT, - /** Test for less than some version (package=x.y.z) */ + ALPM_DEP_MOD_GE, + /** Test for at most a version (package<=x.y.z) */ + ALPM_DEP_MOD_LE, + /** Test for greater than some version (package>x.y.z) */ + ALPM_DEP_MOD_GT, + /** Test for less than some version (package=2.12" + */ +char *alpm_dep_compute_string(const alpm_depend_t *dep); + +/** Return a newly allocated dependency information parsed from a string + *\link alpm_dep_free should be used to free the dependency \endlink + * @param depstring a formatted string, e.g. "glibc=2.12" + * @return a dependency info structure + */ +alpm_depend_t *alpm_dep_from_string(const char *depstring); + +/** Free a dependency info structure + * @param dep struct to free + */ +void alpm_dep_free(alpm_depend_t *dep); + +/** Free a fileconflict and its members. + * @param conflict the fileconflict to free + */ +void alpm_fileconflict_free(alpm_fileconflict_t *conflict); + +/** Free a depmissing and its members + * @param miss the depmissing to fre + * */ +void alpm_depmissing_free(alpm_depmissing_t *miss); + +/** + * Free a conflict and its members. + * @param conflict the conflict to free + */ +void alpm_conflict_free(alpm_conflict_t *conflict); + + +/* End of alpm_depends */ +/** @} */ + +/* + * Enumerations + * These ones are used in multiple contexts, so are forward-declared. + */ + +/** Package install reasons. */ +typedef enum _alpm_pkgreason_t { + /** Explicitly requested by the user. */ + ALPM_PKG_REASON_EXPLICIT = 0, + /** Installed as a dependency for another package. */ + ALPM_PKG_REASON_DEPEND = 1 +} alpm_pkgreason_t; + +/** Location a package object was loaded from. */ +typedef enum _alpm_pkgfrom_t { + ALPM_PKG_FROM_FILE = 1, + ALPM_PKG_FROM_LOCALDB, + ALPM_PKG_FROM_SYNCDB +} alpm_pkgfrom_t; + +/** Method used to validate a package. */ +typedef enum _alpm_pkgvalidation_t { + ALPM_PKG_VALIDATION_UNKNOWN = 0, + ALPM_PKG_VALIDATION_NONE = (1 << 0), + ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), + ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), + ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) +} alpm_pkgvalidation_t; + +/* + * Structures + */ + /** Package group */ typedef struct _alpm_group_t { /** group name */ @@ -1900,76 +2016,6 @@ int alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg); /** @} */ -/** @addtogroup alpm_api_depends Dependency Functions - * Functions dealing with libalpm representation of dependency - * information. - * @{ - */ - -/** Checks dependencies and returns missing ones in a list. - * Dependencies can include versions with depmod operators. - * @param handle the context handle - * @param pkglist the list of local packages - * @param remove an alpm_list_t* of packages to be removed - * @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade) - * @param reversedeps handles the backward dependencies - * @return an alpm_list_t* of alpm_depmissing_t pointers. - */ -alpm_list_t *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist, - alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps); - -/** Find a package satisfying a specified dependency. - * The dependency can include versions with depmod operators. - * @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfier will be searched - * @param depstring package or provision name, versioned or not - * @return a alpm_pkg_t* satisfying depstring - */ -alpm_pkg_t *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring); - -/** Find a package satisfying a specified dependency. - * First look for a literal, going through each db one by one. Then look for - * providers. The first satisfier that belongs to an installed package is - * returned. If no providers belong to an installed package then an - * alpm_question_select_provider_t is created to select the provider. - * The dependency can include versions with depmod operators. - * - * @param handle the context handle - * @param dbs an alpm_list_t* of alpm_db_t where the satisfier will be searched - * @param depstring package or provision name, versioned or not - * @return a alpm_pkg_t* satisfying depstring - */ -alpm_pkg_t *alpm_find_dbs_satisfier(alpm_handle_t *handle, - alpm_list_t *dbs, const char *depstring); - -/** - * @brief Check the package conflicts in a database - * - * @param handle the context handle - * @param pkglist the list of packages to check - * - * @return an alpm_list_t of alpm_conflict_t - */ -alpm_list_t *alpm_checkconflicts(alpm_handle_t *handle, alpm_list_t *pkglist); - -/** Returns a newly allocated string representing the dependency information. - * @param dep a dependency info structure - * @return a formatted string, e.g. "glibc>=2.12" - */ -char *alpm_dep_compute_string(const alpm_depend_t *dep); - -/** Return a newly allocated dependency information parsed from a string - * @param depstring a formatted string, e.g. "glibc=2.12" - * @return a dependency info structure - */ -alpm_depend_t *alpm_dep_from_string(const char *depstring); - -/** Free a dependency info structure - * @param dep struct to free - */ -void alpm_dep_free(alpm_depend_t *dep); - -/** @} */ - /** @} */ /* @@ -2021,19 +2067,6 @@ const char *alpm_version(void); * */ int alpm_capabilities(void); -/** - * Free a fileconflict and its members. - * @param conflict the fileconflict to free - */ -void alpm_fileconflict_free(alpm_fileconflict_t *conflict); -void alpm_depmissing_free(alpm_depmissing_t *miss); - -/** - * Free a conflict and its members. - * @param conflict the conflict to free - */ -void alpm_conflict_free(alpm_conflict_t *conflict); - /* End of alpm_api */ /** @} */ From patchwork Mon Dec 7 22:19:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1816 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 2AA6C1C996DB3 for ; Mon, 7 Dec 2020 22:31:41 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379732; bh=A+T0M9m8/fJZVvN98lX051XCpZX99MpKn72iedvBYJA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=Jb4TPhNGOHOyzYuTIKMAAjquJvgHN33szbxLMUphZ9XrciqTbR8GrjeCPT468/wn4 EoqfVPKZQO2R5F2zc+MmLy4e/FUQ7m8LuaXCr55xqSPAhk1uaT/FxEV7JaGhk4nrBN bbTcnoP5HthLdqRAaLT+73Fagfd8FNxnnkyTK+sS47sjDtdXOmYb60X0hh898YiCUj gvl56pNAIl79IksVmPkaqxJFnSzKxIG9vIREL4uLAZ4huiTMOybhiMUIOgJ2Io8qP+ 288VILDruG7ZMV6lwHEiNd7ZqHNLTCyP8JVwquAGBoXKjsOelP0lKlX1ExreDcDTfJ HsXnQTZOOCBLQl6t4lhmeXjFIUage9UUrnSeP7BRkdBB0+Jn17YBBwZMHKz0G6+VCt 0fRPaRmASfR3RnuAuu/ixIXCxehvl3LUTnzMC8flfU22Og2IFcCwlDTmVb2IH1C7Z/ W4SK9LIeFejTxAZKefYlKcimeZ6ly8hTZ8S2AE6/m2ple3ajmI4A7fAjbYmQ3xVAg/ smqzMuoAx736j6RS0Wb91ry7YSLR4D8kNIfwJfCN8VRN3G/3rJy2bfCztLTYb5yQCa dwN9A1O6Z06tfU8UAppvnWIbzTC5xgEBDY9rGqwTnyxFfkStfcGZhZ8DXreBR+ZQOT JnsyhxhBPjHALCrUfHVYTbKk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380290; 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=NBBzGNAnnKR44CvwCmCfHLmRGDAxgZWNLR4NnN08WZE=; b=/KdzEVFDVMw2HO8qPSR+U/KJ934Xge43KaMtpCU1sU6RCJ9fiAC3BsJkb+CAUsKvobunjp iok5znE9uL8MYZDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380290; 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=NBBzGNAnnKR44CvwCmCfHLmRGDAxgZWNLR4NnN08WZE=; b=AKwT0SgJis4dhUg4tq5iTewWVXnVYbad64EONxjlYkbBmx8CvrKPKoFwrCoSdo8rb5Ewla aOtAHBPH0zTAGzjgEFcYittuxoaXHOzCitu68ygWJ4audOZoThe6anMQTiD3yRJpVJF2gd lCI4X2W2FElp7kjgOmmxhc3uhbwwrLiQSb3JKrWBU9nmwU3woCGxn2o/bvBVC9aImFPhCY 4n2UAScfFN+f51nx5kOkAaKO1BF27zGo/T03q8gJsCdd7Hm5MQZuAiDYoqToMHfA9uO5tc r8N3UpqJYxAMlUyXOYXowjInO8gr+k9qtw7Acws4U/okQ5p7GsEIoS/s7KQLLNBLMqMtL8 AkqH5UKGkBoUCOFpGSbgn/iWoQHMPpyoPmwffY5S/UHMXkVVT5HMPIffSRuSNGo4yp0dj7 Jb19S//NjEzI7hRhda6vLSPfImgsVFkLvhIlR8SPh4VmU/3xfsTT1fBy5cg98PuUwxUio8 kxgZMxNUjVODr1BbxE2JwBJazWqFWoLBrqxbvqVrAZyUp1Z1OdToAY5vfMBdy0wznMeBmU 5qQ1w1xBFuXB1CgJk8VQNpgMVlsu88m0/Tj4adz/j/11xKDU9m9cUOZYru+ttT5x24UCXU m9x9Awm6ugRnVGjaF0zldRxwW43mN9dQzPobctZBBRQ44XHLP8nRM= From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379728; 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=NBBzGNAnnKR44CvwCmCfHLmRGDAxgZWNLR4NnN08WZE=; b=l+A09S5W7v23v97ty//bnon8JYB2qb/Yf0c5qNtIAYsRrAmPGAJqq6OzAgXsov1vypRBz8 e40YdU1Av4NWd5sAxYRxe28eDSv8MpmGD6SLPl/AaVvDGGKvLn5keqIT8wCvfk9ukJUijd rh5IaCrOpsxkpjmcjd83hFjqypgbenfqoZ0rwfyU9pDdOu4T+NtcUfOSxax2m+22pktMXP ZfAebi2AxpW4xAX+avtDEMf20liYu7sutRBQHms2nvSOnx8kJGG01nKwrDXE9RWnBAUfxO b4Seg7xEyMBaA9xze1P3wDAjpPfZIKcM9mRErebauemCJ4+vTI4hDIpj7xqW+6KE37lbnZ qPxpQHvth5thu2eZV+pGypShS/uDWYi0PxbENlJR6KHwJTlYpjlYfe4O5oqcOm/eB3NxKs JYLQ3bdmC4cGvVVOPIFKHl8LhCHA8G8ipt5sfTeljJ7cHG+/gGRhGaEZyUuZjILUcIrz1z LBmIla1M6csKIhvi7ssBfw9QXPxKiaCSPmE3XasQI1Wtty76hCzXyoxlFWMjFGVfPFNteX tHvaRVawytpiOdGCDJdi2j/GfIhJCfzHucZHHW6ThXUurxRFuyBops8X+mCdkr1CxBkRMv ELxgr5u/ERr3hF/9pmmtf+ksidZAJ/qnuxBb/ooPEiVTvAh60dOBQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379728; 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=NBBzGNAnnKR44CvwCmCfHLmRGDAxgZWNLR4NnN08WZE=; b=MNOrihSuj1RZlmjf1qrtefAG6hgFCoZzhlLpzVn4YFL5Cd+NAl1YZjqB/EsfM+c98x6DaO Iqa0wrfRpx3T7OCQ== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:40 +0000 Message-Id: <20201207221956.667322-8-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 07/23] doc: document callbacks 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 | 439 ++++++++++++++++++++++++++++----------------- 1 file changed, 271 insertions(+), 168 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index ea99a8b3..a8d48432 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -617,105 +617,12 @@ void alpm_conflict_free(alpm_conflict_t *conflict); /* End of alpm_depends */ /** @} */ -/* - * Enumerations - * These ones are used in multiple contexts, so are forward-declared. - */ - -/** Package install reasons. */ -typedef enum _alpm_pkgreason_t { - /** Explicitly requested by the user. */ - ALPM_PKG_REASON_EXPLICIT = 0, - /** Installed as a dependency for another package. */ - ALPM_PKG_REASON_DEPEND = 1 -} alpm_pkgreason_t; - -/** Location a package object was loaded from. */ -typedef enum _alpm_pkgfrom_t { - ALPM_PKG_FROM_FILE = 1, - ALPM_PKG_FROM_LOCALDB, - ALPM_PKG_FROM_SYNCDB -} alpm_pkgfrom_t; - -/** Method used to validate a package. */ -typedef enum _alpm_pkgvalidation_t { - ALPM_PKG_VALIDATION_UNKNOWN = 0, - ALPM_PKG_VALIDATION_NONE = (1 << 0), - ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), - ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), - ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) -} alpm_pkgvalidation_t; - -/* - * Structures - */ - -/** Package group */ -typedef struct _alpm_group_t { - /** group name */ - char *name; - /** list of alpm_pkg_t packages */ - alpm_list_t *packages; -} alpm_group_t; -/** File in a package */ -typedef struct _alpm_file_t { - char *name; - off_t size; - mode_t mode; -} alpm_file_t; - -/** Package filelist container */ -typedef struct _alpm_filelist_t { - size_t count; - alpm_file_t *files; -} alpm_filelist_t; - -/** Local package or package file backup entry */ -typedef struct _alpm_backup_t { - char *name; - char *hash; -} alpm_backup_t; - -/* - * Hooks - */ - -typedef enum _alpm_hook_when_t { - ALPM_HOOK_PRE_TRANSACTION = 1, - ALPM_HOOK_POST_TRANSACTION -} alpm_hook_when_t; - -/* - * Logging facilities - */ - -/** \addtogroup alpm_log Logging Functions - * @brief Functions to log using libalpm +/** \addtogroup alpm_cb Callbacks + * @brief Functions and structures for libalpm's callbacks * @{ */ -/** Logging Levels */ -typedef enum _alpm_loglevel_t { - ALPM_LOG_ERROR = 1, - ALPM_LOG_WARNING = (1 << 1), - ALPM_LOG_DEBUG = (1 << 2), - ALPM_LOG_FUNCTION = (1 << 3) -} alpm_loglevel_t; - -typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); - -/** A printf-like function for logging. - * @param handle the context handle - * @param prefix caller-specific prefix for the log - * @param fmt output format - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_logaction(alpm_handle_t *handle, const char *prefix, - const char *fmt, ...) __attribute__((format(printf, 3, 4))); - -/** @} */ - /** * Type of events. */ @@ -790,7 +697,7 @@ typedef enum _alpm_event_type_t { /** A .pacnew file was created; See alpm_event_pacnew_created_t for arguments. */ ALPM_EVENT_PACNEW_CREATED, /** A .pacsave file was created; See alpm_event_pacsave_created_t for - * arguments */ + * arguments. */ ALPM_EVENT_PACSAVE_CREATED, /** Processing hooks will be started. */ ALPM_EVENT_HOOK_START, @@ -798,100 +705,123 @@ typedef enum _alpm_event_type_t { ALPM_EVENT_HOOK_DONE, /** A hook is starting */ ALPM_EVENT_HOOK_RUN_START, - /** A hook has finished running */ + /** A hook has finished running. */ ALPM_EVENT_HOOK_RUN_DONE } alpm_event_type_t; +/** An event that may reprisent any event. */ typedef struct _alpm_event_any_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; } alpm_event_any_t; +/** An enum over the kind of package operations. */ typedef enum _alpm_package_operation_t { /** Package (to be) installed. (No oldpkg) */ ALPM_PACKAGE_INSTALL = 1, /** Package (to be) upgraded */ ALPM_PACKAGE_UPGRADE, - /** Package (to be) re-installed. */ + /** Package (to be) re-installed */ ALPM_PACKAGE_REINSTALL, - /** Package (to be) downgraded. */ + /** Package (to be) downgraded */ ALPM_PACKAGE_DOWNGRADE, - /** Package (to be) removed. (No newpkg) */ + /** Package (to be) removed (No newpkg) */ ALPM_PACKAGE_REMOVE } alpm_package_operation_t; +/** A package operation event occurred. */ typedef struct _alpm_event_package_operation_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; - /** Type of operation. */ + /** Type of operation */ alpm_package_operation_t operation; - /** Old package. */ + /** Old package */ alpm_pkg_t *oldpkg; - /** New package. */ + /** New package */ alpm_pkg_t *newpkg; } alpm_event_package_operation_t; +/** An optional dependency was removed. */ typedef struct _alpm_event_optdep_removal_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; - /** Package with the optdep. */ + /** Package with the optdep */ alpm_pkg_t *pkg; - /** Optdep being removed. */ + /** Optdep being removed */ alpm_depend_t *optdep; } alpm_event_optdep_removal_t; +/** A scriptlet was ran. */ typedef struct _alpm_event_scriptlet_info_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; - /** Line of scriptlet output. */ + /** Line of scriptlet output */ const char *line; } alpm_event_scriptlet_info_t; + +/** A database is missing. + * + * The database is registered but has not been downloaded + */ typedef struct _alpm_event_database_missing_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; - /** Name of the database. */ + /** Name of the database */ const char *dbname; } alpm_event_database_missing_t; +/** A package was downloaded. */ typedef struct _alpm_event_pkgdownload_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; /** Name of the file */ const char *file; } alpm_event_pkgdownload_t; +/** A pacnew file was created. */ typedef struct _alpm_event_pacnew_created_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; /** Whether the creation was result of a NoUpgrade or not */ int from_noupgrade; - /** Old package. */ + /** Old package */ alpm_pkg_t *oldpkg; - /** New Package. */ + /** New Package */ alpm_pkg_t *newpkg; /** Filename of the file without the .pacnew suffix */ const char *file; } alpm_event_pacnew_created_t; +/** A pacsave file was created. */ typedef struct _alpm_event_pacsave_created_t { - /** Type of event. */ + /** Type of event */ alpm_event_type_t type; - /** Old package. */ + /** Old package */ alpm_pkg_t *oldpkg; - /** Filename of the file without the .pacsave suffix. */ + /** Filename of the file without the .pacsave suffix */ const char *file; } alpm_event_pacsave_created_t; +/** Kind of hook. */ +typedef enum _alpm_hook_when_t { + /* Pre transaction hook */ + ALPM_HOOK_PRE_TRANSACTION = 1, + /* Post transaction hook */ + ALPM_HOOK_POST_TRANSACTION +} alpm_hook_when_t; + +/** pre/post transaction hooks are to be ran. */ typedef struct _alpm_event_hook_t { - /** Type of event.*/ + /** Type of event*/ alpm_event_type_t type; - /** Type of hooks. */ + /** Type of hook */ alpm_hook_when_t when; } alpm_event_hook_t; +/** A pre/post transaction hook was ran. */ typedef struct _alpm_event_hook_run_t { - /** Type of event.*/ + /** Type of event */ alpm_event_type_t type; /** Name of hook */ const char *name; @@ -904,185 +834,260 @@ typedef struct _alpm_event_hook_run_t { } alpm_event_hook_run_t; /** Events. - * This is an union passed to the callback, that allows the frontend to know + * This is a union passed to the callback that allows the frontend to know * which type of event was triggered (via type). It is then possible to * typecast the pointer to the right structure, or use the union field, in order * to access event-specific data. */ typedef union _alpm_event_t { + /** Type of event it's always safe to access this. */ alpm_event_type_t type; + /** The any event type. It's always safe to access this. */ alpm_event_any_t any; + /** Package operation */ alpm_event_package_operation_t package_operation; + /** An optdept was remove */ alpm_event_optdep_removal_t optdep_removal; + /** A scriptlet was ran */ alpm_event_scriptlet_info_t scriptlet_info; + /** A database is missing */ alpm_event_database_missing_t database_missing; + /** A package was downloaded */ alpm_event_pkgdownload_t pkgdownload; + /** A pacnew file was created */ alpm_event_pacnew_created_t pacnew_created; + /** A pacsave file was created */ alpm_event_pacsave_created_t pacsave_created; + /** Pre/post transaction hooks are being ran */ alpm_event_hook_t hook; + /** A hook was ran */ alpm_event_hook_run_t hook_run; } alpm_event_t; -/** Event callback. */ +/** Event callback. + * + * Called when an event occurs + * @param event the event that occurred */ typedef void (*alpm_cb_event)(alpm_event_t *); /** - * Type of questions. + * Type of question. * Unlike the events or progress enumerations, this enum has bitmask values * so a frontend can use a bitmask map to supply preselected answers to the * different types of questions. */ typedef enum _alpm_question_type_t { + /** Should target in ignorepkg be installed anyway? */ ALPM_QUESTION_INSTALL_IGNOREPKG = (1 << 0), + /** Should a package be replaced? */ ALPM_QUESTION_REPLACE_PKG = (1 << 1), + /** Should a conflicting package be removed? */ ALPM_QUESTION_CONFLICT_PKG = (1 << 2), + /** Should a corrupted package be deleted? */ ALPM_QUESTION_CORRUPTED_PKG = (1 << 3), + /** Should unresolvable targets be removed from the transaction? */ ALPM_QUESTION_REMOVE_PKGS = (1 << 4), + /** Provider selection */ ALPM_QUESTION_SELECT_PROVIDER = (1 << 5), + /** Should a key be imported? */ ALPM_QUESTION_IMPORT_KEY = (1 << 6) } alpm_question_type_t; +/** A question that can represent any other question. */ typedef struct _alpm_question_any_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer. */ + /** Answer */ int answer; } alpm_question_any_t; +/** Should target in ignorepkg be installed anyway? */ typedef struct _alpm_question_install_ignorepkg_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to install pkg anyway. */ + /** Answer: whether or not to install pkg anyway */ int install; - /* Package in IgnorePkg/IgnoreGroup. */ + /** The ignored package that we are deciding whether to install */ alpm_pkg_t *pkg; } alpm_question_install_ignorepkg_t; +/** Should a package be replaced? */ typedef struct _alpm_question_replace_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to replace oldpkg with newpkg. */ + /** Answer: whether or not to replace oldpkg with newpkg */ int replace; - /* Package to be replaced. */ + /** Package to be replaced */ alpm_pkg_t *oldpkg; - /* Package to replace with. */ + /** Package to replace with.*/ alpm_pkg_t *newpkg; - /* DB of newpkg */ + /** DB of newpkg */ alpm_db_t *newdb; } alpm_question_replace_t; +/** Should a conflicting package be removed? */ typedef struct _alpm_question_conflict_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to remove conflict->package2. */ + /** Answer: whether or not to remove conflict->package2 */ int remove; - /** Conflict info. */ + /** Conflict info */ alpm_conflict_t *conflict; } alpm_question_conflict_t; +/** Should a corrupted package be deleted? */ typedef struct _alpm_question_corrupted_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to remove filepath. */ + /** Answer: whether or not to remove filepath */ int remove; - /** Filename to remove */ + /** File to remove */ const char *filepath; /** Error code indicating the reason for package invalidity */ alpm_errno_t reason; } alpm_question_corrupted_t; +/** Should unresolvable targets be removed from the transaction? */ typedef struct _alpm_question_remove_pkgs_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to skip packages. */ + /** Answer: whether or not to skip packages */ int skip; - /** List of alpm_pkg_t* with unresolved dependencies. */ + /** List of alpm_pkg_t* with unresolved dependencies */ alpm_list_t *packages; } alpm_question_remove_pkgs_t; +/** Provider selection */ typedef struct _alpm_question_select_provider_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: which provider to use (index from providers). */ + /** Answer: which provider to use (index from providers) */ int use_index; - /** List of alpm_pkg_t* as possible providers. */ + /** List of alpm_pkg_t* as possible providers */ alpm_list_t *providers; - /** What providers provide for. */ + /** What providers provide for */ alpm_depend_t *depend; } alpm_question_select_provider_t; +/** Should a key be imported? */ typedef struct _alpm_question_import_key_t { - /** Type of question. */ + /** Type of question */ alpm_question_type_t type; - /** Answer: whether or not to import key. */ + /** Answer: whether or not to import key */ int import; - /** The key to import. */ + /** The key to import */ alpm_pgpkey_t *key; } alpm_question_import_key_t; /** * Questions. - * This is an union passed to the callback, that allows the frontend to know + * This is an union passed to the callback that allows the frontend to know * which type of question was triggered (via type). It is then possible to * typecast the pointer to the right structure, or use the union field, in order * to access question-specific data. */ typedef union _alpm_question_t { + /** The type of question. It's always safe to access this. */ alpm_question_type_t type; + /** A question that can represent any question. + * It's always safe to access this. */ alpm_question_any_t any; + /** Should target in ignorepkg be installed anyway? */ alpm_question_install_ignorepkg_t install_ignorepkg; + /** Should a package be replaced? */ alpm_question_replace_t replace; + /** Should a conflicting package be removed? */ alpm_question_conflict_t conflict; + /** Should a corrupted package be deleted? */ alpm_question_corrupted_t corrupted; + /** Should unresolvable targets be removed from the transaction? */ alpm_question_remove_pkgs_t remove_pkgs; + /** Provider selection */ alpm_question_select_provider_t select_provider; + /** Should a key be imported? */ alpm_question_import_key_t import_key; } alpm_question_t; -/** Question callback */ +/** Question callback. + * + * This callback allows user to give input and decide what to do during certain events + * @param question the question being asked. + */ typedef void (*alpm_cb_question)(alpm_question_t *); -/** Progress */ +/** An enum over different kinds of progress alerts. */ typedef enum _alpm_progress_t { + /** Package install */ ALPM_PROGRESS_ADD_START, + /** Package upgrade */ ALPM_PROGRESS_UPGRADE_START, + /** Package downgrade */ ALPM_PROGRESS_DOWNGRADE_START, + /** Package reinstall */ ALPM_PROGRESS_REINSTALL_START, + /** Package removal */ ALPM_PROGRESS_REMOVE_START, + /** Conflict checking */ ALPM_PROGRESS_CONFLICTS_START, + /** Diskspace checking */ ALPM_PROGRESS_DISKSPACE_START, + /** Package Integrity checking */ ALPM_PROGRESS_INTEGRITY_START, + /** Loading packages from disk */ ALPM_PROGRESS_LOAD_START, + /** Checking signatures of packages */ ALPM_PROGRESS_KEYRING_START } alpm_progress_t; +/** Progress callback + * + * Alert the front end about the progress of certain events. + * Allows the implementation of loading bars for events that + * make take a while to complete. + * @param progress the kind of event that is progressing + * @param pkg for package operations, the name of the package being operated on + * @param percent the percent completion of the action + * @param howmany the total amount of items in the action + * @param current the current amount of items completed + */ /** Progress callback */ -typedef void (*alpm_cb_progress)(alpm_progress_t, const char *, int, size_t, size_t); +typedef void (*alpm_cb_progress)(alpm_progress_t progress, const char *pkg, + int percent, size_t howmany, size_t current); /* * Downloading */ -/* File download events. +/** File download events. * These events are reported by ALPM via download callback. */ -typedef enum { - ALPM_DOWNLOAD_INIT, /* alpm initializes file download logic */ - ALPM_DOWNLOAD_PROGRESS, /* download progress reported */ - ALPM_DOWNLOAD_COMPLETED /* alpm is about to release data related to the file */ +typedef enum _alpm_download_event_type_t { + /** A download was started */ + ALPM_DOWNLOAD_INIT, + /** A download made progress */ + ALPM_DOWNLOAD_PROGRESS, + /** A download completed */ + ALPM_DOWNLOAD_COMPLETED } alpm_download_event_type_t; -typedef struct { - int optional; /* whether this file is optional and thus the errors could be ignored */ +/** Context struct for when a download starts. */ +typedef struct _alpm_download_event_init_t { + /** whether this file is optional and thus the errors could be ignored */ + int optional; } alpm_download_event_init_t; -typedef struct { - off_t downloaded; /* amount of data downloaded */ - off_t total; /* total amount need to be downloaded */ +/** Context struct for when a download progresses. */ +typedef struct _alpm_download_event_progress_t { + /** Amount of data downloaded */ + off_t downloaded; + /** Total amount need to be downloaded */ + off_t total; } alpm_download_event_progress_t; -typedef struct { - /* total bytes in file */ + +/** Context struct for when a download completes. */ +typedef struct _alpm_download_event_completed_t { + /** Total bytes in file */ off_t total; - /* download result code: + /** download result code: * 0 - download completed successfully * 1 - the file is up-to-date * -1 - error @@ -1098,6 +1103,10 @@ typedef struct { typedef void (*alpm_cb_download)(const char *filename, alpm_download_event_type_t event, void *data); + +/** Total Download callback. + * @param total amount that will be downloaded during \link alpm_trans_commit \endlink. + */ typedef void (*alpm_cb_totaldl)(off_t total); /** A callback for downloading files @@ -1110,6 +1119,100 @@ typedef void (*alpm_cb_totaldl)(off_t total); typedef int (*alpm_cb_fetch)(const char *url, const char *localpath, int force); +/* End of alpm_cb */ +/** @} */ + + +/* + * Enumerations + * These ones are used in multiple contexts, so are forward-declared. + */ + +/** Package install reasons. */ +typedef enum _alpm_pkgreason_t { + /** Explicitly requested by the user. */ + ALPM_PKG_REASON_EXPLICIT = 0, + /** Installed as a dependency for another package. */ + ALPM_PKG_REASON_DEPEND = 1 +} alpm_pkgreason_t; + +/** Location a package object was loaded from. */ +typedef enum _alpm_pkgfrom_t { + ALPM_PKG_FROM_FILE = 1, + ALPM_PKG_FROM_LOCALDB, + ALPM_PKG_FROM_SYNCDB +} alpm_pkgfrom_t; + +/** Method used to validate a package. */ +typedef enum _alpm_pkgvalidation_t { + ALPM_PKG_VALIDATION_UNKNOWN = 0, + ALPM_PKG_VALIDATION_NONE = (1 << 0), + ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), + ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), + ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) +} alpm_pkgvalidation_t; + +/* + * Structures + */ + +/** Package group */ +typedef struct _alpm_group_t { + /** group name */ + char *name; + /** list of alpm_pkg_t packages */ + alpm_list_t *packages; +} alpm_group_t; + +/** File in a package */ +typedef struct _alpm_file_t { + char *name; + off_t size; + mode_t mode; +} alpm_file_t; + +/** Package filelist container */ +typedef struct _alpm_filelist_t { + size_t count; + alpm_file_t *files; +} alpm_filelist_t; + +/** Local package or package file backup entry */ +typedef struct _alpm_backup_t { + char *name; + char *hash; +} alpm_backup_t; + +/* + * Logging facilities + */ + +/** \addtogroup alpm_log Logging Functions + * @brief Functions to log using libalpm + * @{ + */ + +/** Logging Levels */ +typedef enum _alpm_loglevel_t { + ALPM_LOG_ERROR = 1, + ALPM_LOG_WARNING = (1 << 1), + ALPM_LOG_DEBUG = (1 << 2), + ALPM_LOG_FUNCTION = (1 << 3) +} alpm_loglevel_t; + +typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); + +/** A printf-like function for logging. + * @param handle the context handle + * @param prefix caller-specific prefix for the log + * @param fmt output format + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_logaction(alpm_handle_t *handle, const char *prefix, + const char *fmt, ...) __attribute__((format(printf, 3, 4))); + +/** @} */ + /** Fetch a list of remote packages. * @param handle the context handle * @param urls list of package URLs to download From patchwork Mon Dec 7 22:19:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1832 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 84F851C999109 for ; Mon, 7 Dec 2020 23:16:47 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 23:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379734; bh=L+NZoimLwMo2MskhIDXIeLnZJCVew8cHTDtAw9uLLxo=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=T+mcBj/XSgGMjuicvl/mBd/9WLCqYChzMMGDnP50oEwGLE7zkbjtY6e6HlNnVu3gL 5VF0tF4vPrCiXXf3QMcMlTAIAeqYByUytgCf7bAjbH74EeyVsKVRIAY90iRTAwRv1v 1cdw5cwqVDyU+m5IxMqpRIZ2DPaGJt4rBCSczsVYlmsg33pCsfm9d5ziqw+UmjXU82 RGD269XuXM+RRu3z1RKlNHLjcMObhL9aWp8SE+icmjFDsboRWlQlUAYId8uUOPqqu+ afIkWX93D3UhseBsFMXq0Fw8+j35iOS8mxFZlcHVX7hFb7A36cfvHbMBBkeMe6ob1u Notw0k3RKNvN4LTmf7xUTbUBiFAOOowv0DiW4MPet2O1g+HDVThTsXHKUBdw5Sfasd 97BgA6tvZHH2Fuc9MBtcupAz7aJ7Rl1FpSOqLhtSSy7BqTLbg1lPtNcwpRvZMd8Y3D IaNU8d/M3lmmBY3dhUATC5+/RUw9SsR7n90Od+ziu4b0FCliU9ChrgUKGu7jacK8TM y8O47IYbvzPp2wUx75blqdYBGY2Anxj/ZO2YoRBbTopy5E/2Fb7KfT1gUdTU99sUzl BrMWdnzFxj/+xc2taZVmrFjH16qiUeTr+4ogE5IGKv+fDNO62vCz57JkrKMawMa0hN Qx1AAaD8bVoS+Pkpdh7QAEiw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382990; 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=ANf0qjLh3/DlbeEKNhROTlJmh0EJc9wyUJYAdoBe8mE=; b=R25DNCmmNTS0Tw73nf/3whJ3WdGV933HSnFnrzOm6J7/tPndcQd88ZOS/lQLnuKuHK0vyN 3kCfEmlVCO+4zddwCfiXx95GqRkewrCRgSxucoomQo8q7m0FzVBfVu8h/HZ7i8trO5GUaA DfB8jXSgITgXmfsN6BDZsPV8GsjzlWZbzMccE2tAEmc7FtKof9baWRO06kw5b1tOpsP/LF AGUOLtSGzFH3x7IGarwrghiOce4acWyWCu42eyEAVIl+ExpR0AUYVpFSQ+zsJw4uR5V+mM eoJwDn0upOw3tOuus+nsF+0JVYd+6q98/xfI+pHYdKk/lcULOf/kjD7B4aRW2ga/6RBgbQ fZXs2PZJvmI0OtXKR+Ive9XsUGD5xErDWuEEsUp33NhtZehQBXXfSyf6ROvhugAuNbRFwx ybYl49GzbJPPoJQe9rfoWahkAcBhsihTaaSi1h1RVcd9o8FwGNpKbQoUYC36HqAbrObhB+ rpcISnTVCdzeoPldGXUbLeqf7eQlbwyMUY7c2JF7GQg0Fluq4EQqYQ8pDg6yZ9FzaSnKue XAiM868jTU6QiyfzsQhGZCQFIgZ62hfCe00vwT05fBsVQTmcr7IVKDmha3Cw5ZYBuqEjrl QkiO9PI18890T55AiffDmzyTVJL8XLk0WHEZVQmnDrnmIYX/WmXVU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382990; 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=ANf0qjLh3/DlbeEKNhROTlJmh0EJc9wyUJYAdoBe8mE=; b=WL9BGzzje2WmThAhdCMC020iE8w5CfbAYj7mBcJ41nx2BkdJCi+B9QOuE342cuaWPP5P1L LQB6y181F9sFyUBQ== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379729; 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=ANf0qjLh3/DlbeEKNhROTlJmh0EJc9wyUJYAdoBe8mE=; b=xUq9U6KFzbxjTC3/sOYPc9RhvgavjbwooM2nNFyq8VMB2L5X/6QaImJ0ZrsWtoPLBS/1nt GKuYdaLKFX95mqDx69IVPemf9gcQnZOW+Xs1sL3YEO4pplR9NQZjDaVmim9c4lywdQQK05 r2/jrRsM503b9bsxbl4fdRKQmz3lCdAHw95+mloVHpNXo9RP6+TXSpYNMWFWxPexdzY0PV LaMKKJKlibsw8lGFXmb9eCDb/66BD2aMdb/c00q3BC6Geaeao89W04y5SU91YY3WVXbTPG PmOc8k3p7+DzDM0uSduRj/I43++Ux6uslFUt871dAVMCDSkCDtXrSvJLGIVGt+Js2TmKht xTyhXqtrXldXju5NnkZilmpoPt7NWQpt0KmYpRoLIMjztryIltBuxbkvOIrqirBEEhb9HS ZgQA4LErLg19sZ2qJu2dY9c90Sg0A1xH+DmDB+c3KRKF4wRx8YDz4fozInIzyPQ8yZEo3w NF20+4qcoOQe3hWUCksCJ6EPdDrV3elPuJtDr3X42PEzntlhFwkpxokw3GhuyX6eczO4Es /ZcrE/GJ6ExZIGLA2m6g/0fchiOeT9iW50Rb2hEjt86mf4TE4XNQH5BZTXhHk8RLKAOotQ jtxT4bQ2onH/Hw43+hKlaV9sSxsC/L8Lu4tcpyDfY3dgbsxmwQ3Nw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379729; 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=ANf0qjLh3/DlbeEKNhROTlJmh0EJc9wyUJYAdoBe8mE=; b=4bwzj/wYSx3lyeGOMvOS76f+IyhTy88QtpRORzOg/ilH3S5LPwnRmRAaMkxFrMx/MIE24X McvmLfKGXmfiUgBA== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:41 +0000 Message-Id: <20201207221956.667322-9-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 08/23] doc: document databases 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 | 468 ++++++++++++++++++++++++--------------------- 1 file changed, 249 insertions(+), 219 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index a8d48432..c71c275f 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -94,6 +94,38 @@ typedef struct __alpm_pkg_t alpm_pkg_t; /** Transaction structure used internally by libalpm */ typedef struct __alpm_trans_t alpm_trans_t; +/* + * Structures + */ + +/** Package group */ +typedef struct _alpm_group_t { + /** group name */ + char *name; + /** list of alpm_pkg_t packages */ + alpm_list_t *packages; +} alpm_group_t; + +/** File in a package */ +typedef struct _alpm_file_t { + char *name; + off_t size; + mode_t mode; +} alpm_file_t; + +/** Package filelist container */ +typedef struct _alpm_filelist_t { + size_t count; + alpm_file_t *files; +} alpm_filelist_t; + +/** Local package or package file backup entry */ +typedef struct _alpm_backup_t { + char *name; + char *hash; +} alpm_backup_t; + + /** @addtogroup alpm_api ALPM * @brief The libalpm Public API @@ -1123,6 +1155,223 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath, /** @} */ +/** @addtogroup alpm_databases Database + * @brief Functions to query and manipulate the database of libalpm. + * @{ + */ + +/** Get the database of locally installed packages. + * The returned pointer points to an internal structure + * of libalpm which should only be manipulated through + * libalpm functions. + * @return a reference to the local database + */ +alpm_db_t *alpm_get_localdb(alpm_handle_t *handle); + +/** Get the list of sync databases. + * Returns a list of alpm_db_t structures, one for each registered + * sync database. + * + * @param handle the context handle + * @return a reference to an internal list of alpm_db_t structures + */ +alpm_list_t *alpm_get_syncdbs(alpm_handle_t *handle); + +/** Register a sync database of packages. + * Databases can not be registered when there is an active transaction. + * + * @param handle the context handle + * @param treename the name of the sync repository + * @param level what level of signature checking to perform on the + * database; note that this must be a '.sig' file type verification + * @return an alpm_db_t* on success (the value), NULL on error + */ +alpm_db_t *alpm_register_syncdb(alpm_handle_t *handle, const char *treename, + int level); + +/** Unregister all package databases. + * Databases can not be unregistered while there is an active transaction. + * + * @param handle the context handle + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_unregister_all_syncdbs(alpm_handle_t *handle); + +/** Unregister a package database. + * Databases can not be unregistered when there is an active transaction. + * + * @param db pointer to the package database to unregister + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_db_unregister(alpm_db_t *db); + +/** Get the name of a package database. + * @param db pointer to the package database + * @return the name of the package database, NULL on error + */ +const char *alpm_db_get_name(const alpm_db_t *db); + +/** Get the signature verification level for a database. + * Will return the default verification level if this database is set up + * with ALPM_SIG_USE_DEFAULT. + * @param db pointer to the package database + * @return the signature verification level + */ +int alpm_db_get_siglevel(alpm_db_t *db); + +/** Check the validity of a database. + * This is most useful for sync databases and verifying signature status. + * If invalid, the handle error code will be set accordingly. + * @param db pointer to the package database + * @return 0 if valid, -1 if invalid (pm_errno is set accordingly) + */ +int alpm_db_get_valid(alpm_db_t *db); + +/** @name Server accessors + * @{ + */ + +/** Get the list of servers assigned to this db. + * @param db pointer to the database to get the servers from + * @return a char* list of servers + */ +alpm_list_t *alpm_db_get_servers(const alpm_db_t *db); + +/** Sets the list of servers for the database to use. + * @param db the database to set the servers + * @param servers a char* list of servers. Note: the database will + * take ownership of the list and it should no longer be + * freed by the caller + */ +int alpm_db_set_servers(alpm_db_t *db, alpm_list_t *servers); + +/** Add a download server to a database. + * @param db database pointer + * @param url url of the server + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_db_add_server(alpm_db_t *db, const char *url); + +/** Remove a download server from a database. + * @param db database pointer + * @param url url of the server + * @return 0 on success, 1 on server not present, + * -1 on error (pm_errno is set accordingly) + */ +int alpm_db_remove_server(alpm_db_t *db, const char *url); + +/* End of server accessors */ +/** @} */ + +/** Update package databases. + * + * An update of the package databases in the list \a dbs will be attempted. + * Unless \a force is true, the update will only be performed if the remote + * databases were modified since the last update. + * + * This operation requires a database lock, and will return an applicable error + * if the lock could not be obtained. + * + * Example: + * @code + * alpm_list_t *dbs = alpm_get_syncdbs(config->handle); + * ret = alpm_db_update(config->handle, dbs, force); + * if(ret < 0) { + * pm_printf(ALPM_LOG_ERROR, _("failed to synchronize all databases (%s)\n"), + * alpm_strerror(alpm_errno(config->handle))); + * } + * @endcode + * + * @note After a successful update, the \link alpm_db_get_pkgcache() + * package cache \endlink will be invalidated + * @param handle the context handle + * @param dbs list of package databases to update + * @param force if true, then forces the update, otherwise update only in case + * the databases aren't up to date + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_db_update(alpm_handle_t *handle, alpm_list_t *dbs, int force); + +/** Get a package entry from a package database. + * Looking up a package is O(1) and will be significantly faster than + * iterating over the pkgcahe. + * @param db pointer to the package database to get the package from + * @param name of the package + * @return the package entry on success, NULL on error + */ +alpm_pkg_t *alpm_db_get_pkg(alpm_db_t *db, const char *name); + +/** Get the package cache of a package database. + * This is a list of all packages the db contains. + * @param db pointer to the package database to get the package from + * @return the list of packages on success, NULL on error + */ +alpm_list_t *alpm_db_get_pkgcache(alpm_db_t *db); + +/** Get a group entry from a package database. + * Looking up a group is O(1) and will be significantly faster than + * iterating over the groupcahe. + * @param db pointer to the package database to get the group from + * @param name of the group + * @return the groups entry on success, NULL on error + */ +alpm_group_t *alpm_db_get_group(alpm_db_t *db, const char *name); + +/** Get the group cache of a package database. + * @param db pointer to the package database to get the group from + * @return the list of groups on success, NULL on error + */ +alpm_list_t *alpm_db_get_groupcache(alpm_db_t *db); + +/** Searches a database with regular expressions. + * @param db pointer to the package database to search in + * @param needles a list of regular expressions to search for + * @param ret pointer to list for storing packages matching all + * regular expressions - must point to an empty (NULL) alpm_list_t *. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_db_search(alpm_db_t *db, const alpm_list_t *needles, + alpm_list_t **ret); + +/** The usage level of a database. */ +typedef enum _alpm_db_usage_t { + /** Enable refreshes for this database */ + ALPM_DB_USAGE_SYNC = 1, + /** Enable search for this database */ + ALPM_DB_USAGE_SEARCH = (1 << 1), + /** Enable installing packages from this database */ + ALPM_DB_USAGE_INSTALL = (1 << 2), + /** Enable sysupgrades with this database */ + ALPM_DB_USAGE_UPGRADE = (1 << 3), + /** Enable all usage levels */ + ALPM_DB_USAGE_ALL = (1 << 4) - 1, +} alpm_db_usage_t; + +/** @name Usage accessors + * @{ + */ + +/** Sets the usage of a database. + * @param db pointer to the package database to set the status for + * @param usage a bitmask of alpm_db_usage_t values + * @return 0 on success, or -1 on error + */ +int alpm_db_set_usage(alpm_db_t *db, int usage); + +/** Gets the usage of a database. + * @param db pointer to the package database to get the status of + * @param usage pointer to an alpm_db_usage_t to store db's status + * @return 0 on success, or -1 on error + */ +int alpm_db_get_usage(alpm_db_t *db, int *usage); + +/* End of usage accessors */ +/** @} */ + +/* End of alpm_databases */ +/** @} */ + + /* * Enumerations * These ones are used in multiple contexts, so are forward-declared. @@ -1152,37 +1401,6 @@ typedef enum _alpm_pkgvalidation_t { ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) } alpm_pkgvalidation_t; -/* - * Structures - */ - -/** Package group */ -typedef struct _alpm_group_t { - /** group name */ - char *name; - /** list of alpm_pkg_t packages */ - alpm_list_t *packages; -} alpm_group_t; - -/** File in a package */ -typedef struct _alpm_file_t { - char *name; - off_t size; - mode_t mode; -} alpm_file_t; - -/** Package filelist container */ -typedef struct _alpm_filelist_t { - size_t count; - alpm_file_t *files; -} alpm_filelist_t; - -/** Local package or package file backup entry */ -typedef struct _alpm_backup_t { - char *name; - char *hash; -} alpm_backup_t; - /* * Logging facilities */ @@ -1405,194 +1623,6 @@ int alpm_option_set_parallel_downloads(alpm_handle_t *handle, unsigned int num_s /** @} */ -/** @addtogroup alpm_api_databases Database Functions - * Functions to query and manipulate the database of libalpm. - * @{ - */ - -/** Get the database of locally installed packages. - * The returned pointer points to an internal structure - * of libalpm which should only be manipulated through - * libalpm functions. - * @return a reference to the local database - */ -alpm_db_t *alpm_get_localdb(alpm_handle_t *handle); - -/** Get the list of sync databases. - * Returns a list of alpm_db_t structures, one for each registered - * sync database. - * @param handle the context handle - * @return a reference to an internal list of alpm_db_t structures - */ -alpm_list_t *alpm_get_syncdbs(alpm_handle_t *handle); - -/** Register a sync database of packages. - * @param handle the context handle - * @param treename the name of the sync repository - * @param level what level of signature checking to perform on the - * database; note that this must be a '.sig' file type verification - * @return an alpm_db_t* on success (the value), NULL on error - */ -alpm_db_t *alpm_register_syncdb(alpm_handle_t *handle, const char *treename, - int level); - -/** Unregister all package databases. - * @param handle the context handle - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_unregister_all_syncdbs(alpm_handle_t *handle); - -/** Unregister a package database. - * @param db pointer to the package database to unregister - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_db_unregister(alpm_db_t *db); - -/** Get the name of a package database. - * @param db pointer to the package database - * @return the name of the package database, NULL on error - */ -const char *alpm_db_get_name(const alpm_db_t *db); - -/** Get the signature verification level for a database. - * Will return the default verification level if this database is set up - * with ALPM_SIG_USE_DEFAULT. - * @param db pointer to the package database - * @return the signature verification level - */ -int alpm_db_get_siglevel(alpm_db_t *db); - -/** Check the validity of a database. - * This is most useful for sync databases and verifying signature status. - * If invalid, the handle error code will be set accordingly. - * @param db pointer to the package database - * @return 0 if valid, -1 if invalid (pm_errno is set accordingly) - */ -int alpm_db_get_valid(alpm_db_t *db); - -/** @name Accessors to the list of servers for a database. - * @{ - */ - -/** Get the list of servers assigned to this db. - * @param db pointer to the database to get the servers from - * @return a char* list of servers - */ -alpm_list_t *alpm_db_get_servers(const alpm_db_t *db); - -/** Sets the list of servers for the database to use. - * @param db the database to set the servers - * @param a char* list of servers. Note: the database will - * take ownership of the list and it should no longer be - * freed by the caller - */ -int alpm_db_set_servers(alpm_db_t *db, alpm_list_t *servers); - -/** Add a download server to a database. - * @param db database pointer - * @param url url of the server - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_db_add_server(alpm_db_t *db, const char *url); - -/** Remove a download server from a database. - * @param db database pointer - * @param url url of the server - * @return 0 on success, 1 on server not present, - * -1 on error (pm_errno is set accordingly) - */ -int alpm_db_remove_server(alpm_db_t *db, const char *url); -/** @} */ - -/** Update package databases - * - * An update of the package databases in the list \a dbs will be attempted. - * Unless \a force is true, the update will only be performed if the remote - * databases were modified since the last update. - * - * This operation requires a database lock, and will return an applicable error - * if the lock could not be obtained. - * - * Example: - * @code - * alpm_list_t *dbs = alpm_get_syncdbs(); - * ret = alpm_db_update(config->handle, dbs, force); - * if(ret < 0) { - * pm_printf(ALPM_LOG_ERROR, _("failed to synchronize all databases (%s)\n"), - * alpm_strerror(alpm_errno(config->handle))); - * } - * @endcode - * - * @note After a successful update, the \link alpm_db_get_pkgcache() - * package cache \endlink will be invalidated - * @param handle the context handle - * @param dbs list of package databases to update - * @param force if true, then forces the update, otherwise update only in case - * the databases aren't up to date - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_db_update(alpm_handle_t *handle, alpm_list_t *dbs, int force); - -/** Get a package entry from a package database. - * @param db pointer to the package database to get the package from - * @param name of the package - * @return the package entry on success, NULL on error - */ -alpm_pkg_t *alpm_db_get_pkg(alpm_db_t *db, const char *name); - -/** Get the package cache of a package database. - * @param db pointer to the package database to get the package from - * @return the list of packages on success, NULL on error - */ -alpm_list_t *alpm_db_get_pkgcache(alpm_db_t *db); - -/** Get a group entry from a package database. - * @param db pointer to the package database to get the group from - * @param name of the group - * @return the groups entry on success, NULL on error - */ -alpm_group_t *alpm_db_get_group(alpm_db_t *db, const char *name); - -/** Get the group cache of a package database. - * @param db pointer to the package database to get the group from - * @return the list of groups on success, NULL on error - */ -alpm_list_t *alpm_db_get_groupcache(alpm_db_t *db); - -/** Searches a database with regular expressions. - * @param db pointer to the package database to search in - * @param needles a list of regular expressions to search for - * @param ret pointer to list for storing packages matching all - * regular expressions - must point to an empty (NULL) alpm_list_t *. - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_db_search(alpm_db_t *db, const alpm_list_t *needles, - alpm_list_t **ret); - -typedef enum _alpm_db_usage_t { - ALPM_DB_USAGE_SYNC = 1, - ALPM_DB_USAGE_SEARCH = (1 << 1), - ALPM_DB_USAGE_INSTALL = (1 << 2), - ALPM_DB_USAGE_UPGRADE = (1 << 3), - ALPM_DB_USAGE_ALL = (1 << 4) - 1, -} alpm_db_usage_t; - -/** Sets the usage of a database. - * @param db pointer to the package database to set the status for - * @param usage a bitmask of alpm_db_usage_t values - * @return 0 on success, or -1 on error - */ -int alpm_db_set_usage(alpm_db_t *db, int usage); - -/** Gets the usage of a database. - * @param db pointer to the package database to get the status of - * @param usage pointer to an alpm_db_usage_t to store db's status - * @return 0 on success, or -1 on error - */ -int alpm_db_get_usage(alpm_db_t *db, int *usage); - -/** @} */ - /** @addtogroup alpm_api_packages Package Functions * Functions to manipulate libalpm packages * @{ From patchwork Mon Dec 7 22:19:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1831 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 426CA1C9990FF for ; Mon, 7 Dec 2020 23:16:45 +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 23:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379734; bh=M90j5bqRAz4wCiWpqvfdM9njiwjxx+0g+KBTkNTyqp8=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=Ho4jLAfrzTU6V8KHfELPAQUe7H8TEz9uYBXtyBcHd3qilrsHPJcXN74Cr16zQeFux Q3hmjUNfdb69wxEWss3jttOqsCIpLPySIT6QAceJo5F7XBsrhuRragS1vWy1MFGViZ 2k7toRig9JtEb6L+jb99OHUp+toCNYfgtsLH+fuYfSZSt1Y/9Oyo8q5dzLmHPOUwZD m+Sw1ju06LD/P8pLKAP4LwIWJQgJ/qqF7azJrrbmyLjnYqWZKntOvrO/5A+rGdeL0n pBbO9x8K0QOzbNQlz/96xZFAKLw/H+Lgu0Y1qLCj9sX3+oIlIv6I+ODNExH6Ut3ATw elnyfel+TvT3pwsRdLGXje4WNj0CPsW4jCKsGpuzESekH/33530HdQXjKWGrS6/0fY GXnxG2KJ2hQAvJj6m5A/0vx8oyjxl/wbv+8ILZnVSOSQ3IXJP5mucGnv23UFa9ueC5 35U6IRsFOMh4zcypPeDqW95QHvTWcJbQBS2RH7OYtraGGxiPhmC8gqVirBL3vfavpP Y4YRskE206JJSZRtpHls4kEWrlqZGlsmLS/13Sb1JI74t50ngrVNbTOIcz1LuelbQg G0U1VNYIiH48KgVZWLjb51KPbIeAdT+KfW89BPkvOoygYCuV9LwaOb6mhIuDt9KiT3 843iKMSlI7UqouRf8W/QpbfU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382989; 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=p9g9mE8hRK8qSOKsljarFSvGsGSuortOwu2dGjfgoa8=; b=zrzBMpc0qBay9om2xQz06pNXdVDG6Ld9cgopfJ3fn68RsZPgavRv+IVjpysC3V2pXCIyyE TVmkZquXvUitoQ+zGnV8uQB7Y61yx7gW9bsiVWAxHw8+JHYau42wNrEMvKVpqd7lEDCRJZ sO330gS9eCrImXAcqC1p1Pk0cXLOvdwicHdwNsvln6wHqO2xzKD/onga0dHbLnuf6blCbs BzI4tJU5jZltoQ8KeRmxPEMOnEX8euZZ7NFk95nZV1xmLLnxZjcb1GFcW9JQ/6mSqiDbYR GRkMEimVt+Tp8BAScW3Nry01jXBXYBmyAA3ZkC4Q6YZ5+VAVTRXdUnDwOnYrYDbjOcEi4E hcqmQi2HZ93qOImqwbdEoPRIYKazcNuhpQ8FJi4lsOdCzkxaHJ59eOxhW0Mmu5Cnl0IvfM 6/RuwpsVA9GehYIkOzjEKqB0gVybrG/O6POQl7YivSAvbCBaxF4/3fTlLs8jv2KeyOuyhj OlKhtM0wG7RfqN77V3bEymKLFQjSo8PQPpe2okzH5L2LasVUv5eC3SyvOsZd0eCg3X1603 Ao2XSRSypyqoYdh525fq+r7a4QJU5uinnlSbtVy8N/iNkejdE4FD46Wl4yjqcQJn8wUkqq 2KKRsH42A7ba61xi6bx/a/QM/KP9n382gnQlyjmiV5/h5x+/NCY4M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382989; 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=p9g9mE8hRK8qSOKsljarFSvGsGSuortOwu2dGjfgoa8=; b=KmiuM/UHrFwD6xrQz2tZar7wPUROQjLaT9HBWNPDgFEiNwTZytZ/xeiy86FZ16A4O/7R6b WF4NWwSSaO1MXyCw== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379730; 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=p9g9mE8hRK8qSOKsljarFSvGsGSuortOwu2dGjfgoa8=; b=VRY1qY7lBKXlxZIJ8DYz+4Z25hfZLToXY9ZgNNysUyKvRUl2VL8hLhjlaXXSqx6nXmqxxO qSIKe+kaskjPUiDuLAfP9sPm+HxHBm6JXAFWe23Ok31jgnBsEQT7zTT24ta+P7H38NMjx4 N6RI2Eg7os+9XZfeWVetbtXEKuw6sDXDUMnYxbMPAPDRx/JOxkSmS/yeJDNhua/e5bGnAm x5QkdCM2JAK83MAwovJ15E/AbDOChrNrBpUumNk8Y8DNekuRolKmh1bTh+tUm0EbYnHV7c 00svOuhQVhSMFIA4SC2V5Ped3VH/QYmmcNZN3xCeC/dOeI4F7ObDI5WqczG8lh1WwfA7At EJABR6n6ea5yWF6/JBl2s/FJvl1bswFjnIHi0yZZxD83dS8PSBmN0+W8HepxefpDPYRIVG e2JezKkYjbdJ377ROBoOgQi+T2hVuQXGHjEGD9VVwi3V/rY2iKb1Rz/D6Zvd+HiOLtr+Aq nqdwu1U7peC/FCR+UxzMGLBOjhHJG9hItPWwtkXb4fn12kl0vdsa4ZhkSOkmfkHgERCM7U /VMGaXYPVw/jgGNbHpqeLFQfyqX2LWf8gaPv/mcf035LdA9dbwvDekd7/eSAPp+MNp85uD /2QogzeUikjhIsVhpVJCBtRJxXcA+zmcM1axW6Gt0OxHvDvAg6Tr0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379730; 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=p9g9mE8hRK8qSOKsljarFSvGsGSuortOwu2dGjfgoa8=; b=6MIVPc+asjBUefkWeDYlG7UpuUt4CAs1x5qgx7G4iiXL+ntYcB1W6h1nnkCgHzTTWRQ70+ D++tNy/lGNyPIhCg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:42 +0000 Message-Id: <20201207221956.667322-10-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 09/23] doc: document logging 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 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index c71c275f..ea690abc 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1412,13 +1412,27 @@ typedef enum _alpm_pkgvalidation_t { /** Logging Levels */ typedef enum _alpm_loglevel_t { - ALPM_LOG_ERROR = 1, - ALPM_LOG_WARNING = (1 << 1), - ALPM_LOG_DEBUG = (1 << 2), - ALPM_LOG_FUNCTION = (1 << 3) + /** Error */ + ALPM_LOG_ERROR = 1, + /** Warning */ + ALPM_LOG_WARNING = (1 << 1), + /** Debug */ + ALPM_LOG_DEBUG = (1 << 2), + /** Function */ + ALPM_LOG_FUNCTION = (1 << 3) } alpm_loglevel_t; -typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); + +/** The callback type for logging. + * + * libalpm will call this function whenever something is to be logged. + * many libalpm will produce log output. Additionally any calls to \link alpm_logaction + * \endlink will also call this callback. + * @param level the currently set loglevel + * @param fmt the printf like format string + * @param args printf like arguments + */ +typedef void (*alpm_cb_log)(alpm_loglevel_t level, const char *fmt, va_list args); /** A printf-like function for logging. * @param handle the context handle @@ -1429,6 +1443,7 @@ typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); int alpm_logaction(alpm_handle_t *handle, const char *prefix, const char *fmt, ...) __attribute__((format(printf, 3, 4))); +/* End of alpm_log */ /** @} */ /** Fetch a list of remote packages. From patchwork Mon Dec 7 22:19:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1815 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 8596C1C996DA9 for ; Mon, 7 Dec 2020 22:31:38 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:31:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379736; bh=ZMN3m1PRnTRqqzlqf9UDp6onnraHtZSQLJuwNmAmu7A=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=sKgdukVMN95UoKwlk/d/+PoXIo/lQtYydDnpKziSZTTOv78hH01fRwbbyYI8/Muek 5FtxCMVRvBP7I9i7a5XqnfyrEnzhEvRSWj9MZjySQFqgagNVOXhO4prDdArY/B2M6X AYYkcIMtkH2G7Q/WWyL6dxVMcHFiSOynJ+4bFsFaTru8YlX2XlmRqSVjMO53RFQKYT kAqEHRIrkeUnU2uSF8QOFh/qwiQGtpZES7xniw2izt7shIRSX0GfdqkDikxsweoMpo tiYYl7nmq0PnEVMSxDQM3mhj+ivQ1yBvT1ogkefjJ1oGjrEznQFPrHZARvbWFaJw46 Slkt4CaXNLvmcsxyJ/xXuW2xA2h6pV89viCUkJivd+ukiY5wj6cj0cX/Bwoloxjzow RV81jyn5ucj4Qt9fMC6Wh9pEE6uxRLsnEGxyeAh/Vu9lYAQtje14P4ilwH+Khg/1W0 VqUE2wijVvi2Jn0kwLUGvKtdhsD6h8SyYASxEfNZo3+nUVIoi4nG9uTiyqmPKlY9El /Ru/Qz4674eTOtPxoa7p682YOTAFyE3OIu3oXoBhYKgvhszmvFeriaWyPo4SOLOg+Y sRH8pNBjW3FF/EvGEYztTNxIvkhngHNQB6AyKK7J/1PytzjoqT4+vlFHogdKhvgi4c ujAAwfVvCLWq/vxfBXCAiVP4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380288; 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=Hi6QdxO85VxhypBoMgFzVsJJt3lbQXiFGx4Sh3Ou6Dc=; b=adYqqstG7YRvtqHcv2iA0vLwE1eQFb7f2MSZmggTEuJ5+S/40ek8bV9gVYfZwuvN0gdn5+ P0qQBV3wHli8latH5gdSrk2eFGD1vJxpUYIfaMHLmqvcSJyb/kovUPInsSErVFdZ6CVf6S +SbUJd4EtcSyMi9knRvRYPnSGBSiV9Xa70AadCSiVB7G+G1SfJfH3uUZy13//sg/YMGPQh gJviKXoVoM84+1JAPJR3anY6HCtCDgpFu8ovTYvvEUzSBwKCZRW+6yMdGjVHnX4jhVIGCZ bV9kdFacknUlYlCPPQyTBTtpmMgTpMU8wgHfVg3FLBlx6VlY5ldPQw/wTyF27cC8A7wnxf Bfhve1mX5M4BjCO8PGITEmg6yZ94/8eh6OTleqEEt78sauzFZwnoKZiIZbsvhu+pX8kBIu 9VsT9vxp6jUYODOuzJ771imStkJ33nDiC7Sq/Q54TBcv7dz9Q2TsIFvOdpM531ILI3q4Wo Vy51DHz1W7fy1vXbIWvVOwtbahlluZnTPkSX3fm+NgV5uz3WwygocicFFUMnEoNy8kVzU/ qoq31PNBj4TdygNlO1hZZtjNmVn4NsmlOG+XstRJEivBWV+w81TrW3gcfE/IHEN2f0T+Si yL8lm/iEeHKK9Fes6xXBccfyrkHaZVw2e7fLC67YpiDuUMJEiXoDc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380288; 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=Hi6QdxO85VxhypBoMgFzVsJJt3lbQXiFGx4Sh3Ou6Dc=; b=cI3w6v2SjabGxeZ6j69nFi8Mzyq1QoyTOrP6A9IaJvRF+mGS1ZAtiDtHIFjr6Cbs9OWq4C eyuxllMlKAwq9uBg== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379731; 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=Hi6QdxO85VxhypBoMgFzVsJJt3lbQXiFGx4Sh3Ou6Dc=; b=Pqcn3yjDtfnr4lNSO9JmXQk66mgjZFacyq/sIBw7wtpuRPxB2YpkN2P+d6wPZVQZZHngRH UNrSXjM68HQOgA93pbdDlA+6wuZKdH+EJ4FlHAflsQMIUfUwfgK2yYpouA768Wl+MuTEla dnFBj81pyMaDroaGJRfvWIRg2S7+qlEf1SRSTBLJjsIS9D5i4OQqRtm/P79LsWNY5xJizX hF0WT8p/xrlto4gDug1GW4BDxfChGHNMWMnfnGm0soSGZGfF6V0fZWl6+4PW/hnVWFOiBb 8jGF9PrhrwjAf4lxNjHgMPY222712yfSnO2JQk4nma4YwQZbv2+s/++dHbblHg66gIzOuR V4SyuJw6MXAQjTINIdNr2Ef5ZO6zokm/7Bv7x4Mt5PcFPy0XiIQfWscSJRvbPcF+Jjju0l to6jGytmNLWLIg79kJB4bDy+Tr302jPspuEQk/CKVyhzB0s+obtHu2P3NkniCpWb0edif4 qLPys//ccgXTrtI+KZhYv0GbbK/ayoCLNAC6udikiVKIrt77lF/POLDyiHctJrxoSczQhR HZTjrFeqeZDmly4lIpfyKcvlt6yKPI667haauwAgsUs9CeoEVXFYEdoLaR1r1fbOkBdiE7 Q88L7+inWjJIK1D1u0Qn86ZEFA8+MKgtdDmRq5T9UJ+2kDcbiXAC0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379731; 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=Hi6QdxO85VxhypBoMgFzVsJJt3lbQXiFGx4Sh3Ou6Dc=; b=zEg144prYp1r8APzzR5RYUGqYZOVfEB/dzob/kKzs/Z3frl5FoPitlsDpi7VbqoI51sGgO q+Hr7Q/gKO+gUEDQ== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:43 +0000 Message-Id: <20201207221956.667322-11-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 10/23] doc: document packages 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 | 164 ++++++++++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 68 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index ea690abc..5ee99711 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1368,43 +1368,11 @@ int alpm_db_get_usage(alpm_db_t *db, int *usage); /* End of usage accessors */ /** @} */ + /* End of alpm_databases */ /** @} */ -/* - * Enumerations - * These ones are used in multiple contexts, so are forward-declared. - */ - -/** Package install reasons. */ -typedef enum _alpm_pkgreason_t { - /** Explicitly requested by the user. */ - ALPM_PKG_REASON_EXPLICIT = 0, - /** Installed as a dependency for another package. */ - ALPM_PKG_REASON_DEPEND = 1 -} alpm_pkgreason_t; - -/** Location a package object was loaded from. */ -typedef enum _alpm_pkgfrom_t { - ALPM_PKG_FROM_FILE = 1, - ALPM_PKG_FROM_LOCALDB, - ALPM_PKG_FROM_SYNCDB -} alpm_pkgfrom_t; - -/** Method used to validate a package. */ -typedef enum _alpm_pkgvalidation_t { - ALPM_PKG_VALIDATION_UNKNOWN = 0, - ALPM_PKG_VALIDATION_NONE = (1 << 0), - ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), - ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), - ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) -} alpm_pkgvalidation_t; - -/* - * Logging facilities - */ - /** \addtogroup alpm_log Logging Functions * @brief Functions to log using libalpm * @{ @@ -1446,17 +1414,6 @@ int alpm_logaction(alpm_handle_t *handle, const char *prefix, /* End of alpm_log */ /** @} */ -/** Fetch a list of remote packages. - * @param handle the context handle - * @param urls list of package URLs to download - * @param fetched list of filepaths to the fetched packages, each item - * corresponds to one in `urls` list. This is an output parameter, - * the caller should provide a pointer to an empty list - * (*fetched === NULL) and the callee fills the list with data. - * @return 0 on success or -1 on failure - */ -int alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls, - alpm_list_t **fetched); /** @addtogroup alpm_api_options Options * Libalpm option getters and setters @@ -1638,11 +1595,44 @@ int alpm_option_set_parallel_downloads(alpm_handle_t *handle, unsigned int num_s /** @} */ -/** @addtogroup alpm_api_packages Package Functions +/** @addtogroup alpm_packages Package Functions * Functions to manipulate libalpm packages * @{ */ +/** Package install reasons. */ +typedef enum _alpm_pkgreason_t { + /** Explicitly requested by the user. */ + ALPM_PKG_REASON_EXPLICIT = 0, + /** Installed as a dependency for another package. */ + ALPM_PKG_REASON_DEPEND = 1 +} alpm_pkgreason_t; + +/** Location a package object was loaded from. */ +typedef enum _alpm_pkgfrom_t { + /** Loaded from a file via \link alpm_pkg_load \endlink */ + ALPM_PKG_FROM_FILE = 1, + /** From the local database */ + ALPM_PKG_FROM_LOCALDB, + /** From a sync database */ + ALPM_PKG_FROM_SYNCDB +} alpm_pkgfrom_t; + + +/** Method used to validate a package. */ +typedef enum _alpm_pkgvalidation_t { + /** The package's validation type is unknown */ + ALPM_PKG_VALIDATION_UNKNOWN = 0, + /** The package does not have any validation */ + ALPM_PKG_VALIDATION_NONE = (1 << 0), + /** The package is validated with md5 */ + ALPM_PKG_VALIDATION_MD5SUM = (1 << 1), + /** The package is validated with sha256 */ + ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2), + /** The package is validated with a PGP signature */ + ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3) +} alpm_pkgvalidation_t; + /** Create a package from a file. * If full is false, the archive is read only until all necessary * metadata is found. If it is true, the entire archive is read, which @@ -1660,6 +1650,18 @@ int alpm_option_set_parallel_downloads(alpm_handle_t *handle, unsigned int num_s int alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full, int level, alpm_pkg_t **pkg); +/** Fetch a list of remote packages. + * @param handle the context handle + * @param urls list of package URLs to download + * @param fetched list of filepaths to the fetched packages, each item + * corresponds to one in `urls` list. This is an output parameter, + * the caller should provide a pointer to an empty list + * (*fetched === NULL) and the callee fills the list with data. + * @return 0 on success or -1 on failure + */ +int alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls, + alpm_list_t **fetched); + /** Find a package in a list by name. * @param haystack a list of alpm_pkg_t * @param needle the package name @@ -1668,6 +1670,8 @@ int alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full, alpm_pkg_t *alpm_pkg_find(alpm_list_t *haystack, const char *needle); /** Free a package. + * Only packages loaded with \link alpm_pkg_load \endlink can be freed. + * Packages from databases will be freed by libalpm when they are unregistered. * @param pkg package pointer to free * @return 0 on success, -1 on error (pm_errno is set accordingly) */ @@ -1724,6 +1728,9 @@ int alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg); * Any pointer returned by these functions points to internal structures * allocated by libalpm. They should not be freed nor modified in any * way. + * + * For loaded packages, they will be freed when \link alpm_pkg_free \endlink is called. + * For database packages, they will be freed when the database is unregistered. * @{ */ @@ -1927,8 +1934,36 @@ int alpm_pkg_get_sig(alpm_pkg_t *pkg, unsigned char **sig, size_t *sig_len); */ int alpm_pkg_get_validation(alpm_pkg_t *pkg); +/** Returns whether the package has an install scriptlet. + * @return 0 if FALSE, TRUE otherwise + */ +int alpm_pkg_has_scriptlet(alpm_pkg_t *pkg); + +/** Returns the size of the files that will be downloaded to install a + * package. + * @param newpkg the new package to upgrade to + * @return the size of the download + */ +off_t alpm_pkg_download_size(alpm_pkg_t *newpkg); + +/** Set install reason for a package in the local database. + * The provided package object must be from the local database or this method + * will fail. The write to the local database is performed immediately. + * @param pkg the package to update + * @param reason the new install reason + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ +int alpm_pkg_set_reason(alpm_pkg_t *pkg, alpm_pkgreason_t reason); + + /* End of alpm_pkg_t accessors */ -/* @} */ +/** @} */ + + +/** @name Changelog functions + * Functions for reading the changelog + * @{ + */ /** Open a package changelog for reading. * Similar to fopen in functionality, except that the returned 'file @@ -1953,10 +1988,20 @@ size_t alpm_pkg_changelog_read(void *ptr, size_t size, /** Close a package changelog for reading. * @param pkg the package to close the changelog of (either file or db) + * @param fp the 'file stream' to the package changelog to close * @return 0 on success, -1 on error */ int alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp); +/* End of changelog accessors */ +/** @} */ + + +/** @name Mtree functions + * Functions for reading the mtree + * @{ + */ + /** Open a package mtree file for reading. * @param pkg the local package to read the mtree of * @return an archive structure for the package mtree file @@ -1974,35 +2019,18 @@ int alpm_pkg_mtree_next(const alpm_pkg_t *pkg, struct archive *archive, /** Close a package mtree file. * @param pkg the local package to close the mtree of - * @param the archive to close + * @param archive the archive to close */ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive); -/** Returns whether the package has an install scriptlet. - * @return 0 if FALSE, TRUE otherwise - */ -int alpm_pkg_has_scriptlet(alpm_pkg_t *pkg); - -/** Returns the size of the files that will be downloaded to install a - * package. - * @param newpkg the new package to upgrade to - * @return the size of the download - */ -off_t alpm_pkg_download_size(alpm_pkg_t *newpkg); - -/** Set install reason for a package in the local database. - * The provided package object must be from the local database or this method - * will fail. The write to the local database is performed immediately. - * @param pkg the package to update - * @param reason the new install reason - * @return 0 on success, -1 on error (pm_errno is set accordingly) - */ -int alpm_pkg_set_reason(alpm_pkg_t *pkg, alpm_pkgreason_t reason); +/* End of mtree accessors */ +/** @} */ -/* End of alpm_pkg */ +/* End of alpm_packages */ /** @} */ + /* * Filelists */ From patchwork Mon Dec 7 22:19:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1818 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 9FA691C996DCF for ; Mon, 7 Dec 2020 22:31:44 +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:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379738; bh=PwmpjPbAhXfZuxHuLJf9acQaideBPcozjZwR3VHS2IA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=sLYXa7wh/3/co//VcO79kC77kppHFl1LXvFV2jfsvFsh0uFb69oU/MoLpRqvLkJi8 taoStID7Y21xiimObwywldgoYJNUkkEYy03It2LrtH3yHcU4Nj+xipBwvSo5Wdx82q /T8RsjU/GygQ1gYqX09j3Z70ZrBEwUFyrZ3gyPTezbL4DroW+4EtlHEPchq2/EbM2t t9SCyGY3m0TTxjaDV+knssfCilXJArRIksAfplbP3dgG5jyIQfvr7SO8jVKOeLuir5 /NuUlVSPel3gvLSyXMvKCJ3L5uXdcscqPTmm8AUwcHDe4DNUG0wT+WHOPv+SFxg5Bi izbvL6CNzD68z6gP0k/orHows1XKrUEB5svx4+SNnmO6qgkBqfnoaXNXvaMG8Xq6iY Uoymg/ae4bLPT/B5X6A97CdPULkHT79v7zc6bVONDyUD5Law3NtWHp+txynIvwyVs0 dlkLXBslB+nnqtYHPL9QRFlV8nfsuISvCMlCI1d09BXrAiJDveoVQy/5BxjGay2buO FOI2MNCiEQq/Tgd+m4NGj8LwNsJABW8G+YAVay7ahZFve9BXCUWZKoYdFkVsgasHzC R3l/loBvuUi2fZPFLmBQThZsyITop+WWu02lxbOZr9EQZZJXz/i1wi2oDENkCpAjbz byIdDw5ZjSPrHTN6IfDELh4o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380290; 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=EKaOstTmMsabBPWFn0lweRyEaf91AIDFjES4bBYzCGQ=; b=B8+Eg3IIcCmfTUbPKzJacLfoA1F4DJpL5UsOn3x2Dn/bXSrV8sTbZ2jwJEmdgbxjBxqU8n UXiyGpsqlXiYN4QkAxSJt8icJSM+8SY/h+4SlQhwtfMyPBwwF6GptRonOehbZ9236W7ADY 3Zv7BAh7DyPtfMvo0G3uSURFjfiJN+npoDynxzbb+r3v9KRlPmJObljccN3yFYiqju6lhK GrC26azyFZShfookh30bmx2hU5YPlqlDDC0fKfJFb3xqCBF7I9vdKRF03Q8QsmbNeputtE f8mZJOkG/j/1L53azvt1eVa6cJbubVOOzh497Y0MnFrjeyDWyxH8oRMVeEQBBD1uu1/46C 83s5TWzXGivrXzzFsqtjkmGdQLT7Gp7Ahlq1cqBRIwiVy75f5BSy6lf9L2wVaKwbXRoj8u WjRXmPQFqt7afR27pNgA5ZkAeJLxY+wsXyy5r7YNUg/BuPkcZsFUs6heQZaAmb/pwbzddC 9MqMmdppbsA8FJgfToGC0LCmPcVP7/Spi3dtgE6z91BjqbIro3RvVTTDOZ0a8Sg/daTh0P 1aQFZ4iB2mGkfT9P672Wt4tbwY9i6VreqXYMLY3QYbQRaedneRw5gJj3xkAdvSbweOUaZw OWez723T0frhd8VA1ydPRZ+cRBcFUf46JNFfSbmo3P1MklhgBkQLA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380290; 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=EKaOstTmMsabBPWFn0lweRyEaf91AIDFjES4bBYzCGQ=; b=9ghHoTY0rYoEiRMOymj8LlLnMyi4b3geRdIgmMjLP/TeK5VCh93b54UH01xiw8Vc/j9PcR hWReolN/Wmk942AQ== From: morganamilo DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379732; 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=EKaOstTmMsabBPWFn0lweRyEaf91AIDFjES4bBYzCGQ=; b=Te9khUBJ8y9mb61s608h2CbDiVf8X4UZXFBIaURRq5yfsuQ9q2rI+mmLYS9SVk++ogz6Lf AnsR/3VsAjM0FBDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379732; 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=EKaOstTmMsabBPWFn0lweRyEaf91AIDFjES4bBYzCGQ=; b=hM8f28FNuIeBSCe+cTwaNnRFjYl0DDxjxkQwn3qj9v4mJLjV2Db0rORqTHMbNUGEYRfc0k JzmfQoxlqsKl8SgUH/owqNg1JOOKVP3m5BQRueeVx+GfVcHQrUhxvaMzGWYuPOZznrRImM E+N+L6geE37uTv924MDwGdCljcL5ArqBFko1bYKX30i6Q4TPIbR5yWJY+rqG8xj3kVVeCU zf+Rg8Tzzlv32LXqo744VVznIMSiDEKIpV69smuoNWx5HvkkjAszcgmKXWKNOsViqrdtLc W2D7jObLqqxMWclshXxckFEAOHh5AZKg+6nAz8xhJshEYO9yl5pzobh5htiE9s/ZmYD4jX WmZHz2mlni9WvI3cJi+cSNY6aaBDXu0RJKYYUWA2BMuqLkmZaf+GlXUYzkNQKGE0LT7VMW dnWug72MsgQmjP0YefOKSb/GxpGiMM4/zthH6jcFPkcUmikrMOXznJlVwPBHhLBLV9quNQ 2vBWmDYPxqsfNif2iZsyJWVdnYWSJcs8QF5kiyylnmAnPFLPZ1u5Qbh5En082DEX8/Y4uI MgWbUHUjVCHff3l4LMdYGwKieZEBja8kYi5Jvu31XdmMAQT89t/6aOBl2KTToAp+z4hWg4 qvf7RAUsc0n6/CD86IaWejtbroa/dAUn5yPUqkeQvbIxVP/BLXRd4= To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:44 +0000 Message-Id: <20201207221956.667322-12-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 11/23] doc: document files and groups 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 | 102 +++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 5ee99711..30bfb06d 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -94,44 +94,82 @@ typedef struct __alpm_pkg_t alpm_pkg_t; /** Transaction structure used internally by libalpm */ typedef struct __alpm_trans_t alpm_trans_t; -/* - * Structures +/** @addtogroup alpm_api ALPM + * @brief The libalpm Public API + * @{ */ -/** Package group */ -typedef struct _alpm_group_t { - /** group name */ - char *name; - /** list of alpm_pkg_t packages */ - alpm_list_t *packages; -} alpm_group_t; +/** @addtogroup alpm_files Files + * @brief Functions for package files + * @{ + */ /** File in a package */ typedef struct _alpm_file_t { - char *name; - off_t size; - mode_t mode; + /** Name of the file */ + char *name; + /** Size of the file */ + off_t size; + /** The file's permissions */ + mode_t mode; } alpm_file_t; /** Package filelist container */ typedef struct _alpm_filelist_t { - size_t count; - alpm_file_t *files; + /** Amount of files in the array */ + size_t count; + /** An array of files */ + alpm_file_t *files; } alpm_filelist_t; /** Local package or package file backup entry */ typedef struct _alpm_backup_t { - char *name; - char *hash; + /** Name of the file (without .pacsave extension) */ + char *name; + /** Hash of the filename (used internally) */ + char *hash; } alpm_backup_t; +/** Determines whether a package filelist contains a given path. + * The provided path should be relative to the install root with no leading + * slashes, e.g. "etc/localtime". When searching for directories, the path must + * have a trailing slash. + * @param filelist a pointer to a package filelist + * @param path the path to search for in the package + * @return a pointer to the matching file or NULL if not found + */ +alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path); + +/* End of alpm_files */ +/** @} */ -/** @addtogroup alpm_api ALPM - * @brief The libalpm Public API +/** @addtogroup alpm_groups Groups + * @brief Functions for package groups * @{ */ +/** Package group */ +typedef struct _alpm_group_t { + /** group name */ + char *name; + /** list of alpm_pkg_t packages */ + alpm_list_t *packages; +} alpm_group_t; + +/** Find group members across a list of databases. + * If a member exists in several databases, only the first database is used. + * IgnorePkg is also handled. + * @param dbs the list of alpm_db_t * + * @param name the name of the group + * @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free) + */ +alpm_list_t *alpm_find_group_pkgs(alpm_list_t *dbs, const char *name); + +/* End of alpm_groups */ +/** @} */ + + /** @addtogroup alpm_errors Error Codes * Error codes returned by libalpm. * @{ @@ -2031,34 +2069,6 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive); /** @} */ -/* - * Filelists - */ - -/** Determines whether a package filelist contains a given path. - * The provided path should be relative to the install root with no leading - * slashes, e.g. "etc/localtime". When searching for directories, the path must - * have a trailing slash. - * @param filelist a pointer to a package filelist - * @param path the path to search for in the package - * @return a pointer to the matching file or NULL if not found - */ -alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path); - - -/* - * Groups - */ - -/** Find group members across a list of databases. - * If a member exists in several databases, only the first database is used. - * IgnorePkg is also handled. - * @param dbs the list of alpm_db_t * - * @param name the name of the group - * @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free) - */ -alpm_list_t *alpm_find_group_pkgs(alpm_list_t *dbs, const char *name); - /* * Sync */ From patchwork Mon Dec 7 22:19:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1822 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 2CCD21C99763C for ; Mon, 7 Dec 2020 22:41:41 +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:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379739; bh=lu28HHZNO8hp24dUfdxCyWYfMzlfqHcFtbgZRENdma0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=pwPxNM55nVtttUnotBZe1n9z2c5CcLdWOHQErwZXaGNrqGe1EJwTKBl/Ramu0ISZW TLAt0GjuPxZ06xvSSmGpxl/fLbHCJ81pViyJeptQGZoEHzI2ASP+Me3JrJF/gq6IAn gKrgm2YZPdQKxLzPdMOOjkIRctZrqjRquMB4owX5GABiq5S+c9adHQOFzbXhxl951D m8EQELWgvadQVAvxJPJsOOaRJnzeAoz4T3jcrakEWrcbf/F5qt1PKE0CYNV3t7Mn8s 6f0yC4uNS1ljYkLQrqcckCaJmjCf9IaPKyCIsS9c6aK5JUmHShrOaax90IuMy1kldf O83Qqj8IcMkB5prL+pF19A19BLjkCSi9OPmxZnbkKuz/5sSuVk+eJUX3sbrXaeEHGv kiZ23O8y7gg0WnzdyTpwKEmeiv2a1hriFnOeklqoX/qFVhSXP0FGEUkZFiHpfYlFaB sJar62+f80iR7yCm6KIrkToWU87m0DRBwUIGnE2TmoFUHMb7cciB00qBTpFtn1MnBB S50ge3bwCCrSZ1jMWCS4p5FkSLMCfUnc/Z4jPJM89rP3WSKj91dQ+nsO2VyYUtlt3S C1yktqbEsjag5MAB6plm9/RBbkXtYKFQqF9DYuAuazgK0D8v/VCRwJk/YHY+VU794g jjJOao6WTMDn4403Fttjt6Sc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380891; 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=3ksxaf2/Bxd1FPOpToL8CTq6bTE048PTOoPSChsOabQ=; b=K1D9WVOZtdRz0VyS3+vddAV8esfjtHGE5W6tGNib9KFVg9/0veU7DmAjWCX45cULpbaRxV HLeymDDm1pQURsfqQqs9BgpeTzFIm+AwmmOKwj3/qlEKuQdxRk2M0cA6HKUX3dEyqPpwIb HBzLDW8VqcJ4dRylKgD+bimxDrrZkRclLGS5+Zz0TdkT8pWyymNyB4uIP9ETkvYLr5Chld bwJu0hmXVW8pATtRyG+s65Yw47ANS3A9lBWaReYXOpZWSvGiWSO/SWLcoBpyl/TmGeXZZb SjVMlWsv8hVgbuJOeooGyWZnlLo2dJq5+y/wC8CObA6QupqtfEniE9rLbRqJPDW79rsLIy izHdmiJhOTf0Dnih0NHwT+xbSwKXouWemac0iexHYMVWtsw7igCD8g9duaG1wtXqFVC65e 3afI+rfTePWaDi+LkrzoL6/115MNm9Ws1Xt/colcqMQCSPv1Ga9SQhJ25xBQk5y+XHsV5D Q8Lq8UX7YedRirr5XYqCX5fE14GYevHHQTmISD5TS+spl0zbYXhZ28zmF2GsVSJSG51OSi 1v4q2w2F8S9/ESq/w8Tg/95WEnjOxlO3UpZuVoEzUicXyhDMZnRvwAdFyOj6O0mdP66oVW XUmxW4aJjZj4WOOc1dftJ0svx2/n6BQKsdqSX69bBA3x+Nq0OEZPc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380891; 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=3ksxaf2/Bxd1FPOpToL8CTq6bTE048PTOoPSChsOabQ=; b=qwv0zNIbKMr/COtljmJcoMCF6Bos8ibzJzH9Bu2IperobajpyD0c2Ydx1FUFL76ro5gpKa 9zvjH8wxjiWN4sDQ== 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=3ksxaf2/Bxd1FPOpToL8CTq6bTE048PTOoPSChsOabQ=; b=s5BdtxdTnOkloSHTKnngv3Lf/gQlOQMGgTvnAbgTvL8FbKwsViXLhcjH9VgdcgVG9tOFKx gEOvVMtlyC4unrh5GuHUtAY2niH36jBppxBnmu3bb+A/S3tzc21mDoabda2r6ZRPSl8bDt OMbDszvu1SRHsmt/KG8pEZLdnrEeUlGao+v8Xj5R3pLpwZAVIzLpBtFgiOGfC2Pg3n+Bq9 WmTzJlj9efqDpi/IuMTyGQgsj2ms8ZWpc+KdeMKrsbjAE64WEN1+0gzlGBlbbbokvZdXom 2Hy9FjwOAb+6186YUJMJHu+sza1ZJ9Vs6/Cqi7LxnX5BgKB+/TtilIC9idsEcuGa8e3DYa w3zqU+KGcfawfQsbhJNdEGFx9bzmBHlt6k9VBQvRT/2O0zn7PqoZ5SdlFZuluc15IULc7I dEcMfukFlHwPnV37IDSelyYmOi8r6afyPvE03l7tPedtfJVPTpg4dXOQVNfH5FyRfES8qy /b8mMFAfMIADWQJdZWraPZ8jJs2HzlNreRE4AFEPApyIhiUZeiLXkD+kYJ1dvCd/UbbHU7 gZSntv6nXQIc0ieTCYhCiEJFkuz28x9qyC1TheqfUa0xLx3V2l1abMAe3zb/zrtmDEeMAC oh5HnpBvvXQVZ8ssS7jQbY323U9/qwojVjgrONfWFiCiTSVkyl3TI= 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=3ksxaf2/Bxd1FPOpToL8CTq6bTE048PTOoPSChsOabQ=; b=41aaAr/aFz/pOpl0tl4QmqFg67+btKkWLqEzohnZg2Dc1BMYJ3IZtIf0+AcuMYhXXuQBL0 5hCGQ9631ukp65DA== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:45 +0000 Message-Id: <20201207221956.667322-13-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 12/23] doc: document transactions 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, 23 insertions(+), 12 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 30bfb06d..76ae5722 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -2068,18 +2068,26 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive); /* End of alpm_packages */ /** @} */ - -/* - * Sync - */ - /** 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_api_trans Transaction Functions - * Functions to manipulate libalpm transactions +/** @addtogroup alpm_trans Transaction + * @brief Functions to manipulate libalpm transactions + * + * Transactions are the way to add/remove packages to/from the system. + * Only one transaction can exist at a time. + * + * The basic workflow of a transaction is to: + * + * - Initialize with \link alpm_trans_init \endlink + * - Choose which packages to add with \link alpm_add_pkg \endlink and \link alpm_remove_pkg \endlink + * - Prepare the transaction with \link alpm_trans_prepare \endlink + * - Commit the transaction with \link alpm_trans_commit \endlink + * - Release the transaction with \link alpm_trans_release \endlink + * + * A transaction can be released at any time. A transaction does not have to be committed. * @{ */ @@ -2172,10 +2180,11 @@ int alpm_trans_interrupt(alpm_handle_t *handle); * @return 0 on success, -1 on error (pm_errno is set accordingly) */ int alpm_trans_release(alpm_handle_t *handle); -/** @} */ -/** @name Common Transactions */ -/** @{ */ +/** @name Add/Remove packages + * These functions remove/add packages to the transactions + * @{ + * */ /** Search for packages to upgrade and add them to the transaction. * @param handle the context handle @@ -2186,22 +2195,24 @@ int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade); /** Add a package to the transaction. * If the package was loaded by alpm_pkg_load(), it will be freed upon - * alpm_trans_release() invocation. + * \link alpm_trans_release \endlink invocation. * @param handle the context handle * @param pkg the package to add * @return 0 on success, -1 on error (pm_errno is set accordingly) */ int alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg); -/** Add a package removal action to the transaction. +/** Add a package removal to the transaction. * @param handle the context handle * @param pkg the package to uninstall * @return 0 on success, -1 on error (pm_errno is set accordingly) */ int alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg); +/* End of add/remove packages */ /** @} */ +/* End of alpm_trans */ /** @} */ /* 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 */ /** @} */ From patchwork Mon Dec 7 22:19:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1829 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 71BB81C9990DD for ; Mon, 7 Dec 2020 23:16:35 +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=-0.6 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, LOCAL_FAKEBUSINESS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_PASS=-0.001, T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 23:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379742; bh=fls93HoxGnwitk2oRYN6ljgZ+K02xtE89YY3drIn66k=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=jIO5m/pCC8qI/k6TJNOIMpHqF6dQHf9zZ8F6qESlAXjRlJlaMoOgOuDYgXEfD/fij euwKUPd0V75FHnddLiBRlq/15PwbJr+WXCZ/7gJfzOhNBf1994Yd8Lf+Cc6maqxL5S f/C2dT0ndiiTqObt/f1j6BzpeViU4hJYxjMKUa3DomRIAhcgBz3Ar1+LnVoEw9KkBn cwcx0/hLlnX5MUJko8ZvLRYHSlLaxjquEF5N8X5z0NQyyVoKxq6wqq0RR3ZfuZsoA6 g0/fcf2VBezCB9kTRNCGc05O7WX3rGnux5SyBSNW8EDewJr34KniKIemuQ+uZjoMxU XrdiriF8sh3yX/w/256vzFFfxA+aA95dObPefMHznF3M4eJa3pAoxOWbY2IRLNt0FW aeuT5ToctVqE/kUiJLy938gmf/SIgsBSSjp5/sdlkPx9mYlnPINvWTQo2CbkyHqovm sJsQi5HVH3ynmIqVu0GNZ7IYk02CktB6rSGdqt8fAsYgR3lMMdJDvmRrcViiAqgeEc ZEVtnhQlPNsAVwoW6q59BBKIHdsenXGuFVOnlNdF0wYlECj4mqXY/DwvwzT6DPLKpE ZwGKwTX/ZmHZT0MdxbyLCixhNIV9TFJx7gGEeF+Sz5Hh3+OqpK9NcXzdErP4aaHCBb 9YccTX+yT9RWxPuMWt0i0pu8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382987; 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=x28HrpXT1wnu8AamGxa1QFMQPm/6ngVLgyMcys55szM=; b=mQfQhHzBPUXpYO+CogTvF+xyHCGWLP0cyhC65GuwV5diggTBOe/58wF2HrvG6kddHE6Wu0 0Pdbx82P1vi4PitEuAQlgUqdZVxU+xRdb9VcLdwDokE8qti/1o7CtLXrKio92UlhaULICQ ReOWu8kwf1CyF5PcVLNq/tsiUisrIp4Xhsl8glURIQi+u1LNZ9S788/23gAQiLcUUjI0vL DFbF5W4xm1UbwwZvVuZlpidii7vyKOBX2lCpwVpjb/kk2wtHaLxy219zn/wi99XqfNMvwr LDxGysjnsa/dSxuzdZnKV2rwDAzEqdX0M6ViRJLjonPFA7+zWzgkLE3vBlb8buFSninAW0 g3Eq9Cs/WMkZuPQZaKZT8115hLaRHCMPjr4tXWzhFdf5qTGajkAWOdm53OkVvbeF3SIS+U nuqQHW4mLk3uduPKudjr23ac2VLEVFey3JvdnWgZkVVbKnUR7FtXGS3se6M3WkN/A/Ei8U Lwe4bXRepsg5uHoSZd3YHHJv91tcy8fURFzeaRFk6kqLFSR60dLVDftyBWLBCRId5/yPhQ EsPHdyenCwYQhNBweRuN33J7XrXR8iprF8gEu8fjp8XZ5f2I1tYGw38FjHPGuy975ZzxUs DXYd3f9RWIzUm7oSRuB9I4X9VXz0uOPyUBRubJOujCNSJ4ny48Dto= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382987; 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=x28HrpXT1wnu8AamGxa1QFMQPm/6ngVLgyMcys55szM=; b=YeGFC5QshnnHbvJ2FDfp1K5yGNH6dacoG4IjH8/qnS64Ijmkz/KHkvLx695FSR4F8D1ySo wnFFHYDAGgKrbGAA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379734; 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=x28HrpXT1wnu8AamGxa1QFMQPm/6ngVLgyMcys55szM=; b=WMzkZf9hjnKF+I9YS80vMbQ4AS2ii6y3yK26YbBj679kviCmpTdFfPnRtJhvwNJjDc/gPU sm3k1bHKrLbIYjWuLaMcE4/s5hUVAG98jpXmbhWCuPwbIrSjwiJoJiBG2rPgj/+Ect/yu4 TXxvEEQ3rMgEOylsathU7akvmaNEzyyTQvpBQvU0P1depfb+A/rGjWxFWNarD/1S52HLWb 7220CBhg3ISmajy6cr3JVVDB39QUiWmwl/NxitH+6VljDHuJ97fva4E6RccrZnGw/kHPT2 v27hTb2i/B6BOozr+v35iWgGbt0ldiBE26ABY+VNgesQBG4uWnTtHDRhfbaYHLHP38U7Xy DrLghsGubas+oi6keEr+ygL8nBvKutSM1hkpMEE0Caudv++gEEMv6R7O47T0+eI2FuZfWd Jbzjw3FvWZBly59PDDsFqvM47oCEv6rEeh92FIyD5gK4lEv9HqjQNUl6gUpqS6Y1WMEhuA b4+/bNNno1aCR0T7np5oOdvkbIccYYbshf7CT2eJhsuja7ni2BJ78N4VKwM308F+I6uKww quiRTkOVplpUl2zUo47kIEqo18w2FdK/APzJKLwNOB6NAYiouOLSSIjtTE7+7BOQurmsNA vrFfiyMqPETp0we1MEygWVlfCHPEdvHc96MWfTvg9Yc2UqzBo103k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379734; 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=x28HrpXT1wnu8AamGxa1QFMQPm/6ngVLgyMcys55szM=; b=TgbnOwf02s1cxrBiKhs+kLjBMtdrF7EjeVyQr760fIoAE2c2xaAduF4O0XP9dgq/iNWX0N NhU1w65/DqAKAUDg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:47 +0000 Message-Id: <20201207221956.667322-15-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 14/23] doc: document alpm_list 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_list.c | 251 --------------------------------- lib/libalpm/alpm_list.h | 299 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 295 insertions(+), 255 deletions(-) diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index fe0c2906..2ecc8e0b 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -32,23 +32,8 @@ #define SYMEXPORT __attribute__((visibility("default"))) #define SYMHIDDEN __attribute__((visibility("internal"))) -/** - * @addtogroup alpm_list List Functions - * @brief Functions to manipulate alpm_list_t lists. - * - * These functions are designed to create, destroy, and modify lists of - * type alpm_list_t. This is an internal list type used by libalpm that is - * publicly exposed for use by frontends if desired. - * - * @{ */ - /* Allocation */ -/** - * @brief Free a list, but not the contained data. - * - * @param list the list to free - */ void SYMEXPORT alpm_list_free(alpm_list_t *list) { alpm_list_t *it = list; @@ -60,12 +45,6 @@ void SYMEXPORT alpm_list_free(alpm_list_t *list) } } -/** - * @brief Free the internal data of a list structure. - * - * @param list the list to free - * @param fn a free function for the internal data - */ void SYMEXPORT alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn) { alpm_list_t *it = list; @@ -83,28 +62,12 @@ void SYMEXPORT alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn) /* Mutators */ -/** - * @brief Add a new item to the end of the list. - * - * @param list the list to add to - * @param data the new item to be added to the list - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_add(alpm_list_t *list, void *data) { alpm_list_append(&list, data); return list; } -/** - * @brief Add a new item to the end of the list. - * - * @param list the list to add to - * @param data the new item to be added to the list - * - * @return the newly added item - */ alpm_list_t SYMEXPORT *alpm_list_append(alpm_list_t **list, void *data) { alpm_list_t *ptr; @@ -131,14 +94,6 @@ alpm_list_t SYMEXPORT *alpm_list_append(alpm_list_t **list, void *data) return ptr; } -/** - * @brief Duplicate and append a string to a list. - * - * @param list the list to append to - * @param data the string to duplicate and append - * - * @return the newly added item - */ alpm_list_t SYMEXPORT *alpm_list_append_strdup(alpm_list_t **list, const char *data) { alpm_list_t *ret; @@ -151,15 +106,6 @@ alpm_list_t SYMEXPORT *alpm_list_append_strdup(alpm_list_t **list, const char *d } } -/** - * @brief Add items to a list in sorted order. - * - * @param list the list to add to - * @param data the new item to be added to the list - * @param fn the comparison function to use to determine order - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn) { if(!fn || !list) { @@ -202,17 +148,6 @@ alpm_list_t SYMEXPORT *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_ } } -/** - * @brief Join two lists. - * The two lists must be independent. Do not free the original lists after - * calling this function, as this is not a copy operation. The list pointers - * passed in should be considered invalid after calling this function. - * - * @param first the first list - * @param second the second list - * - * @return the resultant joined list - */ alpm_list_t SYMEXPORT *alpm_list_join(alpm_list_t *first, alpm_list_t *second) { alpm_list_t *tmp; @@ -235,15 +170,6 @@ alpm_list_t SYMEXPORT *alpm_list_join(alpm_list_t *first, alpm_list_t *second) return first; } -/** - * @brief Merge the two sorted sublists into one sorted list. - * - * @param left the first list - * @param right the second list - * @param fn comparison function for determining merge order - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn) { @@ -305,15 +231,6 @@ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, return newlist; } -/** - * @brief Sort a list of size `n` using mergesort algorithm. - * - * @param list the list to sort - * @param n the size of the list - * @param fn the comparison function for determining order - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, size_t n, alpm_list_fn_cmp fn) { @@ -339,15 +256,6 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, size_t n, return list; } -/** - * @brief Remove an item from the list. - * item is not freed; this is the responsibility of the caller. - * - * @param haystack the list to remove the item from - * @param item the item to remove from the list - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_remove_item(alpm_list_t *haystack, alpm_list_t *item) { @@ -385,17 +293,6 @@ alpm_list_t SYMEXPORT *alpm_list_remove_item(alpm_list_t *haystack, return haystack; } - -/** - * @brief Remove an item from the list. - * - * @param haystack the list to remove the item from - * @param needle the data member of the item we're removing - * @param fn the comparison function for searching - * @param data output parameter containing data of the removed item - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data) { @@ -430,15 +327,6 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, return haystack; } -/** - * @brief Remove a string from a list. - * - * @param haystack the list to remove the item from - * @param needle the data member of the item we're removing - * @param data output parameter containing data of the removed item - * - * @return the resultant list - */ alpm_list_t SYMEXPORT *alpm_list_remove_str(alpm_list_t *haystack, const char *needle, char **data) { @@ -446,15 +334,6 @@ alpm_list_t SYMEXPORT *alpm_list_remove_str(alpm_list_t *haystack, (alpm_list_fn_cmp)strcmp, (void **)data); } -/** - * @brief Create a new list without any duplicates. - * - * This does NOT copy data members. - * - * @param list the list to copy - * - * @return a new list containing non-duplicate items - */ alpm_list_t SYMEXPORT *alpm_list_remove_dupes(const alpm_list_t *list) { const alpm_list_t *lp = list; @@ -471,13 +350,6 @@ alpm_list_t SYMEXPORT *alpm_list_remove_dupes(const alpm_list_t *list) return newlist; } -/** - * @brief Copy a string list, including data. - * - * @param list the list to copy - * - * @return a copy of the original list - */ alpm_list_t SYMEXPORT *alpm_list_strdup(const alpm_list_t *list) { const alpm_list_t *lp = list; @@ -492,13 +364,6 @@ alpm_list_t SYMEXPORT *alpm_list_strdup(const alpm_list_t *list) return newlist; } -/** - * @brief Copy a list, without copying data. - * - * @param list the list to copy - * - * @return a copy of the original list - */ alpm_list_t SYMEXPORT *alpm_list_copy(const alpm_list_t *list) { const alpm_list_t *lp = list; @@ -513,16 +378,6 @@ alpm_list_t SYMEXPORT *alpm_list_copy(const alpm_list_t *list) return newlist; } -/** - * @brief Copy a list and copy the data. - * Note that the data elements to be copied should not contain pointers - * and should also be of constant size. - * - * @param list the list to copy - * @param size the size of each data element - * - * @return a copy of the original list, data copied as well - */ alpm_list_t SYMEXPORT *alpm_list_copy_data(const alpm_list_t *list, size_t size) { @@ -546,13 +401,6 @@ alpm_list_t SYMEXPORT *alpm_list_copy_data(const alpm_list_t *list, return newlist; } -/** - * @brief Create a new list in reverse order. - * - * @param list the list to copy - * - * @return a new list in reverse order - */ alpm_list_t SYMEXPORT *alpm_list_reverse(alpm_list_t *list) { const alpm_list_t *lp; @@ -580,14 +428,6 @@ alpm_list_t SYMEXPORT *alpm_list_reverse(alpm_list_t *list) /* Accessors */ -/** - * @brief Return nth element from list (starting from 0). - * - * @param list the list - * @param n the index of the item to find (n < alpm_list_count(list) IS needed) - * - * @return an alpm_list_t node for index `n` - */ alpm_list_t SYMEXPORT *alpm_list_nth(const alpm_list_t *list, size_t n) { const alpm_list_t *i = list; @@ -597,13 +437,6 @@ alpm_list_t SYMEXPORT *alpm_list_nth(const alpm_list_t *list, size_t n) return (alpm_list_t *)i; } -/** - * @brief Get the next element of a list. - * - * @param node the list node - * - * @return the next element, or NULL when no more elements exist - */ inline alpm_list_t SYMEXPORT *alpm_list_next(const alpm_list_t *node) { if(node) { @@ -613,13 +446,6 @@ inline alpm_list_t SYMEXPORT *alpm_list_next(const alpm_list_t *node) } } -/** - * @brief Get the previous element of a list. - * - * @param list the list head - * - * @return the previous element, or NULL when no previous element exist - */ inline alpm_list_t SYMEXPORT *alpm_list_previous(const alpm_list_t *list) { if(list && list->prev->next) { @@ -629,13 +455,6 @@ inline alpm_list_t SYMEXPORT *alpm_list_previous(const alpm_list_t *list) } } -/** - * @brief Get the last item in the list. - * - * @param list the list - * - * @return the last element in the list - */ alpm_list_t SYMEXPORT *alpm_list_last(const alpm_list_t *list) { if(list) { @@ -647,13 +466,6 @@ alpm_list_t SYMEXPORT *alpm_list_last(const alpm_list_t *list) /* Misc */ -/** - * @brief Get the number of items in a list. - * - * @param list the list - * - * @return the number of list items - */ size_t SYMEXPORT alpm_list_count(const alpm_list_t *list) { size_t i = 0; @@ -665,15 +477,6 @@ size_t SYMEXPORT alpm_list_count(const alpm_list_t *list) return i; } -/** - * @brief Find an item in a list. - * - * @param needle the item to search - * @param haystack the list - * @param fn the comparison function for searching (!= NULL) - * - * @return `needle` if found, NULL otherwise - */ void SYMEXPORT *alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn) { @@ -693,30 +496,12 @@ static int ptr_cmp(const void *p, const void *q) return (p != q); } -/** - * @brief Find an item in a list. - * - * Search for the item whose data matches that of the `needle`. - * - * @param needle the data to search for (== comparison) - * @param haystack the list - * - * @return `needle` if found, NULL otherwise - */ void SYMEXPORT *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle) { return alpm_list_find(haystack, needle, ptr_cmp); } -/** - * @brief Find a string in a list. - * - * @param needle the string to search for - * @param haystack the list - * - * @return `needle` if found, NULL otherwise - */ char SYMEXPORT *alpm_list_find_str(const alpm_list_t *haystack, const char *needle) { @@ -724,20 +509,6 @@ char SYMEXPORT *alpm_list_find_str(const alpm_list_t *haystack, (alpm_list_fn_cmp)strcmp); } -/** - * @brief Find the differences between list `left` and list `right` - * - * The two lists must be sorted. Items only in list `left` are added to the - * `onlyleft` list. Items only in list `right` are added to the `onlyright` - * list. - * - * @param left the first list - * @param right the second list - * @param fn the comparison function - * @param onlyleft pointer to the first result list - * @param onlyright pointer to the second result list - * - */ void SYMEXPORT alpm_list_diff_sorted(const alpm_list_t *left, const alpm_list_t *right, alpm_list_fn_cmp fn, alpm_list_t **onlyleft, alpm_list_t **onlyright) @@ -782,15 +553,6 @@ void SYMEXPORT alpm_list_diff_sorted(const alpm_list_t *left, } -/** - * @brief Find the items in list `lhs` that are not present in list `rhs`. - * - * @param lhs the first list - * @param rhs the second list - * @param fn the comparison function - * - * @return a list containing all items in `lhs` not present in `rhs` - */ alpm_list_t SYMEXPORT *alpm_list_diff(const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn) { @@ -809,17 +571,6 @@ alpm_list_t SYMEXPORT *alpm_list_diff(const alpm_list_t *lhs, return ret; } -/** - * @brief Copy a list and data into a standard C array of fixed length. - * Note that the data elements are shallow copied so any contained pointers - * will point to the original data. - * - * @param list the list to copy - * @param n the size of the list - * @param size the size of each data element - * - * @return an array version of the original list, data copied as well - */ void SYMEXPORT *alpm_list_to_array(const alpm_list_t *list, size_t n, size_t size) { @@ -840,5 +591,3 @@ void SYMEXPORT *alpm_list_to_array(const alpm_list_t *list, size_t n, } return array; } - -/** @} */ diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index 38094c7b..1eac3043 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -17,6 +17,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + + +/** + * @file alpm_list.h + * @author Pacman Development Team + * @date 7 Dec 2020 + * @brief A doubly linked list for use with libalpm + */ + #ifndef ALPM_LIST_H #define ALPM_LIST_H @@ -31,12 +40,20 @@ extern "C" { #endif /** - * @brief Linked list type used by libalpm. + * @addtogroup alpm_list List Functions + * @brief Functions to manipulate alpm_list_t lists. + * + * These functions are designed to create, destroy, and modify lists of + * type alpm_list_t. This is an internal list type used by libalpm that is + * publicly exposed for use by frontends if desired. * * It is exposed so front ends can use it to prevent the need to reimplement * lists of their own; however, it is not required that the front end uses * it. + * @{ */ + +/** A doubly linked list */ typedef struct __alpm_list_t { /** data held by the list node */ void *data; @@ -46,48 +63,322 @@ typedef struct __alpm_list_t { struct __alpm_list_t *next; } alpm_list_t; +/** Frees a list and its contents */ #define FREELIST(p) do { alpm_list_free_inner(p, free); alpm_list_free(p); p = NULL; } while(0) -typedef void (*alpm_list_fn_free)(void *); /* item deallocation callback */ -typedef int (*alpm_list_fn_cmp)(const void *, const void *); /* item comparison callback */ +/** item deallocation callback. + * @param the item to free + */ +typedef void (*alpm_list_fn_free)(void * item); + +/** item comparison callback */ +typedef int (*alpm_list_fn_cmp)(const void *, const void *); /* allocation */ + +/** Free a list, but not the contained data. + * + * @param list the list to free + */ void alpm_list_free(alpm_list_t *list); + +/** Free the internal data of a list structure but not the list itself. + * + * @param list the list to free + * @param fn a free function for the internal data + */ void alpm_list_free_inner(alpm_list_t *list, alpm_list_fn_free fn); /* item mutators */ + +/** Add a new item to the end of the list. + * + * @param list the list to add to + * @param data the new item to be added to the list + * + * @return the resultant list + */ alpm_list_t *alpm_list_add(alpm_list_t *list, void *data); + +/** + * @brief Add a new item to the end of the list. + * + * @param list the list to add to + * @param data the new item to be added to the list + * + * @return the newly added item + */ alpm_list_t *alpm_list_append(alpm_list_t **list, void *data); + +/** + * @brief Duplicate and append a string to a list. + * + * @param list the list to append to + * @param data the string to duplicate and append + * + * @return the newly added item + */ alpm_list_t *alpm_list_append_strdup(alpm_list_t **list, const char *data); + +/** + * @brief Add items to a list in sorted order. + * + * @param list the list to add to + * @param data the new item to be added to the list + * @param fn the comparison function to use to determine order + * + * @return the resultant list + */ alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn); + +/** + * @brief Join two lists. + * The two lists must be independent. Do not free the original lists after + * calling this function, as this is not a copy operation. The list pointers + * passed in should be considered invalid after calling this function. + * + * @param first the first list + * @param second the second list + * + * @return the resultant joined list + */ alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second); + +/** + * @brief Merge the two sorted sublists into one sorted list. + * + * @param left the first list + * @param right the second list + * @param fn comparison function for determining merge order + * + * @return the resultant list + */ alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn); + +/** + * @brief Sort a list of size `n` using mergesort algorithm. + * + * @param list the list to sort + * @param n the size of the list + * @param fn the comparison function for determining order + * + * @return the resultant list + */ alpm_list_t *alpm_list_msort(alpm_list_t *list, size_t n, alpm_list_fn_cmp fn); + +/** + * @brief Remove an item from the list. + * item is not freed; this is the responsibility of the caller. + * + * @param haystack the list to remove the item from + * @param item the item to remove from the list + * + * @return the resultant list + */ alpm_list_t *alpm_list_remove_item(alpm_list_t *haystack, alpm_list_t *item); + +/** + * @brief Remove an item from the list. + * + * @param haystack the list to remove the item from + * @param needle the data member of the item we're removing + * @param fn the comparison function for searching + * @param data output parameter containing data of the removed item + * + * @return the resultant list + */ alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data); + +/** + * @brief Remove a string from a list. + * + * @param haystack the list to remove the item from + * @param needle the data member of the item we're removing + * @param data output parameter containing data of the removed item + * + * @return the resultant list + */ alpm_list_t *alpm_list_remove_str(alpm_list_t *haystack, const char *needle, char **data); + +/** + * @brief Create a new list without any duplicates. + * + * This does NOT copy data members. + * + * @param list the list to copy + * + * @return a new list containing non-duplicate items + */ alpm_list_t *alpm_list_remove_dupes(const alpm_list_t *list); + +/** + * @brief Copy a string list, including data. + * + * @param list the list to copy + * + * @return a copy of the original list + */ alpm_list_t *alpm_list_strdup(const alpm_list_t *list); + +/** + * @brief Copy a list, without copying data. + * + * @param list the list to copy + * + * @return a copy of the original list + */ alpm_list_t *alpm_list_copy(const alpm_list_t *list); + +/** + * @brief Copy a list and copy the data. + * Note that the data elements to be copied should not contain pointers + * and should also be of constant size. + * + * @param list the list to copy + * @param size the size of each data element + * + * @return a copy of the original list, data copied as well + */ alpm_list_t *alpm_list_copy_data(const alpm_list_t *list, size_t size); + +/** + * @brief Create a new list in reverse order. + * + * @param list the list to copy + * + * @return a new list in reverse order + */ alpm_list_t *alpm_list_reverse(alpm_list_t *list); /* item accessors */ + + +/** + * @brief Return nth element from list (starting from 0). + * + * @param list the list + * @param n the index of the item to find (n < alpm_list_count(list) IS needed) + * + * @return an alpm_list_t node for index `n` + */ alpm_list_t *alpm_list_nth(const alpm_list_t *list, size_t n); + +/** + * @brief Get the next element of a list. + * + * @param list the list node + * + * @return the next element, or NULL when no more elements exist + */ alpm_list_t *alpm_list_next(const alpm_list_t *list); + +/** + * @brief Get the previous element of a list. + * + * @param list the list head + * + * @return the previous element, or NULL when no previous element exist + */ alpm_list_t *alpm_list_previous(const alpm_list_t *list); + +/** + * @brief Get the last item in the list. + * + * @param list the list + * + * @return the last element in the list + */ alpm_list_t *alpm_list_last(const alpm_list_t *list); /* misc */ + +/** + * @brief Get the number of items in a list. + * + * @param list the list + * + * @return the number of list items + */ size_t alpm_list_count(const alpm_list_t *list); + +/** + * @brief Find an item in a list. + * + * @param needle the item to search + * @param haystack the list + * @param fn the comparison function for searching (!= NULL) + * + * @return `needle` if found, NULL otherwise + */ void *alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn); + +/** + * @brief Find an item in a list. + * + * Search for the item whose data matches that of the `needle`. + * + * @param needle the data to search for (== comparison) + * @param haystack the list + * + * @return `needle` if found, NULL otherwise + */ void *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle); + +/** + * @brief Find a string in a list. + * + * @param needle the string to search for + * @param haystack the list + * + * @return `needle` if found, NULL otherwise + */ char *alpm_list_find_str(const alpm_list_t *haystack, const char *needle); -alpm_list_t *alpm_list_diff(const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn); + +/** + * @brief Find the differences between list `left` and list `right` + * + * The two lists must be sorted. Items only in list `left` are added to the + * `onlyleft` list. Items only in list `right` are added to the `onlyright` + * list. + * + * @param left the first list + * @param right the second list + * @param fn the comparison function + * @param onlyleft pointer to the first result list + * @param onlyright pointer to the second result list + * + */ void alpm_list_diff_sorted(const alpm_list_t *left, const alpm_list_t *right, alpm_list_fn_cmp fn, alpm_list_t **onlyleft, alpm_list_t **onlyright); + +/** + * @brief Find the items in list `lhs` that are not present in list `rhs`. + * + * @param lhs the first list + * @param rhs the second list + * @param fn the comparison function + * + * @return a list containing all items in `lhs` not present in `rhs` + */ + +alpm_list_t *alpm_list_diff(const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn); + +/** + * @brief Copy a list and data into a standard C array of fixed length. + * Note that the data elements are shallow copied so any contained pointers + * will point to the original data. + * + * @param list the list to copy + * @param n the size of the list + * @param size the size of each data element + * + * @return an array version of the original list, data copied as well + */ void *alpm_list_to_array(const alpm_list_t *list, size_t n, size_t size); +/* End of alpm_list */ +/** @} */ + #ifdef __cplusplus } #endif From patchwork Mon Dec 7 22:19:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1830 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 37F2C1C9990E5 for ; Mon, 7 Dec 2020 23:16:40 +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 23:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379742; bh=oZzvAvSGPkdmL0ARUmLW5Pksmis3nYonFeIX7u/dXBc=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=efQw+TsK/B/DIrVBc9njoc1lDUNGSHL2xjFzTxeBFyVNVAgTwopIG5lcJCqfyBUyg mLk1r5sUr2Q4GYTaNBeqseLzCWE9cn+dXCYCY0vgO908oWWmWl+Fq6SBYNftde6XjJ gJZRE4YiHwSy6GN0d7+1Fz+F0Dxwkwg0KmAIDWgHFMYaeGbSbwPViDbS/a/gKt+hRc 9dYUWOvJOFsIeTUcXWtcJessVqy0dQbC+6IVmObp0/gl6Tm9bBDQ/Ad9zQUtfyvblB ypzgz/MiTGRvWWPaySYqVfqHNMxbNWs6+BRffLgYKU/RXPqjAyC27YczeFjZrErEPh Pq+azr8TEe6GSXRVp6rcfzAY89vm+ecexJ7Pcja7W3AhDxLvha4OjwheCZ6+/Ku+mm MUIDsRzuTJG9aMvE8gYjXYpY7VZBPJh3I/JrnrMzY+N2412OzDgHIshX7fRIxCLp7L vZVglEebjTqaHzpEwTxdw3ZIe5Akh9FA0qIXhe8kuq1BDM5V6OBtwsKrXE2Di3IsUQ rgiz56sMPj/ZhHChVxOP4/i7X6VomzmYlLXqKKBppdjNry/6lLnaBRZwZaZPwacg8h o352hOTM9ISE5ioh1TnWIPZKbRndkXhwyOpNqXYYtR/7iUa8/1ut0Nn/BtFAvBZLD/ nPS/L1Cp3uzg7Kz5ULV0lo9Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382988; 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=AKHTeN09UCCptXAPzKjFeW2fPdWxpt2eLwB7oS1w4KE=; b=vMfSFcOLugvGxzswAtIOrH86FgQabzfSy26gZ7rPtr8H32tMz6DBz8UrbDfETRAu3dDkOW HnAmE2M/rDwwsLwwVXDU/AhUh6+PrvxJLVnFbSZINLBT8JQhZr7TrHyp/h20UUfNANDg4D sEUr8NAgsBHKoj8Cjpq38XQeJbBazbnYDlHnDXtbbZyx4fM80l5wWwnG5Bnd/ZVr1aiQdS YYVPJmtI9xZXV0ZBO9nQgXZdKaI5OzBrwvu0nrlVh+tmKkqAuPtZh77ludKP6xYuwhvq30 3hGrUVSb3Er4Zvl+lBIMkpvkzhAnmBOp55HpdYoinP/TmzIXs36ewvmL8wNR4N5GmoUrss Z8cyjVusQVV2IYUKHUQk6Pa6Qj19ZQ+bjexLwBbKHo3MXCmJRIWmq2L23XF+DRvD/eOToT 5ZD9Ti2Y6LEEbpHd38F+JFH17vuzueC3hE65Dor86Jryf+kygk6hyWvoCDsYc9abnPLquE dYRTMSp1NfHLuxYRg2ZLujhJDiq1icqIf2z1JrERbCCStQrCIMFxnACxtNkIx3cbQYCdDn /JuSh92Rk4oJmAqYXXi+CM0HxR6BEjxdE+8Ypd4WhDkcb9jA+NUd9M5/sRgGGZj9e8MvWg CTg2JZRVB9YtDIh6RaxVMMh4Z5NjXPxhZW8HwEcOMeScv2rPnTF6U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382988; 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=AKHTeN09UCCptXAPzKjFeW2fPdWxpt2eLwB7oS1w4KE=; b=HHmEBkTdvEgzF4aRGSsCEy0cT3MEfkq0CrkK5Io9iGapVTiGrIgpUbroM9+Qju4E042HoT QoMSKXoMQuQI9CAA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379735; 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=AKHTeN09UCCptXAPzKjFeW2fPdWxpt2eLwB7oS1w4KE=; b=gk1TJYzYpUmnw1wCoUpnXXGW+xDnaJoM6P1Cpdnys70ThW0T5GXI81Kw4wRLotACep0CXE nuBJakhSbrKTScdb20nQlX0DGpMb8tPQxbqouUHNQj8s511GaDB/toBCrzksFUjneGW8Wc QG01S0WYkDwj6TvH8leDoj7bLb5BSsakwDBwogZMvHaun7ekrwdbJVgoZg0sC5FLWHpzkm xxbatzyCY9jDz1N7MIkUBjklNTKihGmdycs0KSKBFoia3tjp1S6t+wDHMSn+V1k4BwFm4Z xSbUjq/mEpsV2trGnIo4V0ggycG8t1KeTjJ6JwC8kZxmnf9WHwmOKZCdg9FAYbxHLkrlbG z/5ujPPgBKouE1M/HtLz9yIfCvmr4FQZHjTd0qw1kj5LSenbKTPdlKC3htS+3EItAtOdNR d9UE1jlamtdacMnYagK/mR1UJlBRg5xFbKnCjiHI5fwO7/xGgMGhbLCtkEzknQmPKxVlQZ K+wVLH0nlAtvI0cB/odwlB8lrENCH3uFgNC6wx+7fP1d5YmpLSnyyqF54QXzMH/xHL9b8v t/Ikq+1L7j2wNYjs3i8xpKEGIGgDxGbbRaU0myVZTRzKYxI7wR/N6z3qI3SWsycV/+UonZ 9BCdH4UUdh+W5Zs14iypXtU9BbV+krsaagfL6LNlpTYKoL/uwx6jQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379735; 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=AKHTeN09UCCptXAPzKjFeW2fPdWxpt2eLwB7oS1w4KE=; b=Ed4YUR1Udra783Jlnl68dSV2k5j51KH8fSPaNyj448NeItcRyjnBvHFNjy9Nnul5S5HObv CyRZBdAhsWobTVAQ== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:48 +0000 Message-Id: <20201207221956.667322-16-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 15/23] doc: document options 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 | 592 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 564 insertions(+), 28 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 494a8319..05dec6c7 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1453,186 +1453,722 @@ int alpm_logaction(alpm_handle_t *handle, const char *prefix, /** @} */ -/** @addtogroup alpm_api_options Options +/** @addtogroup alpm_options Options * Libalpm option getters and setters * @{ */ -/** Returns the callback used for logging. */ +/** @name Accessors for callbacks + * @{ + */ + +/** Returns the callback used for logging. + * @param handle the context handle + * @return the currently set log callback + */ alpm_cb_log alpm_option_get_logcb(alpm_handle_t *handle); -/** Sets the callback used for logging. */ + +/** Sets the callback used for logging. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb); -/** Returns the callback used to report download progress. */ +/** Returns the callback used to report download progress. + * @param handle the context handle + * @return the currently set download callback + */ alpm_cb_download alpm_option_get_dlcb(alpm_handle_t *handle); -/** Sets the callback used to report download progress. */ + +/** Sets the callback used to report download progress. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_dlcb(alpm_handle_t *handle, alpm_cb_download cb); -/** Returns the downloading callback. */ +/** Returns the downloading callback. + * @param handle the context handle + * @return the currently set fetch callback + */ alpm_cb_fetch alpm_option_get_fetchcb(alpm_handle_t *handle); -/** Sets the downloading callback. */ + +/** Sets the downloading callback. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_fetchcb(alpm_handle_t *handle, alpm_cb_fetch cb); -/** Returns the callback used to report total download size. */ +/** Returns the callback used to report total download size. + * @param handle the context handle + * @return the currently set total download callback + */ alpm_cb_totaldl alpm_option_get_totaldlcb(alpm_handle_t *handle); -/** Sets the callback used to report total download size. */ + +/** Sets the callback used to report total download size. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl cb); -/** Returns the callback used for events. */ + +/** Returns the callback used for events. + * @param handle the context handle + * @return the currently set event callback + */ alpm_cb_event alpm_option_get_eventcb(alpm_handle_t *handle); -/** Sets the callback used for events. */ + +/** Sets the callback used for events. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_eventcb(alpm_handle_t *handle, alpm_cb_event cb); -/** Returns the callback used for questions. */ +/** Returns the callback used for questions. + * @param handle the context handle + * @return the currently set question callback + */ alpm_cb_question alpm_option_get_questioncb(alpm_handle_t *handle); -/** Sets the callback used for questions. */ + +/** Sets the callback used for questions. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_questioncb(alpm_handle_t *handle, alpm_cb_question cb); -/** Returns the callback used for operation progress. */ + +/**Returns the callback used for operation progress. + * @param handle the context handle + * @return the currently set progress callback + */ alpm_cb_progress alpm_option_get_progresscb(alpm_handle_t *handle); -/** Sets the callback used for operation progress. */ + +/** Sets the callback used for operation progress. + * @param handle the context handle + * @param cb the cb to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress cb); +/* End of callback accessors */ +/** @} */ + + +/** @name Accessors to the root directory + * + * The root directory is the prefix to which libalpm installs packages to. + * Hooks and scriptlets will also be run in a chroot to ensure they behave correctly + * in alternative roots. + * @{ + */ -/** Returns the root of the destination filesystem. Read-only. */ +/** Returns the root path. Read-only. + * @param handle the context handle + */ const char *alpm_option_get_root(alpm_handle_t *handle); +/* End of root accessors */ +/** @} */ + + +/** @name Accessors to the database path + * + * The dbpath is where libalpm stores the local db and + * downloads sync databases. + * @{ + */ -/** Returns the path to the database directory. Read-only. */ +/** Returns the path to the database directory. Read-only. + * @param handle the context handle + */ const char *alpm_option_get_dbpath(alpm_handle_t *handle); +/* End of dbpath accessors */ +/** @} */ + + +/** @name Accessors to the lockfile + * + * The lockfile is used to ensure two instances of libalpm can not write + * to the database at the same time. The lock file is created when + * committing a transaction and released when the transaction completes. + * Or when calling \link alpm_unlock \endlink. + * @{ + */ -/** Get the name of the database lock file. Read-only. */ +/** Get the name of the database lock file. Read-only. + * This is the name that the lockfile would have. It does not + * matter if the lockfile actually exists on disk. + * @param handle the context handle + */ const char *alpm_option_get_lockfile(alpm_handle_t *handle); +/* End of lockfile accessors */ +/** @} */ /** @name Accessors to the list of package cache directories. + * + * This is where libalpm will store downloaded packages. * @{ */ + +/** Gets the currently configured cachedirs, + * @param handle the context handle + * @return a char* list of cache directories + */ alpm_list_t *alpm_option_get_cachedirs(alpm_handle_t *handle); + +/** Sets the cachedirs. + * @param handle the context handle + * @param cachedirs a char* list of cachdirs. The list will be duped and + * the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_cachedirs(alpm_handle_t *handle, alpm_list_t *cachedirs); + +/** Append a cachedir to the configured cachedirs. + * @param handle the context handle + * @param cachedir the cachedir to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_cachedir(alpm_handle_t *handle, const char *cachedir); + +/** Remove a cachedir from the configured cachedirs. + * @param handle the context handle + * @param cachedir the cachedir to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_cachedir(alpm_handle_t *handle, const char *cachedir); +/* End of cachedir accessors */ /** @} */ + /** @name Accessors to the list of package hook directories. + * + * libalpm will search these directories for hooks to run. A hook in + * a later directory will override previous hooks if they have the same name. * @{ */ + +/** Gets the currently configured hookdirs, + * @param handle the context handle + * @return a char* list of hook directories + */ alpm_list_t *alpm_option_get_hookdirs(alpm_handle_t *handle); + +/** Sets the hookdirs. + * @param handle the context handle + * @param hookdirs a char* list of hookdirs. The list will be duped and + * the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_hookdirs(alpm_handle_t *handle, alpm_list_t *hookdirs); + +/** Append a hookdir to the configured hookdirs. + * @param handle the context handle + * @param hookdir the hookdir to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_hookdir(alpm_handle_t *handle, const char *hookdir); + +/** Remove a hookdir from the configured hookdirs. + * @param handle the context handle + * @param hookdir the hookdir to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_hookdir(alpm_handle_t *handle, const char *hookdir); +/* End of hookdir accessors */ /** @} */ + +/** @name Accessors to the list of overwritable files. + * + * Normally libalpm will refuse to install a package that owns files that + * are already on disk and not owned by that package. + * + * If a conflicting file matches a glob in the overwrite_files list, then no + * conflict will be raised and libalpm will simply overwrite the file. + * @{ + */ + +/** Gets the currently configured overwritable files, + * @param handle the context handle + * @return a char* list of overwritable file globs + */ alpm_list_t *alpm_option_get_overwrite_files(alpm_handle_t *handle); + +/** Sets the overwritable files. + * @param handle the context handle + * @param globs a char* list of overwritable file globs. The list will be duped and + * the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_overwrite_files(alpm_handle_t *handle, alpm_list_t *globs); + +/** Append an overwritable file to the configured overwritable files. + * @param handle the context handle + * @param glob the file glob to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_overwrite_file(alpm_handle_t *handle, const char *glob); + +/** Remove a file glob from the configured overwritable files globs. + * @note The overwritable file list contains a list of globs. The glob to + * remove must exactly match the entry to remove. There is no glob expansion. + * @param handle the context handle + * @param glob the file glob to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_overwrite_file(alpm_handle_t *handle, const char *glob); +/* End of overwrite accessors */ +/** @} */ + -/** Returns the logfile name. */ +/** @name Accessors to the log file + * + * This controls where libalpm will save log output to. + * @{ + */ + +/** Gets the filepath to the currently set logfile. + * @param handle the context handle + * @return the path to the logfile + */ const char *alpm_option_get_logfile(alpm_handle_t *handle); -/** Sets the logfile name. */ + +/** Sets the logfile path. + * @param handle the context handle + * @param logfile path to the new location of the logfile + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_logfile(alpm_handle_t *handle, const char *logfile); +/* End of logfile accessors */ +/** @} */ + + +/** @name Accessors to the GPG directory + * + * This controls where libalpm will store GnuPG's files. + * @{ + */ -/** Returns the path to libalpm's GnuPG home directory. */ +/** Returns the path to libalpm's GnuPG home directory. + * @param handle the context handle + * @return the path to libalpms's GnuPG home directory + */ const char *alpm_option_get_gpgdir(alpm_handle_t *handle); -/** Sets the path to libalpm's GnuPG home directory. */ + +/** Sets the path to libalpm's GnuPG home directory. + * @param handle the context handle + * @param gpgdir the gpgdir to set + */ int alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir); +/* End of gpdir accessors */ +/** @} */ + -/** Returns whether to use syslog (0 is FALSE, TRUE otherwise). */ +/** @name Accessors for use syslog + * + * This controls whether libalpm will also use the syslog. Even if this option + * is enabled, libalpm will still try to log to its log file. + * @{ + */ + +/** Returns whether to use syslog (0 is FALSE, TRUE otherwise). + * @param handle the context handle + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_get_usesyslog(alpm_handle_t *handle); -/** Sets whether to use syslog (0 is FALSE, TRUE otherwise). */ + +/** Sets whether to use syslog (0 is FALSE, TRUE otherwise). + * @param handle the context handle + * @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise) + */ int alpm_option_set_usesyslog(alpm_handle_t *handle, int usesyslog); +/* End of usesyslog accessors */ +/** @} */ + /** @name Accessors to the list of no-upgrade files. * These functions modify the list of files which should * not be updated by package installation. * @{ */ + +/** Get the list of no-upgrade files + * @param handle the context handle + * @return the char* list of no-upgrade files + */ alpm_list_t *alpm_option_get_noupgrades(alpm_handle_t *handle); + +/** Add a file to the no-upgrade list + * @param handle the context handle + * @param path the path to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_noupgrade(alpm_handle_t *handle, const char *path); + +/** Sets the list of no-upgrade files + * @param handle the context handle + * @param noupgrade a char* list of file to not upgrade. + * The list will be duped and the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_noupgrades(alpm_handle_t *handle, alpm_list_t *noupgrade); + +/** Remove an entry from the no-upgrade list + * @param handle the context handle + * @param path the path to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *path); + +/** Test if a path matches any of the globs in the no-upgrade list + * @param handle the context handle + * @param path the path to test + * @return 0 is the path matches a glob, negative if there is no match and + * positive is the match was inverted + */ int alpm_option_match_noupgrade(alpm_handle_t *handle, const char *path); +/* End of noupgrade accessors */ /** @} */ + /** @name Accessors to the list of no-extract files. * These functions modify the list of filenames which should * be skipped packages which should * not be upgraded by a sysupgrade operation. * @{ */ + +/** Get the list of no-extract files + * @param handle the context handle + * @return the char* list of no-extract files + */ alpm_list_t *alpm_option_get_noextracts(alpm_handle_t *handle); + +/** Add a file to the no-extract list + * @param handle the context handle + * @param path the path to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_noextract(alpm_handle_t *handle, const char *path); + +/** Sets the list of no-extract files + * @param handle the context handle + * @param noextract a char* list of file to not extract. + * The list will be duped and the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_noextracts(alpm_handle_t *handle, alpm_list_t *noextract); + +/** Remove an entry from the no-extract list + * @param handle the context handle + * @param path the path to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_noextract(alpm_handle_t *handle, const char *path); + +/** Test if a path matches any of the globs in the no-extract list + * @param handle the context handle + * @param path the path to test + * @return 0 is the path matches a glob, negative if there is no match and + * positive is the match was inverted + */ int alpm_option_match_noextract(alpm_handle_t *handle, const char *path); +/* End of noextract accessors */ /** @} */ + /** @name Accessors to the list of ignored packages. * These functions modify the list of packages that * should be ignored by a sysupgrade. + * + * Entries in this list may be globs and only match the package's + * name. Providers are not taken into account. * @{ */ + +/** Get the list of ignored packages + * @param handle the context handle + * @return the char* list of ignored packages + */ alpm_list_t *alpm_option_get_ignorepkgs(alpm_handle_t *handle); + +/** Add a file to the ignored package list + * @param handle the context handle + * @param pkg the package to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_ignorepkg(alpm_handle_t *handle, const char *pkg); + +/** Sets the list of packages to ignore + * @param handle the context handle + * @param ignorepkgs a char* list of packages to ignore + * The list will be duped and the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_ignorepkgs(alpm_handle_t *handle, alpm_list_t *ignorepkgs); + +/** Remove an entry from the ignorepkg list + * @param handle the context handle + * @param pkg the package to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_ignorepkg(alpm_handle_t *handle, const char *pkg); +/* End of ignorepkg accessors */ /** @} */ + /** @name Accessors to the list of ignored groups. * These functions modify the list of groups whose packages * should be ignored by a sysupgrade. + * + * Entries in this list may be globs. * @{ */ + +/** Get the list of ignored groups + * @param handle the context handle + * @return the char* list of ignored groups + */ alpm_list_t *alpm_option_get_ignoregroups(alpm_handle_t *handle); + +/** Add a file to the ignored group list + * @param handle the context handle + * @param grp the group to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_ignoregroup(alpm_handle_t *handle, const char *grp); + +/** Sets the list of groups to ignore + * @param handle the context handle + * @param ignoregrps a char* list of groups to ignore + * The list will be duped and the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_ignoregroups(alpm_handle_t *handle, alpm_list_t *ignoregrps); + +/** Remove an entry from the ignoregroup list + * @param handle the context handle + * @param grp the group to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_ignoregroup(alpm_handle_t *handle, const char *grp); +/* End of ignoregroup accessors */ /** @} */ + /** @name Accessors to the list of ignored dependencies. * These functions modify the list of dependencies that * should be ignored by a sysupgrade. + * + * This is effectivley a list of virtual providers that + * packages can use to satisfy their dependencies. * @{ */ + +/** Gets the list of dependencies that are assumed to be met + * @param handle the context handle + * @return a list of alpm_depend_t* + */ alpm_list_t *alpm_option_get_assumeinstalled(alpm_handle_t *handle); + +/** Add a depend to the assumed installed list + * @param handle the context handle + * @param dep the dependency to add + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_add_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep); + +/** Sets the list of dependnecies that are assumed to be met + * @param handle the context handle + * @param deps a list of *alpm_depend_t + * The list will be duped and the original will still need to be freed by the caller. + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_assumeinstalled(alpm_handle_t *handle, alpm_list_t *deps); + +/** Remove an entry from the assume installed list + * @param handle the context handle + * @param dep the dep to remove + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_remove_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep); +/* End of assunmeinstalled accessors */ /** @} */ -/** Returns the targeted architecture. */ + +/** @name Accessors for the configured architecture + * + * libalpm will only install packages that match the configured architecture. + * The architecture does not need to match the physical architecture. + * It can just be treated as a label. + * @{ + */ + +/** Returns the allowed package architecture. + * @param handle the context handle + * @return the configured package architecture + */ const char *alpm_option_get_arch(alpm_handle_t *handle); -/** Sets the targeted architecture. */ + +/** Sets the allowed package architecture. + * @param handle the context handle + * @param arch the architecture to set + */ int alpm_option_set_arch(alpm_handle_t *handle, const char *arch); +/* End of arch accessors */ +/** @} */ + + +/** @name Accessors for check space. + * + * This controls whether libalpm will check if there is sufficient before + * installing packages. + * @{ + */ +/** Get whether or not checking for free space before installing packages is enabled. + * @param handle the context handle + * @return 0 if disabled, 1 if enabled + */ int alpm_option_get_checkspace(alpm_handle_t *handle); + +/** Enable/disable checking free space before installing packages. + * @param handle the context handle + * @param checkspace 0 for disabled, 1 for enabled + */ int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace); +/* End of checkspace accessors */ +/** @} */ + + +/** @name Accessors for the database extension + * + * This controls the extension used for sync databases. libalpm will use this + * extension to both lookup remote databses and as the name used when opening + * reading them. + * + * This is useful for file databases. Seems as files can increase the size of + * a database by quite a lot, a server could hold a database without files under + * one extension, and another with files under another extension. + * + * Which one is downloaded and used then depends on this setting. + * @{ + */ +/** Gets the configured database extension. + * @param handle the context handle + * @return the configured database extension + */ const char *alpm_option_get_dbext(alpm_handle_t *handle); + +/** Sets the database extension. + * @param handle the context handle + * @param dbext the database extension to use + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_dbext(alpm_handle_t *handle, const char *dbext); +/* End of dbext accessors */ +/** @} */ + + +/** @name Accessors for the signature levels + * @{ + */ +/** Get the default siglevel. + * @param handle the context handle + * @return a \link alpm_siglevel_t \endlink bitfield of the siglevel + */ int alpm_option_get_default_siglevel(alpm_handle_t *handle); + +/** Set the default siglevel. + * @param handle the context handle + * @param level a \link alpm_siglevel_t \endlink bitfield of the level to set + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_default_siglevel(alpm_handle_t *handle, int level); +/** Get the configured local file siglevel. + * @param handle the context handle + * @return a \link alpm_siglevel_t \endlink bitfield of the siglevel + */ int alpm_option_get_local_file_siglevel(alpm_handle_t *handle); + +/** Set the local file siglevel. + * @param handle the context handle + * @param level a \link alpm_siglevel_t \endlink bitfield of the level to set + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_local_file_siglevel(alpm_handle_t *handle, int level); +/** Get the configured remote file siglevel. + * @param handle the context handle + * @return a \link alpm_siglevel_t \endlink bitfield of the siglevel + */ int alpm_option_get_remote_file_siglevel(alpm_handle_t *handle); + +/** Set the remote file siglevel. + * @param handle the context handle + * @param level a \link alpm_siglevel_t \endlink bitfield of the level to set + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_remote_file_siglevel(alpm_handle_t *handle, int level); +/* End of signature accessors */ +/** @} */ + +/** @name Accessors for download timeout + * + * By default, libalpm will timeout if a download has been transferring + * less than 1 byte for 10 seconds. + * @{ + */ + +/** Enables/disables the download timeout. + * @param handle the context handle + * @param disable_dl_timeout 0 for enabled, 1 for disabled + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_option_set_disable_dl_timeout(alpm_handle_t *handle, unsigned short disable_dl_timeout); +/* End of disable_dl_timeout accessors */ +/** @} */ + +/** @name Accessors for parallel downloads + * \link alpm_db_update \endlink, \link alpm_fetch_pkgurl \endlink and + * \link alpm_trans_commit \endlink can all download packages in parallel. + * This setting configures how many packages can be downloaded in parallel, + * + * By default this value is set to 1, meaning packages are downloading + * sequentially. + * + * @{ + */ + +/** Gets the number of parallel streams to download database and package files. + * @param handle the context handle + * @return the number of parallel streams to download database and package files + */ int alpm_option_get_parallel_downloads(alpm_handle_t *handle); /** Sets number of parallel streams to download database and package files. - * If the function is not called then the default value of '1' stream - * (i.e. sequential download) is used. * @param handle the context handle * @param num_streams number of parallel download streams * @return 0 on success, -1 on error */ int alpm_option_set_parallel_downloads(alpm_handle_t *handle, unsigned int num_streams); +/* End of parallel_downloads accessors */ +/** @} */ + +/* End of alpm_options */ /** @} */ + /** @addtogroup alpm_packages Package Functions * Functions to manipulate libalpm packages * @{ From patchwork Mon Dec 7 22:19:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1826 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 873751C9979C6 for ; Mon, 7 Dec 2020 22:46:42 +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:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379740; bh=5pN6sgU7IcHIF6DrnB4kxtynbTzFBc+S/L0vHZjLe4U=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=ak2TzvJa5XvfayhqmQvSZ/iNX8SWnlZAFw8Ddqej8wNFQcA5a+rTevICfPM6gslsC 3yJ2evnKmwGvAqgQIiyPCpRPsK64egumLz6cImNmJQee0d7GC/ZGrlNUGw1UbBZ54x SV8I+0/KXfDBC6dAVONiyVrjUyApvIF20aCJ3d3BXsanUf+KgCttbreRdgnwJ3U6sq WuOvzoL2uRmjNwvX/+LwnVhXhlNjOefW7wT6H+tvrdbafAGVAaMpj/e9ZWzr3l4rrf 5uYka5pnMlmgwH6DqECELtXOZx3HAH+uJVrTzDZ3PYinmmCG86O0FfDogEJBFDQwnA cl3nvMYoY/Pnzdyh/JBWayFp2Vj9UxDGa6m3lnQZwhcP11o4W2srql5JE5+A9frOgG iyJXHNmbYOU2N+m5XSm+dzcP4fI5YKY/NDtHXuzvdxpqY0Nbj3t8GgXJ2lF6ICo2A2 L4HN4pBE6SiO/Gj+kM+hDu8jweKjaNMwmrOOOQA1rpAeoCMplr4L0CVHYkM7uIXMxB iB+aAqNGw3DdZbExgdAHxL9LAQYx+52GqJkaikF9mN0nu8kIMSd3/5Z6KKuFbuBWdG jleOmcV7Z7wbt2o45uXk4tefzIHeeo3wc4gvuSRbzNOlDBUClwSOVRPE0j0uFBxZoM TD+y8cXTGvK4kO+Kk2IED7gg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607381192; 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=76G31ToXM3HAMYWuto0kHZeOGVpnr3EmKvAbJHW1L7k=; b=nkSTlZicIt+dQw+irWnRBJOYxZCQJCvF8LM9AH9+gjlbb8Drw/spaLmtN/F+UkLl1ymsI8 WCMFyobybOcxqIagrcsWDhk/ea2pszBDMOADna91JlrNI+fsjTP/3OR1cRXXSWYOmyYb6n zZs0uVAKbWmIr8+eAYAtBJL6uxebLCzuKoJZiIgIBviROo+OioLPT1hZqHaMkvKnLwW3Ge APKW+QdugS88GiAjydu/z6lGMhYyC/SXMUjfOjB2y+SVjZXAjvIxcMgqrn6gI8kOS4E5je 6sm09GyNjpmnVvVCwHkXNmjF69hPvfKP7Al9cF8ueAwaR8wdgiwZlXJyJ6lpsPBZ4NscHp 7qSYk8kfJsH9ptgx9JtprsB7gcpys3JKcrqKpoR02/zFYn54B4ceTm3n3ikTHiCX8u8DM7 2q95NVrzb0lGDijPlPxwPTOCNyZtjEjtCZpyxebnEQQWZbZaL4/zYdOJFBF6qNqHCcvr+U Ip1jrnfF0Fm8rdgTgbRtomI5kXyAQWigA5wfW60YLVPs/4Empg2EteX14Z9r0W+rJYHr2R UcOWmFPluPjM/r9ms9FMCoMN/2XzvN8kXS3botBk13KP6zA4ZGWa6cUxvzE/ZrGjb/U+PA 0uQlP+dwIlTKcNAp1gUEJGaEBMp4blDOdWvInZWuqtUvfoWZSGyts= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607381192; 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=76G31ToXM3HAMYWuto0kHZeOGVpnr3EmKvAbJHW1L7k=; b=Fw7FWzbGnmok6UQ+Z4uLBWnYHP6NvHTlYHl2jPED3LHnbZReONAXIKViy3T426tH3IjX4x iu5ikelBBGYz7nCg== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379736; 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=76G31ToXM3HAMYWuto0kHZeOGVpnr3EmKvAbJHW1L7k=; b=VqoMIoy/Vak429/cxYgIQQKXXsUUU8Rf1yOecJocIoYHsRVkUzn2w3vOWuqH1Mzw0XnZe8 t3gutsPQNhOc8QmxPMeFlGAIMs0Ehhfxy6rfCdBNcWVeSdxZsiOtB5KGPukVHObBFob/Qn jXo2Y1506t3/TvqwczzU6hMlZE1vXBKxIMGasR1pTMkdf4e0DUos7pBrslZP59wuPSdHlq S9EfDKfpkep3+MaTE0seLDBpWvquEJFh0E+EPlE5oS6J9IWNQRlwBY2wgoWqAlnb/iZj5V EwjCkslOSY3vyRjibp7EW/DGFdt7l0OX5EIXkgk1QWWxzi8M53t6Cf0ZyBIm7jTEjsAXnw /u+JnNXOew8jac7hCXLInquA/DUxn+hrxJhMZuzy0Fp2vNbnzQ9jZXnm5TwVUTe21G/CD8 VMR7cibLKpsolaJL/5IBvmkxnSLeeJhM00IeSLhHTkOMauie3Xj2PZCzY789g9b2YJdSXp xmQLeYfnf+bi4f734ETSYvAnHS9+fxgkMBXg06OFTw4OeDAg4uHcFwLZnMJd3PWLdE73ch jGtLNmQ1UcBZl/Cy7kO+Or1+DAFmAh6erbhMqcoHcAvbIvsVMzCRzQGvvGNzUWKi8lB+aZ 8xPFln7gc/CidmGB4q7U9H5wYVouhfjEN6P/romD5/FatGMxvtBmU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379736; 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=76G31ToXM3HAMYWuto0kHZeOGVpnr3EmKvAbJHW1L7k=; b=hb9kIhYVYpM12SOSt4EvEP68/3pxEozIWMk39JnH9+CJ12VJ3jAXv8r21Kk5XvVNggq9RB giraF2vXXJOdLrCw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:49 +0000 Message-Id: <20201207221956.667322-17-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 16/23] doc: move alpm_api group to top of file 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 05dec6c7..4673f639 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -50,6 +50,11 @@ extern "C" { #include +/** @addtogroup alpm_api ALPM + * @brief The libalpm Public API + * @{ + */ + /* * Opaque Structures */ @@ -94,11 +99,6 @@ typedef struct __alpm_pkg_t alpm_pkg_t; /** Transaction structure used internally by libalpm */ typedef struct __alpm_trans_t alpm_trans_t; -/** @addtogroup alpm_api ALPM - * @brief The libalpm Public API - * @{ - */ - /** @addtogroup alpm_files Files * @brief Functions for package files * @{ From patchwork Mon Dec 7 22:19:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1820 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 4AEA11C997626 for ; Mon, 7 Dec 2020 22:41:33 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379742; bh=lLCsjQBxYQ/bIpR57w61+Jkr5pbaP1kLRrWiJ3KDB5M=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=qbG8LQOWGXzCL15D6N30Isbz0njpKYhDzgBZ0iYHe1loXQc9eNd21eK4ibqRg6jYd F92Z0hCR6hkeEmWt4pjUShyYp/+JG7Rdl8pwt0fdXLASBkA65yJ8FcqNV4PMMlnQcr pYcxshkIK6VNAHyUL32+oh+JfJ6iJ0r1z+Yyalc4EieprIM/uEANQrUDIklZ+gFfkH JJ2BdSAeT79ToD8TzPkXNslFTenEv3OCcGmrEiXXdnBKY23I2bJsKHIsferzuRtwGf mX7zcNLKRe6lOHprjIrpLsHTiRTBhR/4C2JyRestfeF3itoAQ/4dpJcUKqjiooPKTL 31C36w5apUdTYu1RnV2bFfmMphO85XpIzMJ4ov4V7PjTzRQWD92muRezh4b0LxK2D9 q4WmetvPGdbw+eaf5C2aaZagHc0ERzvrN2xHqZXnYXfFRlUuKmbK5z6xtBmKW++LGb rlXgwuueHFGL/PpwPe/YnFm1nKVhezNOu8dja1Aa62jqrm0zqFLwYg8EibdLruXda9 vKgpmeWhIg60nn/PjHl8DuuggvbhdA2E3h+IN+k9qCv5TU+8F08ayfy2kw2C0PeGeB OQy6v4mPtDJyIGezJPIOOoSDMM6hQa0xotFSpx8oo7kZlHXDou3BrksmhVUbK6+CQH q8+1ysqSGz2WmaF5vqkN3DVI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380888; 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=FTmk5ejSAZnKOUMnDSbywa4v09NujE8CWzgcDzyxSKo=; b=PEGcxcgAb1NN5UffEgD4LuFDehfOiWS07VLtcuhS/CUY5UG+ZuenGzvLCZoIDSegXrRlpj f/WWnH5UZwW0x58fsOGCCjhnJh00QiYSRiAWPVqezAprX+W4iN10QDkSkuuRNasYlDsn29 9QBPkl8EouU/f53KKKmz+mB6Gg9lVQhjcRerYKFEGvnEqR5Q3Mf2q/ODPPKAL0Ivik8JeD W7Ih5dYel+373HR7agkZp6k9RtcfPaf8II+fkHfndVsEMShv7j/Oy+GkveAlWbOC6j+0Ab t13/FKbkpWRiaeOXhpRywCZbt+AOnxM0X5VP/Z2FgLkwwbwAb5UEVwhDhzRwIPPf/Rn7S1 FgaMqKbl8N74UqgsNZIPJ52YtJAY7ftcwK9MD5PyW/HsihVU6RzK19K2jTXXfv0Z4RwxIt La7+zyUtT9e5XGVMsz2JjEOM/qQKbEfJLcBazNWbnJpKW2vcLA+iOvA+uOZBb5EmJijzOH f0PKWP8I1IEoYTzGGvIj3rZoCCEtcFOAqcQ6gDoCTW6BjRvN+tz3kWU8DSq0WziNnCG10O XL6aTbv6C4kEZ2Mw8mao35h7lFlLnEeJxU8SDysR54j3NBcq+If9wHqdvx9qloj6VE7A0Z flvEJ8QxO0998qlLsHn38PpvfkXmiJXczRsefvVC3ePTHo/KX/FeQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380888; 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=FTmk5ejSAZnKOUMnDSbywa4v09NujE8CWzgcDzyxSKo=; b=OHU1TEmyNQSboglWkxq7eu9PhzN7z80Mr9bvFhm3TR1tGetu67myTaz2Z+eV8QUBxy5haK qQacforcZ41SW3AA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379736; 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=FTmk5ejSAZnKOUMnDSbywa4v09NujE8CWzgcDzyxSKo=; b=HyaFft0b4ETYrEg6yIyKV02EYzio4XtaakBBtBBGz5eSTYqkZXs9VgnONv+YJa++8g+Ei2 zY5T6g6gTfihQg+Jbphx+i3ybkcLksVZ1yzQWjczWhtSh6RcPIevaLg+HgnJ1t+tyGCofB lZEbBsesHi088nddvY0K8rBcLtCP28CaQiTEJrRIBw+ChzO/yiXP33Tif7rmTK3R1tDyMq 4tu/dMu21vWQXxUjQU8eDzwS+ciXMOm7vB3X/m1071QTavl7rWWw1g7uNdAT1J2thKixNf 635Wac2KrOGuEAaf6vqeoVqtqUimYqQ+WothOD7LEuSttQxdPXiYGa3Y+K7M+kvgdHQT8R WwJ7ktF/OuG7YAF4WXvglRiB28MEesAkF5jHf30+2grbfcjXe1U26+x1SpmTSAhQStv6ZO 2nVDo5U8WMbijGArzKEMbr/ZFhlSa171O1zgV3YvR36taAV1WiECXnPfDBevCh0RlrpTxc x4zCBMd8XRUUEqNDns+7XxjKd1Ws8e4CZJWUBiDpiVWLG7Vtl4cvngXEntaJ1Oukx+JYu7 DaLNMoKuLwdo2snJx+X0fBM+yxCmK2ozVum8ZTLW9jwcGNoR2yobKUnSGo3bin09lDWnq1 pdHRKOSzW4RWrC364PrV4l6SK26MhpyCip7h8FFxks0j8gKqmtVOI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379736; 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=FTmk5ejSAZnKOUMnDSbywa4v09NujE8CWzgcDzyxSKo=; b=6uVqc7TJBtoUeOLKfRFU5qLtSnNf53qcXx1x1HIsRAOEE0UP0sBMW9N9en1zXZsKfWJvFY yiRbxx0Tfyv1L2Bw== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:50 +0000 Message-Id: <20201207221956.667322-18-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 17/23] doc: move top level items into groups 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 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 4673f639..e9cc7c85 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -62,6 +62,7 @@ extern "C" { /** The libalpm context handle. * * This struct represents an instance of libalpm. + * @ingroup alpm_handle */ typedef struct __alpm_handle_t alpm_handle_t; @@ -81,6 +82,7 @@ typedef struct __alpm_handle_t alpm_handle_t; * the user. They will be freed when the database is unregistered. * * Databases are automatically unregistered when the \link alpm_handle_t \endlink is released. + * @ingroup alpm_databases */ typedef struct __alpm_db_t alpm_db_t; @@ -93,12 +95,20 @@ typedef struct __alpm_db_t alpm_db_t; * * Packages can then be queried for metadata or added to a \link alpm_trans_t transaction \endlink * to be added or removed from the system. + * @ingroup alpm_packages */ typedef struct __alpm_pkg_t alpm_pkg_t; -/** Transaction structure used internally by libalpm */ +/** Transaction structure used internally by libalpm + * @ingroup alpm_trans + * */ typedef struct __alpm_trans_t alpm_trans_t; + +/** The time type used by libalpm. Represents a unix time stamp + * @ingroup alpm_misc */ +typedef int64_t alpm_time_t; + /** @addtogroup alpm_files Files * @brief Functions for package files * @{ @@ -343,7 +353,6 @@ int alpm_release(alpm_handle_t *handle); /* End of alpm_handle */ /** @} */ -typedef int64_t alpm_time_t; /** @addtogroup alpm_sig Signature checking * @brief Functions to check signatures From patchwork Mon Dec 7 22:19:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1821 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 8DA1D1C99763A for ; Mon, 7 Dec 2020 22:41:40 +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:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379742; bh=8W2L1avm8QXr3leevMbxgY7vUCtVVVlX4gDgneYVCa4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=VQwog+joTR5I2SLQpvoPkEo1kr50k0Wi/bl3Kxz7h290G80y21+Ws15F9/VKyjTuc kGCxLQVgVD3JKMxjDQPzDLFgn6ToWfKJ9YmBx8X0P9RXZeTb4V7vz0eks0T/uzgYM8 t3cvtmbJ2bCIhL+0wI0qZnQpWzPCRsSK+WH6jkvbz50M6xh1YOVWZ2bwE7QGFC73EB 3N1IOJxyTR7SJnQqpoX5W4Eb4xJuhMqBW2638H7JIpWQJJXEYZrcNLpZlkpmK7/Mx8 9e4PjUvTXb2gy1wHmyetrOu7G8h8JAjKst8FPAJlA7AcZiNCH4x6xT/AubPosiNMTl Ad3XQxr68kvRcATbeJRIUflvpNmhBFzb8s0NrUlRYje7ddVZ6t1UZMl/ubJc51B86q 7ekFF9HQm0OrsYex76mi/vCEjz6A46awEe0TODdkN9Q/s19k5WNlA2cVgF+9/vWgUk FJbeRuUIJpb3TpKCGbJeNody/QLIQhEL6ygqMf+CyvZOVvrjSIkdI+SA4Pb5BGNNDD BRzAPyWlb7N2rVjdMTOz+3KOeo4vu44AclGJXCb05CsrKrg39MgLwHB7nTvSBkV+vB +FrJP0j0jNBjrtkdTItv6CF94Nb0pjOHdh58mUt9pVM6I3WxfzE3ERGapCixW1bqMl 09M8lsfZmwjdO+mQn0dD1kGQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380891; 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=ZSiS40u93W78WeqPtIZddt5UFpzH7e2TadwXEetZ6n4=; b=RsoGqwC8/6jPfJ63feQ6idDxCXo1nq+huo56NOxfem02q6JGNKXgVp6EOWddkqcVOFqqUL iGWBjHnL4w4x0atybt5beuqvrSlvupLAzHSDZzhs4cAthevrIrg6Wi1K1e+sIjWHnKst3g hGKyqgQMdgftQUe4pKPMZRViNnRcOSji1uTmV2+VP9kxCQoxbBnB/H2LoOIr1yjkt4KENh WWBWmWklQbt2TTbUx3uX3TDQ32O8lPxaOJXjrfwSBQNbSLUlSJ2cdURHuo/wXNII9AypwD iQr0VB+fsZafVhzZ8HhIF9UeeipyckCz+u/sGvlcERp0SoakYBK2augn5oPixxxiHc8qQR X8AZXXVVdsKxK5CFz8sWxwa0TniFw/ZS0lEkSnFx8kqXx1kLYSh3Nq/+PToiEY5FycVwwm Rq86MrFNB0YX76mw4YhNjcZI9Wab+J8rfiW6CdiZXCiFYQkOPMJxsXcGvCalcCkmPVNpC4 E3KtRRRNHB6HTmvL7dJBIY7WbZY1bFJJ3PRvL+QZw/8DGR4/Ragn7jHKdgIlS1vEoQSdqa 3qt8ZETR77UdqFqm6mTXhBFygRTEDy7FPRp8nnXNtdSvEwR32C3CdgqJ1r2BX8ctpA5tJo jb6davMBrA9ZwGLLCdzcm3vysz0EMB7vFIyRAspBWyayTAI6ly8Zc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380891; 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=ZSiS40u93W78WeqPtIZddt5UFpzH7e2TadwXEetZ6n4=; b=/9U0bt5UIu4LZQpjVsEYHyUEKjzIl+D/zK1ivBbssId79M5qEt3Dxah6Pb4ZufUyodO+O3 i4uhn9e3AYlUvZCA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379737; 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=ZSiS40u93W78WeqPtIZddt5UFpzH7e2TadwXEetZ6n4=; b=peBeF/i95i+F8irOH2IzTL+HJHOW/Atj2PqYJ7/Xb5dnfvGfU5dHxntId63EkkZWKIjBf8 ifr6QtvnVzN+FIO9VcySNOh3Zi8pyDt4msqjgssKTZi9wB8G4gNTQaycPP9KXaLfNlSMok lcta7waYpbGpRzi5xdGK3PXzXpAp6uCxZxlxOLbqUlprD0anHf6nIk2oB3I+Popjs2IVLa ONsvBn+kFgSPc2mx7PSEumvFb9JV+ejt+2x6BOmpgKr3/LBW+wBDUp5NPCB1BUDOIo40Fc UgGIvuscDKUj5fhnM4MCjBMnyw7nV3dN9iC4h53D0GsJuGpjhCf0yv2I6shm6p7m4QZ2hW 71TOn5AOtUkdMKM6OJ3kIvWP95D5GbXdK8/k6fTs8tvyvBK77YII8xJJRjqbsLEDVhSN3Y WIfvYYu1zCBsH1g1NzfVf7djt52hep24/XdWhAsyUWGAGy3sit6korKzasYpUl6T616vD5 OQVj/oaNn14QrC/bFkYf6cqroQAW3vbAtH3yzgzK6nWJ8qHG+iPrMgwTshlfI+OuTxncN2 nRDRiEmWkhYp9Ol79sz/PaSe0mN+s1Psg08z+wRFyMMipZ25KLZaSC4adyfNmnWy+tiono a/NQNiWkJAoYVLm8vmz9U182WRvQn1cSNTkpUDyN0tPIehe4O1twI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379737; 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=ZSiS40u93W78WeqPtIZddt5UFpzH7e2TadwXEetZ6n4=; b=cPc3wYx70a53GdLgzdcG0VteOyc3CPT/x12YF+i6r8DfOUbyAOzqlBI6FozfzE+gdzkVWv ivBibmOjuuv3CvBA== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:51 +0000 Message-Id: <20201207221956.667322-19-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 18/23] doc: configure doxygen 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 - only document public alpm items (alpm_*) - hide typedef'd structs (_alpm_pkg_t shows as alpm_pkg_t) - enable inline struct definitions (this stops having a man page for every single struct) --- doc/Doxyfile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 78481dd5..e2101a28 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -53,7 +53,7 @@ DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES INLINE_GROUPED_CLASSES = NO INLINE_SIMPLE_STRUCTS = NO -TYPEDEF_HIDES_STRUCT = NO +TYPEDEF_HIDES_STRUCT = YES SYMBOL_CACHE_SIZE = 0 LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- @@ -107,14 +107,14 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../lib/libalpm/ +INPUT = ../lib/libalpm/alpm.h ../lib/libalpm/alpm_list.h INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = NO EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = _alpm_* __alpm_* EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO From patchwork Mon Dec 7 22:19:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1828 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 81C0C1C998D1B for ; Mon, 7 Dec 2020 23:11:30 +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.4 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,UPPERCASE_50_75=2.5 autolearn=no 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 23:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379745; bh=Xhyt7cpe4x0y0dBk7qYQIW3o/UE2ykKEow0jpJ/r+1M=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=AYK6FjwVN7oTsOAyL0IfXAWooLmUkL01Gys1QHKinbJRIg6Isi4aqFIpN0mFBbxLp Sz4aHWmQAQ6f42G1s5608eOmgMya7miZBg2L2afEatMIt7TiZYWq2sGxub4Td9rl1z Ms80R1dMaKNAZEESlxwd1CIDqNoaw+Wte3j+iUnHlqB65zIw8bIBxp59PRP93KvvCz FPe+qjeXlO8mUmMDhGBe//pZnPBEOXz70VhKn92fce4uWlfr9YbZ+5xKBaQju6tbZ3 3FAIX+7HTKuyyrLEv2rEEhvKJjc6E2Bizr3fc3tKZ2VlHBUhQG5487s+ZRNuDzs9Dd 2hIzIyi2aol13xYl/Pw9NEfpSmV8MYWZRY+yBXi9J1KOX3+SLbTu3MKrhRc7rpcLpX 2NeRCwtNBoLcWiSNPrHeufJujtFa6tlXMmlYPHzug3YrI/rO07HR/B9ynwrF/4hB9w 1RMk19AyvA7Z/0vdN/GQqNQzGOjXngDPUTD8t9xay6MTIcGfFwjZqDyZhymJsSbjX0 o3yHon5f0USchtlHMOKrkU6Ll2Vkuef0mLkpkCitAR7fRDr6UF0d55Qn7JdQYkY5dC /nGgRf/mbHSysdxbj1epSOWNCy+yNEItdFn54qo0IdBmjAkJ2VjWkHS2px6qlJSIbU J+gxm2Hq9qGe6HAWkwp3PR8A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382687; 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=c7oiqXfeqJ7xHRyfvsdZPQq3Z2jxFwzeJcdkX1f3hhk=; b=rq71vEz6f7dso8vKjWIDvYEkKa2qQiYmJyg0Et4iEh1ZsqdU/cgrh+IxlU032yfE77Tmnd 7MoK2hS2ZJBbTEZlN3DGTI980tJzpqpHLuF2sm0mBa0zxUP2QBEhlysDEUe2mAcG/rXrlu 5U+aiwWoTxQWiI6BMdSu6COlJnJN5SHolHOcKbCF8rLScyxOVpb8nZQhrNQI7xpNdw4n2N xrXNxg+kg/vdiUBY6Yqrwj7pik/H2N5xtuy9wmECYMoMLJN7VpILIfk6TV8eBT6XOIbUAO V211l5Q7PfweiebahEhIs49Wy5Ha1xSS0e9RYbMeICQzjV+AIqK7lWzUCsgL210UQuQiK+ c7m1BrsXBUIsiQNpFM0DWoVjHS/ZRKQVoavvd0NyprFq/wIH54AUaEpbMUvqYUllFlJ8Jr vFpNf0ivugFuKcF84Ooyhig3392rwyKIw8itof6Iz5+jVpcqITRxkmjLHBXmnjawI+MKHp pVcwobU2KNK4fPePdVinhi6JHnljg28YmZ1VT6v2mJi16XGOn3w62cc3zutO2mMN7RCg+C zfes6x+7HSDOb9j7ZSLtlWouPxaE9VOZLdVevtHeauyYnrmQPqq8WrHdyL4Wosn4/8sNvI 4swy9NEzTaRfOo2fhcEKRoeylK1UKbwXpILfWMpa7QMQVfSNz/8sw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382687; 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=c7oiqXfeqJ7xHRyfvsdZPQq3Z2jxFwzeJcdkX1f3hhk=; b=i6VUPIGp76I9io2KwJ2X4hGzXRSf/OhzSD7JEbPZUCB0fXjfJ3f9Wdv8l94o6H5Dk65s9C ybHvlS7wwyjSajDQ== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379738; 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=c7oiqXfeqJ7xHRyfvsdZPQq3Z2jxFwzeJcdkX1f3hhk=; b=CUyJIiqMhfuHYnmhyMjcwYR5OrW+ryv2Pe4w5p+Pn7kyx3EYF7av1SPOx2Po1tpn2TrD54 S3zvGgBXrQJNq0f1PNb1eLV73M8XI360qMKZjFj/3YF1+9uYrLi5BxiycQvRCx18IBo8/G 4HjFHX/OXEIbOZd/3C+D35W0iDCE9Ya3WPRPwB53PESN1GGD1E3oHkAlMXJ2kgbYITKeW/ LnaZ+lVUDhG7ShaUwlZUNpZyJL21Jk1nrgdy3WXX8JLG8bXdpoAxlDc82ZlmqkSFccmA99 6zWtlhhpBZOvET9OnBloGO9ry1pyiOYpluEA+YXX/CNm1N9lQklC3sDclZzMqgRFijA6sl Nu30OMBbv7ebch3vs3u2/ttdBxIaJ0cGiy8MGCS6o1gJLqfw7PK9OBRQBMNEQ6GYbKCgrE xNkCDnKRgtS8bkbBRipj+7WfiXg3wvvzmZAt/t/SC9scNl599eOV10RKrqk1T/OXKyb7kv tWeY+ZmSze84Kp6Z5KYGsJdBNGVxUkMVWeoN9NedBJ7+ZpI3I8LlZvuaJEH/YpTmUkDU7m Y0F/Ogu1d1s7zcEZRuzcfDvi0593lRBsQd9NpJrSc801lf4tK+wEDzA/cmeKc0E9PesrRh m6le41cG8u2tZlfVofswreeHmZmfsdJ5O8xcA99RRDMSQ97BcJyT4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379738; 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=c7oiqXfeqJ7xHRyfvsdZPQq3Z2jxFwzeJcdkX1f3hhk=; b=yKKDf8ZqQu8pQGlCt7WsxC2pXNTM3cL+zG2+bklUhPl4D8nSlBeNxn5hMAuKrcRZLXr+pu qKyi88A/Pd5s+wAA== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:52 +0000 Message-Id: <20201207221956.667322-20-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 19/23] doc: update doxyfile 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 --- doc/Doxyfile.in | 81 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 22 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index e2101a28..776318da 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.2 +# Doxyfile 1.8.20 #--------------------------------------------------------------------------- # Project related configuration options @@ -10,7 +10,9 @@ PROJECT_BRIEF = "Arch Linux Package Manager Library" PROJECT_LOGO = OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English +OUTPUT_TEXT_DIRECTION = None BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ @@ -31,36 +33,41 @@ STRIP_FROM_PATH = STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES +JAVADOC_BANNER = NO QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO +PYTHON_DOCSTRING = YES INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 4 ALIASES = -TCL_SUBST = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 5 AUTOLINK_SUPPORT = YES BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO SUBGROUPING = YES INLINE_GROUPED_CLASSES = NO -INLINE_SIMPLE_STRUCTS = NO +INLINE_SIMPLE_STRUCTS = YES TYPEDEF_HIDES_STRUCT = YES -SYMBOL_CACHE_SIZE = 0 LOOKUP_CACHE_SIZE = 0 +NUM_PROC_THREADS = 1 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = NO +EXTRACT_PRIV_VIRTUAL = NO EXTRACT_PACKAGE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = YES @@ -73,7 +80,9 @@ HIDE_IN_BODY_DOCS = YES INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = YES @@ -95,26 +104,29 @@ FILE_VERSION_FILTER = LAYOUT_FILE = CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../lib/libalpm/alpm.h ../lib/libalpm/alpm_list.h +INPUT = ../lib/libalpm/alpm.h \ + ../lib/libalpm/alpm_list.h INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = NO EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = _alpm_* __alpm_* +EXCLUDE_SYMBOLS = _alpm_* \ + __alpm_* EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO @@ -123,8 +135,9 @@ INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = NO INLINE_SOURCES = NO @@ -132,16 +145,17 @@ STRIP_CODE_COMMENTS = NO REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = NO HTML_OUTPUT = html @@ -155,6 +169,7 @@ HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = YES +HTML_DYNAMIC_MENUS = YES HTML_DYNAMIC_SECTIONS = NO HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = NO @@ -184,33 +199,47 @@ GENERATE_TREEVIEW = NO ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO +HTML_FORMULA_FORMAT = png FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES +FORMULA_MACROFILE = USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS MATHJAX_RELPATH = http://www.mathjax.org/mathjax MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = SEARCHENGINE = NO SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- -# configuration options related to the LaTeX output +# Configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex +LATEX_MAKEINDEX_CMD = makeindex COMPACT_LATEX = NO PAPER_TYPE = letter EXTRA_PACKAGES = LATEX_HEADER = LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO +LATEX_EMOJI_DIRECTORY = #--------------------------------------------------------------------------- -# configuration options related to the RTF output +# Configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf @@ -218,27 +247,31 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO #--------------------------------------------------------------------------- -# configuration options related to the man page output +# Configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = YES MAN_OUTPUT = . MAN_EXTENSION = .3 +MAN_SUBDIR = MAN_LINKS = NO #--------------------------------------------------------------------------- -# configuration options related to the XML output +# Configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = XML_PROGRAMLISTING = YES +XML_NS_MEMB_FILE_SCOPE = NO #--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output +# Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- -# configuration options related to the Perl module output +# Configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO @@ -262,18 +295,18 @@ PREDEFINED = HAVE_CONFIG_H= \ EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration options related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl +EXTERNAL_PAGES = YES #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -MSCGEN_PATH = +DIA_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES DOT_NUM_THREADS = 0 @@ -297,6 +330,10 @@ INTERACTIVE_SVG = NO DOT_PATH = DOTFILE_DIRS = MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 3 DOT_TRANSPARENT = NO From patchwork Mon Dec 7 22:19:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1819 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 633321C99762D for ; Mon, 7 Dec 2020 22:41: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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379745; bh=IWq23IAUkABfzsI90K4L2oNjvq5AstIZAowWRdrtkKg=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=GAVJRx3A6k1Mq7Xn3fItG8fhnP7iHkFq80A/1nFRlwxwsWeD5puO7ktByFQElIchL 6ZsJoox1nQ2NPvKZByC3ObjZ8wOct58vZcsSgS0xw+RIAqKeSUUQ/GkpMLStSJTZC9 MzMgFCzLJ59E2ao7oi3V+TFbOijBgu9Kr0JEKEL3wwxz6P0vFU18EUPrqAje3mYR6F gCQLHOv1O2vU6d0fSJUeQE7JyOczlIKnw/B53WBVzfB2sfTqBoG/ihSwZLORGHoYXh haZarR7T9Gr+eToE9n8ii2SlLsGDsXta2LdKtJL0E/fcMs1dT38yw2zLSIymqoBZ/q 3DrBTd9D2DfW5lrP6e4OGiCvtGokZM5iOaMjq/xOKJDeYJCCBOU1OzyHQpHhHUnhxM 6z/d7P3k3g9c/mNGZy6O9uOq7h10UkAs2YgfrndSaVY/3uM9boC6pbobC1ijjp2oUb d2qJrgopfhkYByG9o4CUl6/fBXlW3UKXU8TnQ/pGkd3oGlrEQ1/itH0XaUURlpbR2x E2q78E2YoaXgGn/IhnYG1Ayy5p3qK+jqNuHlUxV9rkGxVqgM5WvqbGbDAHwAB8hI4w jJXydH084REdkZeTHCCXusxl1DpFsyVNFqlxGMuz+Wnn9xdyZ05lw7t1oZTXEoUkS3 6o7V+rd0fi0BvYJGtt6EAVpY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380888; 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=NjVpKUgoVmch5QwbxAGH7Z3hlNcbsvDLjNfKi+c92fs=; b=IcUn11fstjO+PdPZuTmwjBGAk4syBNGXTbF0mZaAV4erSMHaASeToTdBrV2rfPcebTCcuw Z586diPAeBEnwfpQ9fGoG56YdjPcmSVLK6KjcONY0xhMOtpNlv7547fyWYAa3DM9lacagc mJUKmL48i52XurSFrLU6Pjne+RHxUo8rUUOBQp8qgOtFeyYNoHgW8r4tm3VyNIu3AEpk5R d6AkC4eHUp6n0CJN1xbH0H2eKS87GB1Xx9g3FLKq1KwMlDA2MWKeXvdwzZv9EMJOnXCtWP Oy6XroNylFyRz3e9/jPZY3ZQhTQSeLWphXFcbSgJZSxK1BPQT/5k+hOEQm0pqP29RJAMtN DLr3o6PRTv+pM/r5LYX/tsrfK0h+WsGKpo9q3zVhFOVtEP0/OLBHNKEnTRZfIwtee/z4CK 8TBbAVmxhayv5xFVEyvBbAPviA2VcTee5Vrrt3vaptAfdNYAbms6InJMRj0GTKuaGJ+qH0 8Q8uJZ/ygJk4S2EnA/3uCF46gWKoqQbhZBxMRSy5drD9jwmvUPAmSW6HnlwdJ8I1jla/x3 SkXbrEoWrMTfnpoPTjwFqXuDeA09BpMxJYLnTZGyrQ97KJUpqPvFOQlc+oI5zECG85GeZE 5Zrw87Kc3fABxRAjs7Gu0KQ46OwC/K00QiVMCRZoN5W6azL+WeOK0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380888; 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=NjVpKUgoVmch5QwbxAGH7Z3hlNcbsvDLjNfKi+c92fs=; b=2UBnnUw8zDjTrGjXn0DPmIouuuj5lQ2Rutt20QWFksr0SIE7Uip5wmnTql8579Rk9jjbGu amQ55YRppbQUmGBg== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379738; 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=NjVpKUgoVmch5QwbxAGH7Z3hlNcbsvDLjNfKi+c92fs=; b=GTlIaaPpmUWiBcRZXPjWHgF/b2WcgjENSKgj2/pxP6CpN0SdgX9KHTKpIvk0SrDhc2YWMm 3bkzQlYQHdoW4olvEaNH2/QNK6SEsFIWjapZ8wj32lSE1W3nx6LgXo1BK5gKYc7TKH9bzc WrKqljuy9v0OswnmWA4gGr8Hk2ML6TaEPiB1eFjKi4ObjX7oySZC7jy7bIwiukBQNT88Rm 9Vb+PLPMDjj5oi7a+g168k8CE8VBq/bhEiSKKBoGG2VeX/DCXbTeeXAAg9ihSM83NPljG7 anWgOEDcGqkA53fMbxPnWPZ8PzeNWLJZ7q2XznEs1BDeBBR9J1sGAn6niEShMKOxAOT0jh sV1qqN3dGgN/U0r7xpVqDoVhBaLNxNO6FV+amorUebnML9b52V0ocqyvAyVK3D1Q53XCw8 tTlk8JkS14KU8kx7EVir+6Z2uHk6fc/Gg4+xQ6V/9DrCv7WLJQn91LUH34UkOys9PTQiDH B2yZxqtHJ1GtqWD1om3oa1wdCyCZJMxYDpU4XDGfJVKFeSByZTWGkafEfa9DGVlPbzVbLe zLImZtafqZ2mZ3Y1kNNoiAiaHQ77VHYCoxIp4gmNe7Sv+t1fDwVaeUkT+h4D6hNc3q4KZG wYQlLzCNXG52bdxS3oIxw9Y3w4wTUXaP5hSgR4h6yxjx42HZlckiE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379738; 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=NjVpKUgoVmch5QwbxAGH7Z3hlNcbsvDLjNfKi+c92fs=; b=Cyws/QGnuzM5ehZkFuJ1KszmBDN2IC0fDmXPvVI1sUApUzb6C1e0v0qdsUwROsbgg6682I N09F0NxPdIxW06CQ== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:53 +0000 Message-Id: <20201207221956.667322-21-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 20/23] doc: rename alpm_api group to alpm 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index e9cc7c85..a0de9b13 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -50,7 +50,7 @@ extern "C" { #include -/** @addtogroup alpm_api ALPM +/** @addtogroup alpm alpm * @brief The libalpm Public API * @{ */ From patchwork Mon Dec 7 22:19:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1827 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 C84AE1C998D26 for ; Mon, 7 Dec 2020 23:11:31 +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=-0.6 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, LOCAL_FAKEBUSINESS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_PASS=-0.001, T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 23:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379745; bh=RjZYKhycAKVMBaUZ9pRLpFZPdYFoTNyYDSW9CKOUzdc=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=EzdV8NuTd6iwq/3JVQxJ5gtGJkNI1G9GrNwmNMa/a+1T99hPwMVK6w/XhbawtKJJo 4bEg/3ofj13s+O6sUwbmM1xqWa9iwdG20HtDXgbCad33FCFK8BPkmNAaa30OUW1UOC /nSRodQlRMrYPqKO1WR58wN6Ffq8iYBVapVxvyq13siOBGRBJiAzrWv5jK12YKqBQx VnJJDjRfHRoTlrrUCnQL1LAXQ0435fm26E3mo0NB0GBDBI9blWgkarGBwi68dmA6uI tckX8eTaWylSy2Zq/ttWb3gMxbSFbg+EDe8gJtSfuDQpcKXLu7kMxsftz+PodIyLM4 tuEhrpp6pefJyelpUwH7jvyB+89jGI1KqmcesJqBy2sA/QJIaQcGcBF6ZeasoisX0P 84DCVc6z/wVCXZaDljyZjKwUcQaAVHxGpyrSsyyy2Nj2LOpSqlhoHsWno0/riwQ+/i rjDdXjXC2HHFpLNXGqoHRn5C0jG3MlniFxdcbr0N9f9eX3G4T7if/jdXESfjup1J30 eeFe8erjytStrmJxR7TMbStWBklM19l/KeXRN3sc+CvJ2vzH4mu2lfRP5yikN+MTmO RoGm04LQ5oWu8Mw7NIx6FyYnQsgeaj+6ScTnlakml4FyYVeieT31JhNLhw2FsSXb/O gpwZxd/aiKAfQJR/Jcg7Atr4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607382688; 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=doRmfxiDcLHIxbl88kYLK+pq/i3DWDBEAvs8HfKXTNE=; b=/X37cMkene4M8zo8ILHHo8LWHKbKVRNZ2CQQ4MI8awEg5HX/njcjUnLeR0g9HD+cw6nGD2 2DOExWfN7EZNR3Dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607382688; 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=doRmfxiDcLHIxbl88kYLK+pq/i3DWDBEAvs8HfKXTNE=; b=RifQfZChskdtjX9W0fB6L4L5gfHaNVQrE+Zk5yrEUNX8OM/ySk0U1NEcnEksKyvfKqM/JK FkdKEUephMiFkANJOfc3cCGE5YmFBWdJDsQXtg0rx4w9dx5wOlZ75UzAIDwIaULRBoKUos +AU29X/RvAFBpS1WmaIc5UmNFWgpENhR0R6JJuzA26AfP0Oh0XoMbOz1HUSszJ3IA6GLa3 DzbzVfv5vXUPRQjECT+glM/0pmVYwDDivSmML6hTnwvmT+aNsDAO+3uUO72abheuEbdsqE yM8ayHr1VbU85GnBae1CYlSoMif7NIHAhfvCnnGDdAxBLaHNUIrAf7atxpQo68mB7hjTCO EAfg/4Gnukh7yF4W+Azzc3thfRAOIB2NZ2plyKc/CuuuHph/pWVWolsuEMbFyFJ2MXKpGS F/mYWrCVefJo7DxOTxyyhYlNS7xm08CWD7kVY4wwS2X7yYhwabRaPjxYFKObisuLbyVX6e 9f6lWDBdK9LnGQ7jBsk39AgcX033Oh9I4BdBEXMsyQ5AC3Jn51PflmqO1CJA68QnoqQNz+ 5fsx7r/MIOMyBOc9raQFbVQ8gtZaN9FtDiHzwX8rWlGkNPy+wmw8B2PbROaaOicirGuHv5 tu+rYlLGJmmd5faIJ3KjxKP0jxqUhfLXRxumsJwsL0tIDqi0FiWtQ= From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379739; 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=doRmfxiDcLHIxbl88kYLK+pq/i3DWDBEAvs8HfKXTNE=; b=trIZJinVJ6GC5jo7w3mfdqbyd4iFaoKO4IbB2cPcJ9J/cEhLBXL2bidYHqNt6MmPA1QYAL OpeYTU32i844Zi514zWDeETAqrhyf154cEL+l2u7wSpPfWVJKyOmpdYPgzMIlxMRAlFIER qfyEzwgTd1EVdmeAUdo9Lbh+lYW4SHbI1eiokhZ+Ciu0R5NuxrWQzMbaUNBrpAVS3W1rAk CtLV9MelMhV2KXjvCrpDUrKnswsjHljLqK88GGKUP4LK3u4quXfvl86B8kBQ53Ap08azIl NgA3xw2p8NqUZMRUBHrQds7ZqaUwmyZbdt+IInAa6iANo1McylsgfOUCUukLHA1Yjpe/8I MUCWDRaUyG9tXj5p1Y0ncB7lq0+tzUYHWxI26/E0Ggi0NnoCvBiov2pRD8t/hwU5WHxcDr V52vQuShcNFrXJGP9h+e70M+UFUoPwQXLNlOpI/1vqcfpE7E3fL7QihYylzaiJhJacDQtk dFr/DmGRh/F62kuBAbpab0BxBrJVvW7xsXhX6wLFVQ5naaGBcrzf/0b4nRroXuJyJFze3b DfM0EoPZsopCW5SGJdIrTnmNAnbKc+0B+ZpecX1PtKuIXZTR58w3XZrGxh2IQwxZxtE6v+ +M6opavbvHpFQKle0gse2kh4txWheS3scjlfb1aTK/cguH85+YVmY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379739; 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=doRmfxiDcLHIxbl88kYLK+pq/i3DWDBEAvs8HfKXTNE=; b=uXrntmogqbnF4BMVZjmwCriqeLVXoEoB5lNHP8y8Tstx/srld9qZkSZJR1qMk15DMbNjki zyynetP33qOXI6Dg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:54 +0000 Message-Id: <20201207221956.667322-22-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 21/23] doc: add extra documentation to the man page 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 | 10 ++++++++-- lib/libalpm/alpm_list.h | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index a0de9b13..b2772f19 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -50,8 +50,14 @@ extern "C" { #include -/** @addtogroup alpm alpm - * @brief The libalpm Public API +/** @addtogroup alpm The libalpm Public API + * + * @section see_also See Also + * \b alpm_list(3), + * \b alpm-hooks(5), + * \b makepkg(8), + * \b pacman(8), + * \b pacman.conf(5) * @{ */ diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index 1eac3043..01fa092c 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -24,6 +24,16 @@ * @author Pacman Development Team * @date 7 Dec 2020 * @brief A doubly linked list for use with libalpm + * + * @section see_also See Also + * \b alpm(3), + * \b alpm-hooks(5), + * \b makepkg(8), + * \b pacman(8), + * \b pacman.conf(5) + * @{ + */ + */ #ifndef ALPM_LIST_H From patchwork Mon Dec 7 22:19:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1817 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 692C81C996DB2 for ; Mon, 7 Dec 2020 22:31:40 +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=-0.6 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, LOCAL_FAKEBUSINESS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_PASS=-0.001, T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379746; bh=QQUZtZV7kREnkVTviWM2NY/F581FNGWI3KF6Oy/XQQ4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=UmTOGJgyH6cnP0YgAruj5L5BaUrAjp/cCjZ2IiqcqoYW3bKtvaKHe2SiqkbAyGbnA s1TRiKYVESwIuOjB3V5PBFeBu1MC1xhVF5aaIy3ZwQZ/ugt46chEribkTZxlHnuhIn kqa5mtzEJ7G6md5sEMCHwhMBkQMdupGczDqMASPLhfwxh/vTIpNe0tKrfAt0IegmwY 12FzF2ZPD52I9U5kahMNKyIO520lDcWRLfQHjXLcL4uKPB8MzvKSQCQr4jL7gadaL8 qkVqGo9hIYza3+rDqsCLdgRJR8aYCeBlpKt2RodUVH8prnc8RU+v2bcWZqTRLEbkah 5wpHnpHoYZFi0JmGFX9nkZ1Cnq/LliRyCIXucihnmzfx/MUxLhsuTiHQBC9Kc0JvSE iu596Cgii3ZCzloZ5mdnf3+NnCdFeBVhghWt4Y6mZCLU3Jmci79QEUFd9mtAn2ZJFC weeumLdjXeSKy1RDTN6rwlJ9M8WUF7QHhwkGwM02W/mJDljVTIfA61dAxxZYJKKanl DZoPIkU/cPwoYipeEFhz15IuA4wzYbCfiXDSPGigyPuuz+FRjneMBBC0S2ugtY1DSX SG4yxMsLuHCsJo7oQsD8+xgF2A44a4PGg3NBuUOMZuSfq+XY7zPIHkLSYQYkujeRy3 1o8Kniy+PuGbXBL+4aYRpcOc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380290; 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=YO29Dv2097/o3vuXwel9f+GLPwE1YkEYBZs3fS9Nty8=; b=qLZzsmoNbxyy+2/k0a6S/gx9DuUwuOvfUMs4zdrYlXz2zfHla34c6P2zRF8TriW26zbskW anKctb5H+6oP1oBt7ue/dOcknzJwzI/gR7BU79Nbb2q20av/RQBUmE3UacWtcM7n53pA9p Vt95DcBmNHjsS5MBUQ2rFUh+Fc+pq1mBTcVgUWrbgo3nEHRs7bfpfUktbm2ub/7ZaEQDfY RT1+4zk0uq7R3moX5IAEUKWEX0+B55h2lVKbg4Pr7yLWk82lSXbRnpzVZNtepyL4y7S3+Y 9Q6oxaVnJrdUy7G8Ok5HOR0ZoFWpdGk7bx3X0W2XsBwEuOftPY3RmFJrgHdW/LXn1obYCa rdB2CRRIeDyUgPx2lh9NyDFgruQp4Rzhd8D86MgVmEaQzjajqMgrMlObD6k62Hul8scGkO UmbIz6jMndGtaWJujxmMcD20hX1cAyCB2LRKgmfCoSwyjp2rqoCNHyvImBqEs0Prfd/Rga 9jhlaLGR9ig92rag/RPhc30oO9X3LJqRw5yUrDr5LNv9XnAUerlp5nF4Vw8u1rY9JLw9L/ Dnt8s+NFk1zH0sCo7XCysYBpZajatpd30wMKnkmKQ1TbT5X3KTQlbgjia2Dl4QROXbuSX7 CxnGKJ1Trdqr9Cv5wEbmC4TcNmJ1optMITbgh26p/Vq1wiJzoPs0Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380290; 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=YO29Dv2097/o3vuXwel9f+GLPwE1YkEYBZs3fS9Nty8=; b=abOD13odXvTDMNZcZcNkc6GThk9aOn8zt9z2YWe/ef/IKmG99RjlO4S+WgEf7fYmNLRUpm E+Uu8jvDVb7vXBCA== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379739; 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=YO29Dv2097/o3vuXwel9f+GLPwE1YkEYBZs3fS9Nty8=; b=hGdEQmENCbE0Fg91yRXQWU6hr5H9ArHQaIYqXytIKCIS+FELVUDy7GW8THfCTW1JUayQHU WGtSbV+1TApbQiduQ6sKdM1Jvy9cH0wUddg+/w9QUweEi1+IdalIg71tzksIXDbT1I8Hz8 RY1qPGT6SXcLRNGDI+Lt1pdOIM78F6pHLGqPgUW/Le4LHUSByWiYgi6Hjv/SelACvFhKX+ zb7EkDg7/GT7/38zOnYy9SaZYjUrMb7rMF/djUAEQz4/JFlUPFh6UzDD5mZsQL00v30NlI pBJQcfAC6Lxz7bN+Gro7yLWjN2lGCGeYGu7S5qwtJCZMAzc/HshkcGashzme8XbDdQf6RW lYkBH4Zz0PyZkDpz9TL1f119NgExCWmssebjdWZoHCXooGgP4whn6JXG8YU8LPc5Tlp3RR TMaVAzwuiJNMJqu6mr9uZIT+Oqy0wwQBQsjKtgIBLc12hj9DHfh4z80yteqxr7/6qF7yEB 2ae6u1t82q9Zx11/w0dqCmWhw2f6AirbSMrgDrOcVFK/pM73wSmgc+oK1NwBfIG472yreU o9eRPcSPyAvOWZrEg9mVRau+qyorluMKEfEs2np1SIrDEAyYdJix9jd/nKgiPcpyjeesFr eIWdIgYi9HQ06ni3hbNS84N6SPPoHsZCGuEgDqkom3pfUicKTm0FM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379739; 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=YO29Dv2097/o3vuXwel9f+GLPwE1YkEYBZs3fS9Nty8=; b=d+UlH44w0F876N5S19Bpy1t7CJ0YH64gJeKvdOeHrLfjxQ8s+dTpNxw+upxU1oWBt0prlc MP4KyXk6JLGLJiAA== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:55 +0000 Message-Id: <20201207221956.667322-23-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 22/23] doc: change group names to libalpm_* 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 Also change the group's title to point to the group's man page. This makes generated man pages be named libalpm_* which is more consistent with what library man pages are usually called. --- doc/meson.build | 1 - lib/libalpm/alpm.h | 80 +++++++++++++++++++++++++---------------- lib/libalpm/alpm_list.h | 22 ++---------- 3 files changed, 53 insertions(+), 50 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index e24172fd..570dc765 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -9,7 +9,6 @@ manpages = [ { 'name': 'PKGBUILD.5', 'extra_depends' : [ 'PKGBUILD-example.txt' ] }, { 'name': 'makepkg.conf.5' }, { 'name': 'pacman.conf.5' }, - { 'name': 'libalpm.3' }, { 'name': 'BUILDINFO.5' }, { 'name': 'pacman-conf.8' }, ] diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index b2772f19..dd28b191 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -21,13 +21,6 @@ * along with this program. If not, see . */ -/** - * @file alpm.h - * @author Pacman Development Team - * @date 7 Dec 2020 - * @brief Arch Linux Package Manager Library - */ - /** @mainpage alpm * * libalpm is a package management library, primaraly used by pacman. @@ -50,14 +43,41 @@ extern "C" { #include -/** @addtogroup alpm The libalpm Public API +/** @addtogroup libalpm The libalpm Public API + * + * + * libalpm is a package management library, primaraly used by pacman. + * + * For ease of access, the libalpm manual has been split up into several sections. * - * @section see_also See Also - * \b alpm_list(3), + * @section bugs Bugs + * Bugs? You must be kidding; there are no bugs in this software. But if we happen to be wrong, + * submit a bug report with as much detail as possible at the Arch Linux Bug Tracker in the + * Pacman section. + * + * @section see_also See also + * \b libalpm-list(3), * \b alpm-hooks(5), * \b makepkg(8), - * \b pacman(8), - * \b pacman.conf(5) + * + * @section maintainers Maintainers + * Current maintainers: + * + * - Allan McRae + * - Andrew Gregory + * - Dave Reisner + * - Eli Schwartz + * + * Past major contributors: + * + * - Judd Vinet + * - Aurelien Foret + * - Aaron Griffin + * - Dan McGee + * - Xavier Chantry + * - Nagy Gabor + * + * For additional contributors, use git shortlog -s on the pacman.git repository. * @{ */ @@ -68,7 +88,7 @@ extern "C" { /** The libalpm context handle. * * This struct represents an instance of libalpm. - * @ingroup alpm_handle + * @ingroup libalpm-handle */ typedef struct __alpm_handle_t alpm_handle_t; @@ -88,7 +108,7 @@ typedef struct __alpm_handle_t alpm_handle_t; * the user. They will be freed when the database is unregistered. * * Databases are automatically unregistered when the \link alpm_handle_t \endlink is released. - * @ingroup alpm_databases + * @ingroup libalpm-databases */ typedef struct __alpm_db_t alpm_db_t; @@ -101,21 +121,21 @@ typedef struct __alpm_db_t alpm_db_t; * * Packages can then be queried for metadata or added to a \link alpm_trans_t transaction \endlink * to be added or removed from the system. - * @ingroup alpm_packages + * @ingroup libalpm-packages */ typedef struct __alpm_pkg_t alpm_pkg_t; /** Transaction structure used internally by libalpm - * @ingroup alpm_trans + * @ingroup libalpm-trans * */ typedef struct __alpm_trans_t alpm_trans_t; /** The time type used by libalpm. Represents a unix time stamp - * @ingroup alpm_misc */ + * @ingroup libalpm-misc */ typedef int64_t alpm_time_t; -/** @addtogroup alpm_files Files +/** @addtogroup libalpm-files libalpm-files(3) * @brief Functions for package files * @{ */ @@ -160,7 +180,7 @@ alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path) /** @} */ -/** @addtogroup alpm_groups Groups +/** @addtogroup libalpm-groups libalpm-groups(3) * @brief Functions for package groups * @{ */ @@ -186,7 +206,7 @@ alpm_list_t *alpm_find_group_pkgs(alpm_list_t *dbs, const char *name); /** @} */ -/** @addtogroup alpm_errors Error Codes +/** @addtogroup libalpm-errors libalpm-errors(3) * Error codes returned by libalpm. * @{ */ @@ -330,7 +350,7 @@ const char *alpm_strerror(alpm_errno_t err); /** @} */ -/** \addtogroup alpm_handle Handle +/** \addtogroup libalpm-handle libalpm-handle(3) * @brief Functions to initialize and release libalpm * @{ */ @@ -360,7 +380,7 @@ int alpm_release(alpm_handle_t *handle); /** @} */ -/** @addtogroup alpm_sig Signature checking +/** @addtogroup libalpm-sig libalpm-sig(3) * @brief Functions to check signatures * @{ */ @@ -526,7 +546,7 @@ int alpm_extract_keyid(alpm_handle_t *handle, const char *identifier, /** @} */ -/** @addtogroup alpm_depends Dependency +/** @addtogroup libalpm-depends libalpm-depends(3) * @brief Functions dealing with libalpm's dependency and conflict * information. * @{ @@ -703,7 +723,7 @@ void alpm_conflict_free(alpm_conflict_t *conflict); /** @} */ -/** \addtogroup alpm_cb Callbacks +/** \addtogroup libalpm-cb libalpm-cb(3) * @brief Functions and structures for libalpm's callbacks * @{ */ @@ -1208,7 +1228,7 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath, /** @} */ -/** @addtogroup alpm_databases Database +/** @addtogroup libalpm-databases libalpm-database(3) * @brief Functions to query and manipulate the database of libalpm. * @{ */ @@ -1426,7 +1446,7 @@ int alpm_db_get_usage(alpm_db_t *db, int *usage); /** @} */ -/** \addtogroup alpm_log Logging Functions +/** \addtogroup libalpm-log alpm-log(3) * @brief Functions to log using libalpm * @{ */ @@ -1468,7 +1488,7 @@ int alpm_logaction(alpm_handle_t *handle, const char *prefix, /** @} */ -/** @addtogroup alpm_options Options +/** @addtogroup libalpm-options libalpm-options(3) * Libalpm option getters and setters * @{ */ @@ -2184,7 +2204,7 @@ int alpm_option_set_parallel_downloads(alpm_handle_t *handle, unsigned int num_s /** @} */ -/** @addtogroup alpm_packages Package Functions +/** @addtogroup libalpm-packages libalpm-packages(3) * Functions to manipulate libalpm packages * @{ */ @@ -2619,7 +2639,7 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive); /* End of alpm_packages */ /** @} */ -/** @addtogroup alpm_trans Transaction +/** @addtogroup libalpm-trans libalpm-trans(3) * @brief Functions to manipulate libalpm transactions * * Transactions are the way to add/remove packages to/from the system. @@ -2763,7 +2783,7 @@ int alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg); /** @} */ -/** \addtogroup alpm_misc Miscellaneous Functions +/** \addtogroup libalpm-misc libalpm-misc(3) * @brief Various libalpm functions * @{ */ diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index 01fa092c..620cfbfd 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -19,23 +19,6 @@ */ -/** - * @file alpm_list.h - * @author Pacman Development Team - * @date 7 Dec 2020 - * @brief A doubly linked list for use with libalpm - * - * @section see_also See Also - * \b alpm(3), - * \b alpm-hooks(5), - * \b makepkg(8), - * \b pacman(8), - * \b pacman.conf(5) - * @{ - */ - - */ - #ifndef ALPM_LIST_H #define ALPM_LIST_H @@ -50,7 +33,8 @@ extern "C" { #endif /** - * @addtogroup alpm_list List Functions + * @ingroup libalpm + * @addtogroup libalpm-list libalpm-list(3) * @brief Functions to manipulate alpm_list_t lists. * * These functions are designed to create, destroy, and modify lists of @@ -60,7 +44,7 @@ extern "C" { * It is exposed so front ends can use it to prevent the need to reimplement * lists of their own; however, it is not required that the front end uses * it. - * @{ + * @{ */ /** A doubly linked list */ From patchwork Mon Dec 7 22:19:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: morganamilo X-Patchwork-Id: 1814 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 9C73F1C996D9E for ; Mon, 7 Dec 2020 22:31:35 +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,SPF_HELO_PASS=-0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 7 Dec 2020 22:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1607379745; bh=LqQr6lnljOGCnxclcYF2j0LPYJZEMqZFvw+rGFqxgCc=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=AtDvvKrZUSK011wvhrIJj4I+vqpWxw90V/QFftYL/ErNpqTYb/b29mqA6oT7dGb5S cVT28qrueHx7ni1ZtXUlKpWJ/Ay6gDDnLFuK/QUqT8yUPdLrMRV1qCPkCbgwNgYXrx HXX6q3/Djyu8YcDJd94cB824SJ2wpfgW4ySpQKonJRTVml6cISiFnhKqXp2oiw8l33 +CghzuqSJoBWttuBYSnf7IHOXqRfltpD/kMEu4YJxmYu8YHOSEoqpKV3ncEhnILM2p YidZx1c4CMZPrlRo9441FNxNMIYH2Le34E4JPT8UnDXMzhAt/SnZyEfAPJK7QYh9iz JhtSFPo4rzB2ziDXft3W8AWnNCdmMoBsUVuSQR+1RXOlM5M6YA2pK7hK0ddMG85TkZ /pu20axhnwAjIlQ4mX0x3IJsnQueg/7LOsbRlcFYfNURaO2RSktQOsXdQJf3nKVxAt nQleJmCIQB9iylfTNfRANADD8kvOAayCo/FNjjAzccQWcVpB+rcwf5ZHFd75MKvIfK 7h4M3fDs9I5a32GjIS1llY3ps2e7XraMJ4/QtcA/niNXni8ELFnqiwLK9ZpaUF0cal KFCINRK79i+ZcXyjDOJQ7DjFHGSQr9hPFo/LQSfRb1a7fM72AWlla2laxPIwoaf1nQ 7zh+HoTLJNv93kTNowCZOYpg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607380287; 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=p3Mr1x55Y+fYi7NHasGG0WBRt4BlfS1cyZuRTRt6log=; b=eSNsjSJhbw7WM3yH8dqUS6WA3Uq82RWgw472zbsm4QpMnwscWodv1wwVnga4P9GNaKXoa0 OXioDMiy+AARITP3XQwLXdk3AlwdppXmhpZDYio3Y5V0AJ38Ilq+Aopoo8dnukTks4PtGi s5R21rf/Op7lO0wvpY422sgTcf6XgYm8buOQLOp8jsGac/trf4b1gdijY0VOrwWwDbOGVD j0OTHN7+wziY2qy8xxA45nrJcGgkj2Sod9UkeaN3xGNHN8mAO90C1QObQVlwfRkElq8kt9 brsxXd7UcnA7/s5ZrK1eH40F8cXkfT79sI/mTnBE2/Ls+x24X3iM7sfTxrVKERSomoq6iz xsJJc5rFKFqmjwU3WCCBDiKEomdG0diAQkpFuLDsLSbmCkIsPRdocElqB6oBEJGFcyis7y 9UEGcGwceBkw5Tp1mYKjz2KUh7QFoxghRcQx7jVdm8odt6e/i8FuIGmGNLhz+7e/cYnxNo dFfk4luy/EDTPUepZeWXIP10Z4SfjdyqLHDUXO2CDfT77YR/Xzx4N68lINPXFUy0RR58we rfGqCUJRy2ZnwG97ugYKaKEgEHMDeqllqbxefqbtcL+0GCRxZaH68fVWWb+qAAIL2gxH3j pNYOmKt6vmxpqQqgTJ8ePepaMIwf2gRObL4Ciy/mXtA/dEWxbISpk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607380287; 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=p3Mr1x55Y+fYi7NHasGG0WBRt4BlfS1cyZuRTRt6log=; b=3WpvrEFobk6ObIfCvHyDYVD2CzV3Lraz866mvzxKCzjY4x20ma4YXkzmZDNjNyVOy9AYDQ Ojxe8D482m/OV+CQ== From: morganamilo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1607379740; 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=p3Mr1x55Y+fYi7NHasGG0WBRt4BlfS1cyZuRTRt6log=; b=hVWtE0O1japXeIZMKFk4VqdYtsY0JNKAKP25tBJBimlUipS9PhR/hyjz3hBY008lXahWCZ fiBOqh34Gt69FUUv4Xl9eGpFhcZixFclkTTSAMTj6jUhI7m2ODXQt47yrl3EuC/F6+crJW R0dRvBMH0AJi2lBL5s9IUXL0cD2fbEHYCQUGCfZvqpDYy2zxdKbeLHNqveVKEGxbaq5hk7 iQQ+S4gQMhChP55JyyJioI8GrsnI/0+dN+9Qo677dQOyDfCQdkQsL4RQ0biRoom8zNrZXU J+2IesnBjsbgKmgoJu8lNlqtpwjyonv+6lqA6NkONYXorHhYJPiz26WfeOoG++x6moOUEK 4xycUpjZkoZd+RsdIQ432URp/zGBNmSNUnF0tAPHMMYN2CRscljKyKqTQNsbdE/cOXjRyv pADsWfBODoqfuTdjAwo072CotYZEouiNc6UuFEUA77iOlxlwUCgMnSc+uzaXNul7jZqH0I f3g7c1TFL2XCfTmo5STKxI03pF4PwAsYj8KrmGnQN8beWQoVFaB6YlOlZu0kwVwYC/GN0N efmUV6wxfHER4dtMBFmO8IEuzBre1kpUGgUPcQFPHk1zVcF+WyRwMku4RFy/6L4CAQGZUJ 66/GeGHJ6kA/vi+E5ZMTrGl6d9KWEXVB7PjFoVhnHFO7hDzWMid8w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1607379740; 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=p3Mr1x55Y+fYi7NHasGG0WBRt4BlfS1cyZuRTRt6log=; b=+JxInekWab4903magQOde73UHkiAACfvK74CsI0Fi9H9gAJ5Q5+fZ/2fWYlaPUl1INcJkH F2yweLgnJesK5nDg== To: pacman-dev@archlinux.org Date: Mon, 7 Dec 2020 22:19:56 +0000 Message-Id: <20201207221956.667322-24-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 23/23] doc: remove old libalpm man file 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 --- doc/libalpm.3.asciidoc | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 doc/libalpm.3.asciidoc diff --git a/doc/libalpm.3.asciidoc b/doc/libalpm.3.asciidoc deleted file mode 100644 index 79ea5409..00000000 --- a/doc/libalpm.3.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -libalpm(3) -========== - -Name ----- -libalpm - Arch Linux Package Management (ALPM) library - - -Synopsis --------- -For ease of access, the libalpm manual has been split up into several sections. - -*TODO:* Yes, this man page needs a lot of work. Once we get around to doing -good Doxygen documentation, it will improve. We promise. - -*alpm_databases*:: Database Functions -*alpm_interface*:: Interface Functions -*alpm_list*:: List Functions -*alpm_log*:: Logging Functions -*alpm_misc*:: Miscellaneous Functions -*alpm_packages*:: Package Functions -*alpm_sync*:: Sync Functions -*alpm_trans*:: Transaction Functions - - -Configuration -------------- -See linkman:pacman.conf[5] for more details on configuring libalpm using the -'pacman.conf' file. - - -See Also --------- -linkman:alpm-hooks[5], linkman:makepkg[8], linkman:pacman[8], -linkman:pacman.conf[5] - -include::footer.asciidoc[]