From unknown Sat Jun 14 19:06:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28056 <28056@debbugs.gnu.org> To: bug#28056 <28056@debbugs.gnu.org> Subject: Status: Substitution doing global when it should not. Reply-To: bug#28056 <28056@debbugs.gnu.org> Date: Sun, 15 Jun 2025 02:06:08 +0000 retitle 28056 Substitution doing global when it should not. reassign 28056 sed submitter 28056 Techwolf Lupindo severity 28056 normal tag 28056 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 16:14:43 2017 Received: (at submit) by debbugs.gnu.org; 11 Aug 2017 20:14:43 +0000 Received: from localhost ([127.0.0.1]:56040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgGKR-0000oe-Ae for submit@debbugs.gnu.org; Fri, 11 Aug 2017 16:14:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgGAK-0000ag-BB for submit@debbugs.gnu.org; Fri, 11 Aug 2017 16:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgGAD-0005TE-NL for submit@debbugs.gnu.org; Fri, 11 Aug 2017 16:04:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgGAD-0005T2-Jl for submit@debbugs.gnu.org; Fri, 11 Aug 2017 16:04:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgGAB-0005jD-PF for bug-sed@gnu.org; Fri, 11 Aug 2017 16:04:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgGAA-0005R0-4o for bug-sed@gnu.org; Fri, 11 Aug 2017 16:04:07 -0400 Received: from mail-vk0-x232.google.com ([2607:f8b0:400c:c05::232]:35770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgGA9-0005Pu-Uc for bug-sed@gnu.org; Fri, 11 Aug 2017 16:04:06 -0400 Received: by mail-vk0-x232.google.com with SMTP id d124so16941780vkf.2 for ; Fri, 11 Aug 2017 13:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=XiflI9IOr1CoMQdPt8XpkO5kKr+KBf5Fb1UjhWZ8yDc=; b=EGT3DSPPDzoVbrfWhqO7+5iTH9+eo3fw2zl5dRPRKMwFgPmV1DF1VBTjN2HMKyAshd d5FnyQw97K/jegyCwpHoYhsjLxII3Vz+TtyYd9qmdNu9Kfc4D5gwBAY9/Hyd1rl7MzAe XKUFl5zjfA52VrEIXcr2V6MsCbULvX/FWGapZX18tf/xod82jjuHWLr4/IQgEvh+EROO BA58mQ1UoGOUVZr8Fs8D+iXf5tvteQLne0CmCJdIPIVJzGk+5Jl71tx1Dyz81XOb4pWu K4gArTkdfwdQJ3ppbKUil8pQted/gUbTXZ1B9SXdX8tKl4ZTPQ72cMGp4Wp/pmZR+z4E KUMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XiflI9IOr1CoMQdPt8XpkO5kKr+KBf5Fb1UjhWZ8yDc=; b=iGrPY7S8WzezCbcw5P83wn+HlmN0ovaYLsKt7A724cMuwuDqx5o9MS3pIGfjtWSZld rCFxYUpZ2j4xTUkAeGeI8fUjjSYHcssWb66DpSpz3usxl/Rh4aujF11uKLXZUvNor7ng Acc4//jPUPCDabSe07Zfhz6S3LjkRLqDHHl2+USkAFaog0A2AtsY0446IRelkrgxWP6f +pfHF8D9FiyJNakc+LeaZHUhVlyRM/ol+eE/jpJ9U77lx2iS+hvs+GGXer+iXe9MGSVM Wj4OOD+sA8cFWMAdZ8NoMdN4xzslPnRqvtMGlYcvfupDj2QAloo0cCF4tT/OU0F/HoMk i9yQ== X-Gm-Message-State: AHYfb5hX9QkP4dqJJy6Ul2+igrXBSzlwp8aQwsdqFr3Yz3nzB/+l0nNv o4oFK/UCe64sIY4gTwB8qBP0qXpDDQPu X-Received: by 10.31.227.6 with SMTP id a6mr8313458vkh.15.1502481843536; Fri, 11 Aug 2017 13:04:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.48.207 with HTTP; Fri, 11 Aug 2017 13:04:03 -0700 (PDT) From: Techwolf Lupindo Date: Fri, 11 Aug 2017 16:04:03 -0400 Message-ID: Subject: Substitution doing global when it should not. To: bug-sed@gnu.org Content-Type: multipart/alternative; boundary="001a114da98090cac905567fd0b1" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 11 Aug 2017 16:14:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a114da98090cac905567fd0b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable techwolf@laptop ~/test $ sed --version sed (GNU sed) 4.4 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Jay Fenlason, Tom Lord, Ken Pizzini, and Paolo Bonzini. GNU sed home page: . General help using GNU software: . E-mail bug reports to: . techwolf@laptop ~/test $ wget " https://hg.phoenixviewer.com/phoenix-firestorm-lgpl/raw-file/9d58c58cca90/i= ndra/cmake/BuildVersion.cmake " 2017-08-11 15:39:45 (38.2 MB/s) - =E2=80=98BuildVersion.cmake=E2=80=99 save= d [3605/3605] techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > BuildVersion1.cmake techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake > BuildVersion2.cmake techwolf@laptop ~/test $ diff -u BuildVersion1.cmake BuildVersion2.cmake techwolf@laptop ~/test $ diff -u BuildVersion.cmake BuildVersion1.cmake --- BuildVersion.cmake 2017-08-11 15:39:45.639970357 -0400 +++ BuildVersion1.cmake 2017-08-11 15:40:47.646763237 -0400 @@ -25,10 +25,10 @@ # building an earlier revision. Instead, we use # "hg identify -n" to get the local revision number # of the actual state of the repository. - #COMMAND ${MERCURIAL} log -r tip:0 --template '\\n' + #COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR} log -r tip:0 --template '\\n' #COMMAND ${WORDCOUNT} -l #COMMAND ${SED} "s/ //g" - COMMAND ${MERCURIAL} identify -n + COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR} identify -= n COMMAND ${SED} "s/+//" # [CR] Strip off any + from the revision number OUTPUT_VARIABLE VIEWER_VERSION_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE The only difference in the sed commands was s/// and s///g. The diff between BuildVersion1.cmake and BuildVersion2.cmake should had one change. But sed is matching two lines without the s///g. All docs I have read says that without 'g', only the first match is changed. However, this is not in my case and was not notice for over two years due to my build script not breaking. I only notice this bug when I was doing some code cleanup and scratching my head as to why my build script was not breaking when in theory, it should had an error printed when hg could not see the repo. --001a114da98090cac905567fd0b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
techwolf@laptop ~/test $ sed --version
sed = (GNU sed) 4.4
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
=
There is NO WARRANTY, to the extent permitted by law.

Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paol= o Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General h= elp using GNU software: <http://= www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.


<snipped> =C2=A0=C2=A0

2017-08-11 15:39= :45 (38.2 MB/s) - =E2=80=98BuildVersion.cmake=E2=80=99 saved [3605/3605]

techwolf@laptop ~/test $ sed -e 's:CO= MMAND ${MERCURIAL}:COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' Bui= ldVersion.cmake > BuildVersion1.cmake
techwolf@laptop ~/test $= sed -e 's:COMMAND ${MERCURIAL}:COMMAND ${MERCURIAL} --cwd ${CMAKE_SOUR= CE_DIR}:g' BuildVersion.cmake > BuildVersion2.cmake
techwo= lf@laptop ~/test $ diff -u BuildVersion1.cmake BuildVersion2.cmake
techwolf@laptop ~/test $ diff -u BuildVersion.cmake BuildVersion1.cmake
--- BuildVersion.cmake =C2=A02017-08-11 15:39:45.639970357 -0400
+++ BuildVersion1.cmake 2017-08-11 15:40:47.646763237 -0400
<= div>@@ -25,10 +25,10 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 # =C2=A0 =C2=A0 =C2=A0 =C2=A0 building an earlier rev= ision. Instead, we use
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 # =C2=A0 =C2=A0 =C2=A0 =C2=A0 "hg identify -n&quo= t; to get the local revision number
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # =C2=A0 =C2=A0 =C2=A0 =C2=A0 of the act= ual state of the repository.
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 #COMMAND ${MERCURIAL} log -r tip:0 --template '\\= n'
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = #COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR} log -r tip:0 --template = 9;\\n'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 #COMMAND ${WORDCOUNT} -l
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #COMMAND ${SED} "s/ //g"
=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 COMMAND ${ME= RCURIAL} identify -n
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 COMMAND ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR} identify -n
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 COMM= AND ${SED} "s/+//" =C2=A0 =C2=A0 =C2=A0 =C2=A0# [CR] Strip off an= y + from the revision number
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 OUTPUT_VARIABLE VIEWER_VERSION_REVISION
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 OUTPUT_ST= RIP_TRAILING_WHITESPACE

The only difference = in the sed commands was s/// and s///g. The diff between BuildVersion1.cmak= e and BuildVersion2.cmake should had one change. But sed is matching two li= nes without the s///g. All docs I have read says that without 'g', = only the first match is changed. However, this is not in my case and was no= t notice for over two years due to my build script not breaking. I only not= ice this bug when I was doing some code cleanup and scratching my head as t= o why my build script was not breaking when in theory, it should had an err= or printed when hg could not see the repo.
--001a114da98090cac905567fd0b1-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 18:39:39 2017 Received: (at control) by debbugs.gnu.org; 11 Aug 2017 22:39:39 +0000 Received: from localhost ([127.0.0.1]:56095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgIah-00047I-0c for submit@debbugs.gnu.org; Fri, 11 Aug 2017 18:39:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgIad-00046y-KN; Fri, 11 Aug 2017 18:39:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77ABA2C9727; Fri, 11 Aug 2017 22:39:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 77ABA2C9727 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com Received: from [10.10.120.43] (ovpn-120-43.rdu2.redhat.com [10.10.120.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEEC060176; Fri, 11 Aug 2017 22:39:27 +0000 (UTC) Subject: Re: bug#28056: Substitution doing global when it should not. To: Techwolf Lupindo , 28056-done@debbugs.gnu.org References: From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> Date: Fri, 11 Aug 2017 17:39:27 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OxsIlIFvnV5MREvTE608tMmF7iTsXReoV" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 11 Aug 2017 22:39:29 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OxsIlIFvnV5MREvTE608tMmF7iTsXReoV Content-Type: multipart/mixed; boundary="TPI1Wd9nXoC8AOabQ2wibAqqQBPo9fOaI"; protected-headers="v1" From: Eric Blake To: Techwolf Lupindo , 28056-done@debbugs.gnu.org Message-ID: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> Subject: Re: bug#28056: Substitution doing global when it should not. References: In-Reply-To: --TPI1Wd9nXoC8AOabQ2wibAqqQBPo9fOaI Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable tag 28056 notabug thanks On 08/11/2017 03:04 PM, Techwolf Lupindo wrote: > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > > BuildVersion1.cmake > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake > > BuildVersion2.cmake >=20 > The only difference in the sed commands was s/// and s///g. Which tells sed whether to make one substitution on every affected line, or as many substitutions as possible on every affected line. But the number of affected lines remains unchanged for the two variants. > The diff > between BuildVersion1.cmake and BuildVersion2.cmake should had one chan= ge. Rather, one change per affected line. > But sed is matching two lines without the s///g. All docs I have read s= ays > that without 'g', only the first match is changed. Only the first match per line - but when both lines affected only had one match per line, there's no difference in using the 'g' flag. If you want sed to stop processing as soon as it has changed one line, rather than going on to look for additional affected lines, you can do so= : sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd ${CMAKE_SOURCE_DIR}: ; q }' which says find the first line that matches the pattern, and on that line make the substitution and immediately quit. Since sed is behaving as documented, I'm closing this as not a bug; however, feel free to add further comments to this thread if you need followup clarification. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --TPI1Wd9nXoC8AOabQ2wibAqqQBPo9fOaI-- --OxsIlIFvnV5MREvTE608tMmF7iTsXReoV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmOMh8ACgkQp6FrSiUn Q2oQxQf+JUu0K+YQt3Al6mzvYq8yMea9MiCBPxLG2GcpaquOglo3oD9r8uwURQ4C DBBB3is53C8fRXaonjfegZhHP0Dv3SPDXSEmKwqdtDb+rr5PN3g+URmaFkANYhoI 2WF+pD00u69v7G4pVB+bILgiGx1WWyF2k8BJnBsyJJUvS2F/FeYmZTg4RHyPLcl4 JDIN7HNJ1sVsD5pkybOzJPgMe5QNu1NU8m7VoEoJ9yjwty5tXdC6KIv+l5+9EzSs QeLZ9RQ+X+TN11z22vnUT7p9NO0pXhtj0B+aMu7fetZtRz6lpgFZMetf+GcEs7fN AMffPVkhXj59/xC0Utq9dPQXXQrsEQ== =PLxO -----END PGP SIGNATURE----- --OxsIlIFvnV5MREvTE608tMmF7iTsXReoV-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 22:20:55 2017 Received: (at 28056-done) by debbugs.gnu.org; 12 Aug 2017 02:20:55 +0000 Received: from localhost ([127.0.0.1]:56181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgM2p-0004JD-20 for submit@debbugs.gnu.org; Fri, 11 Aug 2017 22:20:55 -0400 Received: from mail-ua0-f181.google.com ([209.85.217.181]:36401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgM1o-0004HL-II for 28056-done@debbugs.gnu.org; Fri, 11 Aug 2017 22:19:53 -0400 Received: by mail-ua0-f181.google.com with SMTP id k43so21325293uaf.3 for <28056-done@debbugs.gnu.org>; Fri, 11 Aug 2017 19:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aasqfgpStKyy3M0p+80DjCNF7OuNs4CsV6vr/ewTJp8=; b=tC18aG4TQX7Pbs+hsurdREXyGbAsYLbPeOgfElDgOdflpLigIK/y2iFVnhTNMgF50b ajudga15JjoDo8myI059UrPK/h6UVMD49uyBMlDJQekrgfQJ2bRikieEaqtHOen9FLp2 V4McdUHUtIQyO/eSq0aIvudHT0VtqwqCCHamsEr9+VsQ7ei9ijjMK8gZQant6S83/2VO VLGPriYAGe7Ioi/bKK0pz7LI+/+duxUuT442p8T5leqH+rjq3F1yMCFJC7xxGgrw7jIn D5ixPhkx7HmCZqG1Gx3nzb5Lb0s8qDoZ5tTWqu/ZCpoJAzPPy32WvKrYiq0ZE4pOAQJp z/bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aasqfgpStKyy3M0p+80DjCNF7OuNs4CsV6vr/ewTJp8=; b=r7jSPQd259PuZ9pkmlKdf6fk0sVpXEMcvA6tgdq90FCSN5ZNhmeMuJ90fOnfDamnQG +UiEkhvTpO/7SzzhL9eLrv+LgtHr3eVhV6FombDFrvDOJvA1uEbcOB/DcmkV8PpKXnTD W/atj9gRLJMxiskPWpk7DKX5enN90nm1551A8bMrty5Fu6XGe3b85L+HUT4kXBGygqjT 6KMKA6S7FV8Tb0fa99BWj/zbdYODUS21xiW4p5dqmlpxm7szq3Yu022FUCXmb6XpZ+KL dOJ7OfqKpYSeC+mKp47WVkb1k0Tn2TQ8WYnBVeElh26mTpqaQNRJkyAc4RUNr9s+tWCy x/PQ== X-Gm-Message-State: AHYfb5hd2lw3qN8HEsT/zGc9NU++a2NG3vooMJ6e+mTmENoP+Y8dY31n 5knkfbTiNX8spxosT3Ta5DspmcWReQ== X-Received: by 10.159.60.171 with SMTP id s43mr14000056uai.47.1502504386855; Fri, 11 Aug 2017 19:19:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.48.207 with HTTP; Fri, 11 Aug 2017 19:19:46 -0700 (PDT) In-Reply-To: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> References: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> From: Techwolf Lupindo Date: Fri, 11 Aug 2017 22:19:46 -0400 Message-ID: Subject: Re: bug#28056: Substitution doing global when it should not. To: Eric Blake Content-Type: multipart/alternative; boundary="f403045eef9440885a0556851073" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28056-done X-Mailman-Approved-At: Fri, 11 Aug 2017 22:20:53 -0400 Cc: 28056-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --f403045eef9440885a0556851073 Content-Type: text/plain; charset="UTF-8" The docs say: g Apply the replacement to all matches to the regexp, not just the first. Nothing in the docs say it will matches all lines in the input, wither piped or file inplace. Doc bug? On Fri, Aug 11, 2017 at 6:39 PM, Eric Blake wrote: > tag 28056 notabug > thanks > > On 08/11/2017 03:04 PM, Techwolf Lupindo wrote: > > > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > > > BuildVersion1.cmake > > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake > > > BuildVersion2.cmake > > > > > > The only difference in the sed commands was s/// and s///g. > > Which tells sed whether to make one substitution on every affected line, > or as many substitutions as possible on every affected line. But the > number of affected lines remains unchanged for the two variants. > > > The diff > > between BuildVersion1.cmake and BuildVersion2.cmake should had one > change. > > Rather, one change per affected line. > > > But sed is matching two lines without the s///g. All docs I have read > says > > that without 'g', only the first match is changed. > > Only the first match per line - but when both lines affected only had > one match per line, there's no difference in using the 'g' flag. > > If you want sed to stop processing as soon as it has changed one line, > rather than going on to look for additional affected lines, you can do so: > > sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd > ${CMAKE_SOURCE_DIR}: ; q }' > > which says find the first line that matches the pattern, and on that > line make the substitution and immediately quit. > > Since sed is behaving as documented, I'm closing this as not a bug; > however, feel free to add further comments to this thread if you need > followup clarification. > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3266 > Virtualization: qemu.org | libvirt.org > > --f403045eef9440885a0556851073 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The docs say:
g
Apply the replacement t= o all matches to the regexp, not just the first.

=
Nothing in the docs say it will matches all lines in the input, wither= piped or file inplace. Doc bug?

=
On Fri, Aug 11, 2017 at 6:39 PM, Eric Blake <eb= lake@redhat.com> wrote:
tag= 28056 notabug
thanks

On 08/11/2017 03:04 PM, Techwolf Lupindo wrote:

> techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > > BuildVersion1.cmake
> techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake ><= br> > BuildVersion2.cmake


>
> The only difference in the sed commands was s/// and s///g.

Which tells sed whether to make one substitution on every affected line, or as many substitutions as possible on every affected line.=C2=A0 But the<= br> number of affected lines remains unchanged for the two variants.

> The diff
> between BuildVersion1.cmake and BuildVersion2.cmake should had one cha= nge.

Rather, one change per affected line.

> But sed is matching two lines without the s///g. All docs I have read = says
> that without 'g', only the first match is changed.

Only the first match per line - but when both lines affected only had
one match per line, there's no difference in using the 'g' flag= .

If you want sed to stop processing as soon as it has changed one line,
rather than going on to look for additional affected lines, you can do so:<= br>
sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd
${CMAKE_SOURCE_DIR}: ; q }'

which says find the first line that matches the pattern, and on that
line make the substitution and immediately quit.

Since sed is behaving as documented, I'm closing this as not a bug;
however, feel free to add further comments to this thread if you need
followup clarification.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+1-919-301-3266
Virtualization:=C2=A0 qemu.org | libvirt.org


--f403045eef9440885a0556851073-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 12 14:12:47 2017 Received: (at 28056-done) by debbugs.gnu.org; 12 Aug 2017 18:12:47 +0000 Received: from localhost ([127.0.0.1]:57539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgatz-0004Xa-1s for submit@debbugs.gnu.org; Sat, 12 Aug 2017 14:12:47 -0400 Received: from mail-vk0-f46.google.com ([209.85.213.46]:33743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgakI-0004TB-2Q for 28056-done@debbugs.gnu.org; Sat, 12 Aug 2017 14:02:46 -0400 Received: by mail-vk0-f46.google.com with SMTP id j189so22130155vka.0 for <28056-done@debbugs.gnu.org>; Sat, 12 Aug 2017 11:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uYWX9zgBZrBP6PqECpMSskTWzc1kpe6dJC2YOEZIBow=; b=XU5HPQ02oRxuENPIpgAG/kuqlPWeBC0M87xlCP6UH57spLllDfF3T5EGDsMGiswPx8 kOvCUmVnTHp08rcrN4/r3xj8K7+8tTFJ4KI5Eh3ZN3NqeyG/QD/XvXz9vGU75f5avAsw xZ1BBAzSc+Dyly/9NSkQnGuuXhA+n6Z4wJwGYRVHijL3lMvhcFTm0BYHSHQDsD/H3BM6 yWPRyVHLu3XQxApkgYhLZZdspzOMsN7ukqAHJ9negKs34X4Njtboo1RkASpLGwvlS8ur Tutz2zNqEm8shYodQpx/AqieN7kB3+02GKQawPatyy8OV1v9XpzsBlPberNbjjhCi7x3 Q6bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uYWX9zgBZrBP6PqECpMSskTWzc1kpe6dJC2YOEZIBow=; b=DkZ9mEbs4JpeD19QQRfSl6OaBLXq39TgkzjN8BNqhhensCKpl+FM38kQbydfit0SQ2 SxySDJfmiSFHnLMdoKj8WB9icKvTGnjZfKhEJXERtVsJdGz8NDusWJT9p0Nu19dC135J QsEqQSJDOQEooHAee7B8BkCvjNS6R6mYUL/3O5MjUhAVSYOoLM9R5b6T1CsCXYvVGPaB VoOt+FL1qgmi/12k28cw1bjv+rKNNwxJWuNYM2qoFkoXDm69yTa12yIfyfcITdk9ASn7 I/cju3YpJQb1woOpCCczkrohBEZi7Sp35GII9ecWeTS5/ri02GOaS8NjN1iOcKG5Dnz8 JZDg== X-Gm-Message-State: AHYfb5gYCisNu0QD+e1SmvUfYOjzkImtgKqj+IL2yetWvx3uHD/xHQNO Mk1DGZjM+E8+ylp3ANd4CISFxASegg== X-Received: by 10.31.107.66 with SMTP id g63mr12611169vkc.76.1502560959306; Sat, 12 Aug 2017 11:02:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.48.207 with HTTP; Sat, 12 Aug 2017 11:02:38 -0700 (PDT) In-Reply-To: References: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> From: Techwolf Lupindo Date: Sat, 12 Aug 2017 14:02:38 -0400 Message-ID: Subject: Re: bug#28056: Substitution doing global when it should not. To: Eric Blake Content-Type: multipart/alternative; boundary="001a11478fea3ba38f0556923c24" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28056-done X-Mailman-Approved-At: Sat, 12 Aug 2017 14:12:45 -0400 Cc: 28056-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a11478fea3ba38f0556923c24 Content-Type: text/plain; charset="UTF-8" A followup. I tried the command you hinted at. The result was the first match and substitution was done, but the rest of the file was deleted. This is using sed -i -e. On Fri, Aug 11, 2017 at 10:19 PM, Techwolf Lupindo < techwolf.lupindo@gmail.com> wrote: > The docs say: > g > Apply the replacement to all matches to the regexp, not just the first. > > Nothing in the docs say it will matches all lines in the input, wither > piped or file inplace. Doc bug? > > On Fri, Aug 11, 2017 at 6:39 PM, Eric Blake wrote: > >> tag 28056 notabug >> thanks >> >> On 08/11/2017 03:04 PM, Techwolf Lupindo wrote: >> >> > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND >> > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > >> > BuildVersion1.cmake >> > techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND >> > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake > >> > BuildVersion2.cmake >> >> >> > >> > The only difference in the sed commands was s/// and s///g. >> >> Which tells sed whether to make one substitution on every affected line, >> or as many substitutions as possible on every affected line. But the >> number of affected lines remains unchanged for the two variants. >> >> > The diff >> > between BuildVersion1.cmake and BuildVersion2.cmake should had one >> change. >> >> Rather, one change per affected line. >> >> > But sed is matching two lines without the s///g. All docs I have read >> says >> > that without 'g', only the first match is changed. >> >> Only the first match per line - but when both lines affected only had >> one match per line, there's no difference in using the 'g' flag. >> >> If you want sed to stop processing as soon as it has changed one line, >> rather than going on to look for additional affected lines, you can do so: >> >> sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd >> ${CMAKE_SOURCE_DIR}: ; q }' >> >> which says find the first line that matches the pattern, and on that >> line make the substitution and immediately quit. >> >> Since sed is behaving as documented, I'm closing this as not a bug; >> however, feel free to add further comments to this thread if you need >> followup clarification. >> >> -- >> Eric Blake, Principal Software Engineer >> Red Hat, Inc. +1-919-301-3266 >> Virtualization: qemu.org | libvirt.org >> >> > --001a11478fea3ba38f0556923c24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A followup. I tried the command you hinted at. The result = was the first match and substitution was done, but the rest of the file was= deleted. This is using sed -i -e.

On Fri, Aug 11, 2017 at 10:19 PM, Techwolf Lupindo <= span dir=3D"ltr"><techwolf.lupindo@gmail.com> wrote:
The docs say:
g
App= ly the replacement to all matches to the regexp, not just the first.
<= /div>

Nothing in the docs say it will matches all lines = in the input, wither piped or file inplace. Doc bug?

On Fri, Aug 11, 2017 at 6:39 PM, Eric Blake = <eblake@redhat.co= m> wrote:
tag 28056 notabug=
thanks

On 08/11/2017 03:04 PM, Techwolf Lupindo wrote:

> techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:' BuildVersion.cmake > > BuildVersion1.cmake
> techwolf@laptop ~/test $ sed -e 's:COMMAND ${MERCURIAL}:COMMAND > ${MERCURIAL} --cwd ${CMAKE_SOURCE_DIR}:g' BuildVersion.cmake ><= br> > BuildVersion2.cmake


>
> The only difference in the sed commands was s/// and s///g.

Which tells sed whether to make one substitution on every affected line, or as many substitutions as possible on every affected line.=C2=A0 But the<= br> number of affected lines remains unchanged for the two variants.

> The diff
> between BuildVersion1.cmake and BuildVersion2.cmake should had one cha= nge.

Rather, one change per affected line.

> But sed is matching two lines without the s///g. All docs I have read = says
> that without 'g', only the first match is changed.

Only the first match per line - but when both lines affected only had
one match per line, there's no difference in using the 'g' flag= .

If you want sed to stop processing as soon as it has changed one line,
rather than going on to look for additional affected lines, you can do so:<= br>
sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd
${CMAKE_SOURCE_DIR}: ; q }'

which says find the first line that matches the pattern, and on that
line make the substitution and immediately quit.

Since sed is behaving as documented, I'm closing this as not a bug;
however, feel free to add further comments to this thread if you need
followup clarification.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+1-919-301-3266 Virtualization:=C2=A0 qemu.org | libvirt.org



--001a11478fea3ba38f0556923c24-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 12 21:52:16 2017 Received: (at 28056-done) by debbugs.gnu.org; 13 Aug 2017 01:52:16 +0000 Received: from localhost ([127.0.0.1]:59033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgi4e-0002a8-BG for submit@debbugs.gnu.org; Sat, 12 Aug 2017 21:52:16 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:35471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgi4c-0002a2-Ec for 28056-done@debbugs.gnu.org; Sat, 12 Aug 2017 21:52:14 -0400 Received: by mail-io0-f176.google.com with SMTP id m88so30238434iod.2 for <28056-done@debbugs.gnu.org>; Sat, 12 Aug 2017 18:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+4gljB3wxqJSUzMD0dvwfqM3AP2FQPtOIJ1/kX/r6N8=; b=pdjdjh0Enz6zN+VwufDkiCncaUrU31YoLH1cC3UOsHINYwWaG0RBtLYZQowxW5CXq9 48ZGB+s1apB/O2yNoygLnKbc+aFV5BkVwUIpu7ySjyyAZLnkv+gdztLBnEjuLKGy918R 4g4wMBIpajQ3viuVqphTj4MtHf7TbZsv7JLtL/5GJygN4qrne+lLE6b6GqvQiMjWrROF ZuIM9nmRQgcbkxivr17IjotINDar4ngW34beMPtTEsgN7wObDyNGk61Lx2o8bJWNo912 L61BWzkNQCC5uytIX0wM+uMwEX1NCxGCw3+Jn0+HEDovx+D55SRVey3d4c3NvpDuQRTx oQUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+4gljB3wxqJSUzMD0dvwfqM3AP2FQPtOIJ1/kX/r6N8=; b=c8yLHBX8bEzk3HHd66mPcBcK20Oci7wD3DUyN9L/OdfMVScjy1KfTEkNmosOTHUvyo +WATFxa/+KzsNUwSsaxdmlxVaynL/ZMwAT6r0Mc/RKifxFx/3DqzyDOd64PfxxWhYHlZ BA1oLGa9UNo8TOOh15Ug5DfBJBZCPYvJL3/Lu+YeVmH0fLmWRCvRwTmlLC1gpA/WeroQ RI9+VYUMP+JU0aaN0EoyAJPMuV58kRO9Z5szsry1EQ8ON+C1WFX9XW5xHJW3D/5Oao48 sIBTrvLlI+9lUKcMWA13Y8EgYcXKZ/SOjeus5BGBou53cLxo7h35nzQOqxaMIpRMRV9D h9kg== X-Gm-Message-State: AHYfb5jlV3QW9v+Gs8PYWQazmOE4lrNq1rek1zuQST0c/Ycwdn+NNgLh raY+xyhxY+rdVyJ8Da0= X-Received: by 10.107.38.131 with SMTP id m125mr15478851iom.29.1502589128544; Sat, 12 Aug 2017 18:52:08 -0700 (PDT) Received: from [192.168.88.253] (S010664777daa62d3.cg.shawcable.net. [70.72.44.2]) by smtp.gmail.com with ESMTPSA id t8sm1348163ite.12.2017.08.12.18.52.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 18:52:07 -0700 (PDT) Subject: Re: bug#28056: Substitution doing global when it should not. To: Techwolf Lupindo , Eric Blake References: <14992939-44ab-198e-ffe3-7dff54063871@redhat.com> From: Assaf Gordon Message-ID: <921321b9-d30c-dd7e-c2c5-b2d848bc053f@gmail.com> Date: Sat, 12 Aug 2017 19:51:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 28056-done Cc: 28056-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Hello, On 12/08/17 12:02 PM, Techwolf Lupindo wrote: > A followup. I tried the command you hinted at. The result was the first > match and substitution was done, but the rest of the file was deleted. This > is using sed -i -e. If you want to operate on just the first matching line, you can use the following sed method: printf "%s\n" a b c d a b c d | sed '/b/ { s/b/X/ ; :Y ; n ; bY }' The sed program does the following: /b/ - match *any* line that contains 'b' { ... } - sed commands grouped together, will be executed when the current line matches 'b' s/b/X/ - replace the first occurrence of 'b' with 'X' . :Y - a label called 'Y' (arbitrary name) n - read the next line and print it bY - jump (=branch) to label Y Effectively, the first time a line contains 'b' matches the regex, sed will perform one replacement, and then enter an endless loop of reading/printing the lines, without executing any other sed commands (and thus, not matching other 'b' lines and not performing replacements). Expanding Eric's suggestion, your sed command might look like: sed -e '/COMMAND ${MERCURIAL}/ { s::COMMAND ${MERCURIAL} -- cwd ${CMAKE_SOURCE_DIR}: ; :Y ; n; bY }' Also, When experimenting with sed commands, I'd recommend not using "-i" (in-place replacements) - this could lead to data loss if your sed command isn't working as expected, and you don't have a backup. Lastly, For quick-and-dirty manual sed replacements of single lines, you can find the exact line number and replace just it. Example: $ wget https://hg....file/9d58c58cca90/indra/cmake/BuildVersion.cmake $ grep -n 'COMMAND ${MERCURIAL}' BuildVersion.cmake 28: #COMMAND ${MERCURIAL} log -r tip:0 --template '\\n' 31: COMMAND ${MERCURIAL} identify -n And then assuming you want to change only line 28, use a specific and even shorter sed command: sed '28s/}/} --cwd ${CMAKE_SOURCE_DIR} /' BuildVersion.cmake The '28s/.../.../' tells sed to perform the 's' command only on line 28. Hope this helps, regards, - assaf From unknown Sat Jun 14 19:06:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Sep 2017 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator