Fix the unexpand

This commit is contained in:
Lubomir Rintel 2016-02-11 17:56:10 +01:00
parent 5440a2d9db
commit 593569e76b
2 changed files with 67 additions and 1 deletions

View File

@ -0,0 +1,60 @@
From lkundrak@v3.sk Thu Jan 28 20:57:48 2016
Return-Path: lkundrak@v3.sk
Received: from zimbra.v3.sk (LHLO zimbra.v3.sk) (10.13.37.31) by
zimbra.v3.sk with LMTP; Thu, 28 Jan 2016 20:57:48 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix)
with ESMTP id D4DD260F92 for <lkundrak@v3.sk>; Thu, 28 Jan 2016 20:57:47
+0100 (CET)
X-Spam-Flag: NO
X-Spam-Score: -2.9
X-Spam-Level:
X-Spam-Status: No, score=-2.9 tagged_above=-10 required=3
tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk
[127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HB5H5ynfOcyL; Thu, 28
Jan 2016 20:57:45 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix)
with ESMTP id 3FEF160F90; Thu, 28 Jan 2016 20:57:45 +0100 (CET)
X-Virus-Scanned: amavisd-new at zimbra.v3.sk
Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk
[127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TUF9p5l6r9SN; Thu, 28
Jan 2016 20:57:44 +0100 (CET)
Received: from odvarok.localdomain (s559633cb.adsl.online.nl
[85.150.51.203]) by zimbra.v3.sk (Postfix) with ESMTPSA id 6763560F8F; Thu,
28 Jan 2016 20:57:44 +0100 (CET)
From: Lubomir Rintel <lkundrak@v3.sk>
To: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik@redhat.com>, Ondrej
Oprala <ooprala@redhat.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH] unexpand: fix blank line handling
Date: Thu, 28 Jan 2016 20:57:22 +0100
Message-Id: <1454011042-30492-1-git-send-email-lkundrak@v3.sk>
X-Mailer: git-send-email 2.5.0
X-Evolution-Source: 1409576065.5421.4@dhcp-24-163.brq.redhat.com
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0
echo '' |./src/unexpand -a
Really?
---
src/unexpand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/unexpand.c b/src/unexpand.c
index d6ff662..762c56b 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -304,7 +304,7 @@ unexpand (void)
next_tab_column = column;
tab_index -= !!tab_index;
}
- else
+ else if (!mb_iseq (c, '\n'))
{
column += mb_width (c);
if (!column)
--
2.5.0

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.25
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
@ -45,6 +45,8 @@ Patch800: coreutils-i18n.patch
Patch801: coreutils-i18n-expand-unexpand.patch
# (sb) lin18nux/lsb compliance - cut
Patch802: coreutils-i18n-cut.patch
# The unexpand patch above is not correct. Sent to the patch authors
Patch803: coreutils-i18n-fix-unexpand.patch
#getgrouplist() patch from Ulrich Drepper.
Patch908: coreutils-getgrouplist.patch
@ -175,6 +177,7 @@ including documentation and translations.
%patch800 -p1 -b .i18n
%patch801 -p1 -b .i18n-expand
%patch802 -p1 -b .i18n-cut
%patch803 -p1 -b .i18n-fix-expand
# Coreutils
%patch908 -p1 -b .getgrouplist
@ -346,6 +349,9 @@ fi
%license COPYING
%changelog
* Thu Feb 11 2016 Lubomir Rintel <lkundrak@v3.sk> - 8.25-3
- Fix a regression in unexpand empty line handling
* Thu Jan 21 2016 Ondrej Vasik <ovasik@redhat.com> - 8.25-2
- Adjust the i18n patch for coreutils-8.25
- add new base32 binary