[From nobody Wed May 27 08:51:06 2026
Received: (at submit) by bugs.debian.org; 26 Apr 2026 11:30:28 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-119.2 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
 DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,HAS_PACKAGE,SPF_HELO_NONE,
 SPF_NONE,UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,X_DEBBUGS_CC
 autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 16; hammy, 109; neutral, 28; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;sanvila@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:36178)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;sanvila@debian.org&gt;) id 1wGxgy-0039MS-0W
 for submit@bugs.debian.org; Sun, 26 Apr 2026 11:30:28 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Content-Transfer-Encoding:Content-Type
 :Subject:From:To:MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=j0djEb1EnaTf2xsOKmo+imbyb33xXQgn+jCFsnXCRbE=; b=l7/bABkIm8sB5g132TYRlT86OT
 Ab5dzF5S8/k/CDqZ/Z0GaU943tebWVQG+tJ+BCKqWJuBG9bwi06b87uj0ub4x/WcYbMRKTSz9baNb
 l/GEUyB5V1C6aUUsvFDWHbCS1kwouyc3xx5jwVt20c5Wj6Nnif2JlqrcF1ZS2BFXM7yD9GD4slmVq
 k8Rws5H0jorMCO84xT6d+JO3Kss0Gfk2TE6avaidUrj+oCxWPf93xAoPTK0iY7v9nQoTteeT/Tzhg
 DzlYG16q+waHtHKGis2eDwjqUuyCkxY6jNgvniJs1BewWbqQdIpQl6TfggtoRK4IoLBZPS5+PmoT/
 feAqQa5w==;
Received: from authenticated user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128)
 (Exim 4.96) (envelope-from &lt;sanvila@debian.org&gt;) id 1wGxgw-004gMl-1l
 for submit@bugs.debian.org; Sun, 26 Apr 2026 11:30:26 +0000
Message-ID: &lt;4beb90da-ed80-46e9-b3ba-ed10be16e0fa@debian.org&gt;
Date: Sun, 26 Apr 2026 13:30:25 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
X-Debbugs-Cc: sanvila@debian.org
To: Debian BTS &lt;submit@bugs.debian.org&gt;
From: Santiago Vila &lt;sanvila@debian.org&gt;
Subject: routine-update: implementation of check for optional/extra priorities
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Debian-User: sanvila
Delivered-To: submit@bugs.debian.org

Package: routine-update
Version: 0.2.4
Tags: patch

Hello again.

Related with my previous report, I think the check itself is wrong:

if grep -q -e '^Priority:.*optional' -e '^Priority:.*extra' debian/control ; then
   sed -i '/^Priority/d' debian/control

Using such code, this is what it happens: if the control file contains any package
of optional or extra priorities, then all priority fields will be removed,
including, if any, standard, required or important, not what we really want.

I believe the check should be like this instead:

if ! grep '^Priority:' debian/control | grep -q -v -e 'optional' -e 'extra'; then

i.e. if *all* priorities are optional or extra, then remove all priority fields.

Thanks.
]