Message ID | 20180218171736.4473-1-lukeshu@lukeshu.com |
---|---|
Headers | show
Return-Path: <arch-projects-bounces@archlinux.org> Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 684E521DE33B for <patchwork@archlinux.org>; Sun, 18 Feb 2018 17:17:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-BL-Results: <dns:70.91.198.88.list.dnswl.org> [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for <patchwork@archlinux.org>; Sun, 18 Feb 2018 17:17:53 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 829E18C7A6B8B; Sun, 18 Feb 2018 17:17:48 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Sun, 18 Feb 2018 17:17:46 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 878322B043; Sun, 18 Feb 2018 17:17:46 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=none Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id B896F2B042 for <arch-projects@lists.archlinux.org>; Sun, 18 Feb 2018 17:17:44 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for <arch-projects@lists.archlinux.org>; Sun, 18 Feb 2018 17:17:44 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id F0AF88C7A6B72 for <arch-projects@archlinux.org>; Sun, 18 Feb 2018 17:17:39 +0000 (UTC) Received: from mav.lukeshu.com (mav.lukeshu.com [IPv6:2001:19f0:5c00:8069:5400:ff:fe26:6a86]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for <arch-projects@archlinux.org>; Sun, 18 Feb 2018 17:17:39 +0000 (UTC) Received: from build64-par (unknown [IPv6:2601:803:202:9275:da50:e6ff:fe00:4a5b]) by mav.lukeshu.com (Postfix) with ESMTPSA id BA7EB80502 for <arch-projects@archlinux.org>; Sun, 18 Feb 2018 12:17:37 -0500 (EST) From: Luke Shumaker <lukeshu@lukeshu.com> To: arch-projects@archlinux.org Date: Sun, 18 Feb 2018 12:17:28 -0500 Message-Id: <20180218171736.4473-1-lukeshu@lukeshu.com> X-Mailer: git-send-email 2.16.1 Subject: [arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Arch Linux projects development discussion <arch-projects.archlinux.org> List-Unsubscribe: <https://lists.archlinux.org/options/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=unsubscribe> List-Archive: <https://lists.archlinux.org/pipermail/arch-projects/> List-Post: <mailto:arch-projects@archlinux.org> List-Help: <mailto:arch-projects-request@archlinux.org?subject=help> List-Subscribe: <https://lists.archlinux.org/listinfo/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=subscribe> Reply-To: Arch Linux projects development discussion <arch-projects@archlinux.org> Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" <arch-projects-bounces@archlinux.org> |
From: Luke Shumaker <lukeshu@parabola.nu> This incorporates and improves on work from 3 previously submitted patch sets: 1. My testcase patch, but - take Eli's suggestion to simplify db-update.bats - add another commit so we don't hit a bug in BATS 2. Renaming PKGEXT->PKGEXT_glob from my first fix patchset 3. Eli's fix/extglob patchset, but - re-order things between commits - also accept ".tar" (with no compression suffix) - use `old_pkgs=()` instead of `unset old_pkgs` - replace `[ -ge 1]` with `(( > 0 ))` instead of `(( > 1 ))` - db-update: use `readarray < <(... | sort -u)` instead of the O(n^2) op of using in_array in a for loop and appending to the array - common.bash, sourceballs.bats: update to work with shopt -s extglob nullglob globstar; the tests needed updated too, not just the main code The last 3 commits aren't really related to the goal of the patchset, but I wanted to include all of the work from Eli's fix patchset. I don't mean to take credit away from Eli by re-working his patches (I credit him in the commit messages); I just wanted to make it clearer what is accomplished by each change, and how each of the changes relate to our goals; as well as actually testing each of them against the test suite. Luke Shumaker (8): test: common.bash:__getCheckSum: Don't rely on IFS test: db-update: @test "update same any package to same repository fails": change PKGEXT config: Rename PKGEXT to PKGEXT_glob Correctly treat PKGEXT_glob as a glob config: let PKGEXT_glob be an extglob; have its value match makepkg ftpdir-cleanup: fix typo in a comment ("pacakge") Replace all instances of `find` command with bash globbing ftpdir-cleanup, sourceballs: swap out [ -ge 1 ] for (( > 0 )) config | 4 +++- cron-jobs/ftpdir-cleanup | 24 ++++++++++++++++++------ cron-jobs/sourceballs | 20 +++++++++++++++----- db-functions | 12 ++++++++++-- db-move | 4 ++-- db-update | 16 ++++++++++------ test/cases/db-repo-add.bats | 6 +++--- test/cases/db-update.bats | 5 +++-- test/cases/ftpdir-cleanup.bats | 4 ++-- test/cases/sourceballs.bats | 4 ++-- test/lib/common.bash | 21 ++++++++++++++++----- 11 files changed, 84 insertions(+), 36 deletions(-)