From patchwork Sun Jan 13 19:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Johannes_L=C3=B6thberg?= X-Patchwork-Id: 945 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 2EA3EA87ABEF for ; Sun, 13 Jan 2019 19:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on apollo X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00=-1,DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-BL-Results: [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Sun, 13 Jan 2019 19:25:36 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id C0AD7FF6798C4; Sun, 13 Jan 2019 19:25:29 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Sun, 13 Jan 2019 19:25:29 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id AC6442BE9D; Sun, 13 Jan 2019 19:25:29 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=pass (1024-bit key) header.d=kyriasis.com header.i=@kyriasis.com header.b=ZsO6lnsU Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 875202BE8A for ; Sun, 13 Jan 2019 19:25:26 +0000 (UTC) Received: from theos.kyriasis.com (theos.kyriasis.com [IPv6:2a01:7e00:e000:136::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sun, 13 Jan 2019 19:25:26 +0000 (UTC) Received: from theos.kyriasis.com (localhost [127.0.0.1]) by theos.kyriasis.com (OpenSMTPD) with ESMTP id 1b8cb3a8 for ; Sun, 13 Jan 2019 19:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=kyriasis.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=theos; bh=8GHqmbBI2lH GCJcuh+L8DRPUt4M=; b=ZsO6lnsUEtGI1gJWN5WQ6+c7rk07e7nmeMWyherE8T5 QOARqiESPWDz+hwcklQbB/vmtscTRG5ncrgCnPSR9Qp5ldjZEw3QZgAHSEvKdCS5 GpobI1IOmigQTqAvKOiPWn9NK9EsdDKQJFBBJ7H37GbhLyqgyfsL0X4Klwk0X19g = DomainKey-Signature: a=rsa-sha1; c=nofws; d=kyriasis.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=theos; b=Xesmx JVKkA+Qe59gzobE18g9x5eDZ5ln3BDdt2zVL+tNlVcBYcwnhsWu30LzqtKkwmat9 3EIv14SGmeNawSROSQO8iXVdKVgNRTx8tsZ3LxatC6x4mTeNMm+FWucn949PRcrS G1VckuAxT/f7w+NKeODfQXYGBHrzF8ZawOTqPo= Received: from hydrogen.kyriasis.com (h-52-10.A572.priv.bahnhof.se [158.174.52.10]) by theos.kyriasis.com (OpenSMTPD) with ESMTPSA id 68348d4b (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 13 Jan 2019 19:25:26 +0000 (UTC) From: =?utf-8?q?Johannes_L=C3=B6thberg?= To: pacman-contrib@lists.archlinux.org Subject: [PATCHv2 1/2] doc: Add pacsort manpage Date: Sun, 13 Jan 2019 20:25:23 +0100 Message-Id: <20190113192524.25914-1-johannes@kyriasis.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190113191757.24638-1-johannes@kyriasis.com> References: <20190113191757.24638-1-johannes@kyriasis.com> MIME-Version: 1.0 X-BeenThere: pacman-contrib@lists.archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for pacman-contrib development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Johannes_L=C3=B6thberg?= Errors-To: pacman-contrib-bounces@lists.archlinux.org Sender: "pacman-contrib" Signed-off-by: Johannes Löthberg --- doc/Makefile.am | 4 ++++ doc/pacsort.8.txt | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 doc/pacsort.8.txt diff --git a/doc/Makefile.am b/doc/Makefile.am index 8705e71..d5e33ab 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,6 +7,7 @@ ASCIIDOC_MANS = \ checkupdates.8 \ paccache.8 \ pacdiff.8 \ + pacsort.8 \ pactree.8 \ updpkgsums.8 @@ -14,6 +15,7 @@ HTML_MANPAGES = \ checkupdates.8.html \ paccache.8.html \ pacdiff.8.html \ + pacsort.8.html \ pactree.8.html \ updpkgsums.8.html @@ -30,6 +32,7 @@ EXTRA_DIST = \ checkupdates.8.txt \ paccache.8.txt \ pacdiff.8.txt \ + pacsort.8.txt \ pactree.8.txt \ updpkgsums.8.txt \ footer.txt \ @@ -110,6 +113,7 @@ checkupdates.8 checkupdates.8.html: checkupdates.8.txt paccache.8 paccache.8.html: paccache.8.txt pacdiff.8 pacdiff.8.html: pacdiff.8.txt pactree.8 pactree.8.html: pactree.8.txt +pacsort.8 pacsort.8.html: pacsort.8.txt updpkgsums.8 updpkgsums.8.html: updpkgsums.8.txt # vim:set noet: diff --git a/doc/pacsort.8.txt b/doc/pacsort.8.txt new file mode 100644 index 0000000..357664d --- /dev/null +++ b/doc/pacsort.8.txt @@ -0,0 +1,55 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us: +///// +pacsort(8) +========= + +Name +---- +pacsort - sort utility implementing alpm_pkg_vercmp + + +Synopsis +-------- +'pacsort' [options] [files...] + + +Description +----------- +'pacsort' concatenates the given files, sorts them, and writes them to standard +output. Default order is oldest to newest. + +Standard input is read when no files are given. + +By default the lines are treated as lists of plain version strings. + + +Options +------- +*-f, \--files*:: + If the input lists are in the format '\*-*.pkg.tar*', sort lines by pkgname and pkgver. + +*-h, \--help*:: + Display syntax and command line options. + +*-k, \--key *:: + Sort the input starting on the specified column. + +*-r, \--reverse*:: + Sort in reverse order. + +*-t, \--separator *:: + Field separator. Default separator is space. + +*-v, \--version*: + Display the version. + +*-z, \--null*:: + Lines end with null bytes rather than newlines. + + +See Also +-------- +linkman:pacman[8], linkman:vercmp[8] + +include::footer.txt[] From patchwork Sun Jan 13 19:25:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Johannes_L=C3=B6thberg?= X-Patchwork-Id: 946 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 4C74AA87ABF8 for ; Sun, 13 Jan 2019 19:25:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on apollo X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00=-1,DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_LOW=-0.7 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-BL-Results: [127.0.9.1] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Sun, 13 Jan 2019 19:25:40 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id CECB6FF679962; Sun, 13 Jan 2019 19:25:34 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Sun, 13 Jan 2019 19:25:34 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id B98F82BE9D; Sun, 13 Jan 2019 19:25:34 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=pass (1024-bit key) header.d=kyriasis.com header.i=@kyriasis.com header.b=cmW0vfNy Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 5C9B12BEA0 for ; Sun, 13 Jan 2019 19:25:33 +0000 (UTC) Received: from theos.kyriasis.com (theos.kyriasis.com [IPv6:2a01:7e00:e000:136::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sun, 13 Jan 2019 19:25:33 +0000 (UTC) Received: from theos.kyriasis.com (localhost [127.0.0.1]) by theos.kyriasis.com (OpenSMTPD) with ESMTP id 31168a86 for ; Sun, 13 Jan 2019 19:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=kyriasis.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=theos; bh=D9YpHJY2FcK dG93T7lNUO0D2C68=; b=cmW0vfNywQvzlQMK0k1qGv4XzX54wItRQ1uJflAJU25 le9SWof6fLZRJUAygcWdEx3R4XW9BLE4cLnNkKeTb7j8s+bEKx2mA6zGZIQlieHQ 9pVr6/qXKf3joMNbW/8YaEHG0Xk8hFWqu41I3n2JdTg+YACH85sXHNKIZX//VdpQ = DomainKey-Signature: a=rsa-sha1; c=nofws; d=kyriasis.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=theos; b=EYV45 NYC9GqgyvAbmaxuBDNLAOK6rF0JAcybg84tCAoTuhbnLfAgQt8HuNRoa0KxKAGep zEDOhDQngkA7gQdV9ogrZEWlVYJnn+6CiT8hwCdiXFRIiUHfY25ltoScsc1wJ5rQ wKbM3s6bZZjuhHc50jdp7DzCrIaT2cO1WvzkTk= Received: from hydrogen.kyriasis.com (h-52-10.A572.priv.bahnhof.se [158.174.52.10]) by theos.kyriasis.com (OpenSMTPD) with ESMTPSA id 0e9b5bee (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 13 Jan 2019 19:25:31 +0000 (UTC) From: =?utf-8?q?Johannes_L=C3=B6thberg?= To: pacman-contrib@lists.archlinux.org Subject: [PATCH 2/2] pacsort: Make fnmatch more lenient to allow everything makepkg allows Date: Sun, 13 Jan 2019 20:25:24 +0100 Message-Id: <20190113192524.25914-2-johannes@kyriasis.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190113192524.25914-1-johannes@kyriasis.com> References: <20190113191757.24638-1-johannes@kyriasis.com> <20190113192524.25914-1-johannes@kyriasis.com> MIME-Version: 1.0 X-BeenThere: pacman-contrib@lists.archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for pacman-contrib development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Johannes_L=C3=B6thberg?= Errors-To: pacman-contrib-bounces@lists.archlinux.org Sender: "pacman-contrib" Signed-off-by: Johannes Löthberg --- src/pacsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacsort.c b/src/pacsort.c index 3a9fe9c..e9e49e3 100644 --- a/src/pacsort.c +++ b/src/pacsort.c @@ -213,7 +213,7 @@ static struct input_t *input_new(const char *path, int pathlen) return NULL; } - in->is_file = fnmatch("*-*.pkg.tar.?z", in->data, 0) == 0; + in->is_file = fnmatch("*-*.pkg.tar*", in->data, 0) == 0; if(!in->is_file) { return in; }