From patchwork Thu Jun 10 08:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490236 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G0xSg3GkBz9sWQ; Thu, 10 Jun 2021 18:08:51 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk7-0000DY-AJ; Thu, 10 Jun 2021 08:08:47 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrFk2-0000Aj-M8 for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:42 +0000 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk2-0004CQ-Bq for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:42 +0000 Received: by mail-wm1-f71.google.com with SMTP id u17-20020a05600c19d1b02901af4c4deac5so2751095wmq.7 for ; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e1ZP0q+JfKHACamlVnk1tRjQZcafIp0HTJju9JQEIqA=; b=Y73gHYUc2oemMuwujvPPdDB4WvT9Xkr5eain/flfr249FMvqe/yWS4Z6r17/FoRaj2 KGm92PP0Om6A0OsicG94JPiVtMiKN3J354K/bXdMLZhbB90DV/CUhGhC7bMEbdzH7XDF hVBIJ0mErl4tDwpIzGxnOtBzfCYy2nfG4YlunhwtR0iuUJDsuLMpYvBCIVR4uQT+pt3R 95aAWM6vJN9tOIH6fuSp84Dxw3VYfB+hR6srRmDslKjkKAB//nBwyKjyhRYzao0nePzp XHEb2bMb0pOOBynn8SDKYbbUDJI3RQU+tRVvwCGMV1DdF2/ie1Dv1004Cnypxo6sAZh4 /2xQ== X-Gm-Message-State: AOAM530eIlfkrvU0VeknM35A25aF8bvLhttaQSSKUVgcrfGv4bNOxDrR TO7/QapIwjDHdKU+qPmxQgLcmEPvlOfUJNB0Grb+pc14xAXAoIT1u9jogK44FX6+dl44AACQVBb DkNXTgDt7vjFb0hlUCDIlkFI3ZZxgMRXp8o8TBfxdmg== X-Received: by 2002:a5d:6147:: with SMTP id y7mr3879463wrt.418.1623312522055; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYbvYLHYMGAJtqQCY9rIbu7ZJAqHGkLtOF91tasSWqAg/8rdYQD+xFkahyNNoFxJa4J5vykg== X-Received: by 2002:a5d:6147:: with SMTP id y7mr3879444wrt.418.1623312521821; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:41 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 3/5] UBUNTU: [Packaging] module-check: Handle current/new ABI modules directory Date: Thu, 10 Jun 2021 10:08:05 +0200 Message-Id: <20210610080807.25518-4-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The previous commits converted the ABI from a single modules file to a directory containing per-module files. Handle that for the current/new ABI. Signed-off-by: Juerg Haefliger --- debian/scripts/module-check | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/scripts/module-check b/debian/scripts/module-check index c754ea368cfb..2e31045f834f 100755 --- a/debian/scripts/module-check +++ b/debian/scripts/module-check @@ -13,9 +13,9 @@ if (-f "$prev_abidir/ignore.modules" exit(0); } -if (not -f "$abidir/$flavour.modules" or not -f +if (not -d "$abidir/$flavour.modules" or not -f "$prev_abidir/$flavour.modules") { - print "previous or current modules file missing!\n"; + print "previous or current modules file/directory missing!\n"; print " $abidir/$flavour.modules\n"; print " $prev_abidir/$flavour.modules\n"; if (defined($skipmodule)) { @@ -52,10 +52,11 @@ if (-f "$prev_abidir/../modules.ignore") { # Read new modules first print " reading new modules..."; $new_count = 0; -open(NEW, "< $abidir/$flavour.modules") or - die "Could not open $abidir/$flavour.modules"; -while () { +opendir(NEW, "$abidir/$flavour.modules") or + die "Could not open directory $abidir/$flavour.modules"; +while (readdir NEW) { chomp; + next if /^\./; # Ignore '.' and '..' $modules{$_} = 1; $new_count++; }