[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#231994: marked as done (ls adds newline before first directory header)



Your message dated Mon, 08 Mar 2004 12:17:07 -0500
with message-id <E1B0ONH-0006FS-00@newraff.debian.org>
and subject line Bug#231994: fixed in busybox-cvs 20040306-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Feb 2004 05:20:54 +0000
>From kraai@lafn.org Mon Feb 09 21:20:54 2004
Return-path: <kraai@lafn.org>
Received: from zoot.lafn.org [206.117.18.6] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AqQKL-00005A-00; Mon, 09 Feb 2004 21:20:54 -0800
Received: from catalunya (host-66-81-24-68.rev.o1.com [66.81.24.68])
	by zoot.lafn.org (8.12.3p3/8.12.3) with ESMTP id i1A5Kl5O095467
	for <submit@bugs.debian.org>; Mon, 9 Feb 2004 21:20:48 -0800 (PST)
	(envelope-from kraai@lafn.org)
Received: from kraai by catalunya with local (Exim 3.36 #1 (Debian))
	id 1AqQLd-00009Q-00
	for <submit@bugs.debian.org>; Mon, 09 Feb 2004 21:22:13 -0800
Date: Mon, 9 Feb 2004 21:22:12 -0800
From: Matt Kraai <kraai@ftbfs.org>
To: submit@bugs.debian.org
Subject: ls adds newline before first directory header
Message-ID: <20040210052212.GA464@catalunya>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="aM3YZ0Iwxop3KEKx"
Content-Disposition: inline
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Matt Kraai <kraai@lafn.org>
X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p'
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_02_01 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no 
	version=2.60-bugs.debian.org_2004_02_01
X-Spam-Level: 


--aM3YZ0Iwxop3KEKx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: busybox-cvs
Version: 20040101-6
Tags: patch

ls prints a newline before the first directory header:

 $ mkdir /tmp/foo
 $ busybox ls /tmp/foo

 /tmp/foo:
 $ exit

but it should be omitted.  The attached patch makes it do so.

-- 
Matt Kraai            kraai@ftbfs.org            http://ftbfs.org/

--aM3YZ0Iwxop3KEKx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

--- busybox-cvs-20040101/coreutils/ls.c.orig	2004-02-09 17:21:27.000000000 -0800
+++ busybox-cvs-20040101/coreutils/ls.c	2004-02-09 17:21:33.000000000 -0800
@@ -532,7 +532,7 @@
 }
 
 /*----------------------------------------------------------------------*/
-static void showdirs(struct dnode **dn, int ndirs)
+static void showdirs(struct dnode **dn, int ndirs, int first)
 {
 	int i, nfiles;
 	struct dnode **subdnp;
@@ -547,7 +547,10 @@
 
 	for (i = 0; i < ndirs; i++) {
 		if (all_fmt & (DISP_DIRNAME | DISP_RECURSIVE)) {
-			printf("\n%s:\n", dn[i]->fullname);
+			if (!first)
+				printf("\n");
+			first = 0;
+			printf("%s:\n", dn[i]->fullname);
 		}
 		subdnp = list_dir(dn[i]->fullname);
 		nfiles = countfiles(subdnp);
@@ -566,7 +569,7 @@
 #ifdef CONFIG_FEATURE_LS_SORTFILES
 					shellsort(dnd, dndirs);
 #endif
-					showdirs(dnd, dndirs);
+					showdirs(dnd, dndirs, 0);
 					free(dnd);	/* free the array of dnode pointers to the dirs */
 				}
 			}
@@ -1084,7 +1087,7 @@
 #ifdef CONFIG_FEATURE_LS_SORTFILES
 			shellsort(dnd, dndirs);
 #endif
-			showdirs(dnd, dndirs);
+			showdirs(dnd, dndirs, dnfiles == 0);
 		}
 	}
 	return (status);

--aM3YZ0Iwxop3KEKx--

---------------------------------------
Received: (at 231994-close) by bugs.debian.org; 8 Mar 2004 17:23:07 +0000
>From katie@ftp-master.debian.org Mon Mar 08 09:23:07 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1B0OT5-0004pM-00; Mon, 08 Mar 2004 09:23:07 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1B0ONH-0006FS-00; Mon, 08 Mar 2004 12:17:07 -0500
From: Bastian Blank <waldi@debian.org>
To: 231994-close@bugs.debian.org
X-Katie: $Revision: 1.44 $
Subject: Bug#231994: fixed in busybox-cvs 20040306-1
Message-Id: <E1B0ONH-0006FS-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Mon, 08 Mar 2004 12:17:07 -0500
Delivered-To: 231994-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_08 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=no 
	version=2.60-bugs.debian.org_2004_03_08
X-Spam-Level: 

Source: busybox-cvs
Source-Version: 20040306-1

We believe that the bug you reported is fixed in the latest version of
busybox-cvs, which is due to be installed in the Debian FTP archive:

busybox-cvs-floppy-udeb_20040306-1_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs-floppy-udeb_20040306-1_i386.udeb
busybox-cvs-static_20040306-1_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs-static_20040306-1_i386.deb
busybox-cvs-udeb_20040306-1_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs-udeb_20040306-1_i386.udeb
busybox-cvs_20040306-1.diff.gz
  to pool/main/b/busybox-cvs/busybox-cvs_20040306-1.diff.gz
busybox-cvs_20040306-1.dsc
  to pool/main/b/busybox-cvs/busybox-cvs_20040306-1.dsc
busybox-cvs_20040306-1_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs_20040306-1_i386.deb
busybox-cvs_20040306.orig.tar.gz
  to pool/main/b/busybox-cvs/busybox-cvs_20040306.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 231994@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastian Blank <waldi@debian.org> (supplier of updated busybox-cvs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 23 Feb 2004 13:22:38 +0100
Source: busybox-cvs
Binary: busybox-cvs-static busybox-cvs busybox-cvs-udeb busybox-cvs-floppy-udeb
Architecture: source i386
Version: 20040306-1
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Bastian Blank <waldi@debian.org>
Description: 
 busybox-cvs - Tiny utilities for small and embedded systems
 busybox-cvs-floppy-udeb - Tiny utilities for the debian-installer floppy images (udeb)
 busybox-cvs-static - Standalone rescue shell with tons of builtin utilities
 busybox-cvs-udeb - Tiny utilities for the debian-installer (udeb)
Closes: 231994 234130
Changes: 
 busybox-cvs (20040306-1) unstable; urgency=low
 .
   * New CVS version
     - Fix directory header in ls. (closes: #231994)
     - wget checks for empty *_proxy. (closes: #234130)
   * debian/config-*:
     - Update.
Files: 
 b9ec9577c045ec741d5a2e14a487bcb9 793 - optional busybox-cvs_20040306-1.dsc
 2fca05e675f94187cc2880dab45bab4c 1321054 - optional busybox-cvs_20040306.orig.tar.gz
 5bab68292ef4eeee78ba9cbd31b227b6 141990 - optional busybox-cvs_20040306-1.diff.gz
 a9d96e50e21b8c25984f2a1f46bf60ca 663310 shells optional busybox-cvs-static_20040306-1_i386.deb
 495bf0192eb239da33d65e30eed8b985 124092 utils optional busybox-cvs_20040306-1_i386.deb
 f624f029aaffbc91c567d84f7ce50ed9 135978 debian-installer extra busybox-cvs-udeb_20040306-1_i386.udeb
 f23c25b04951ee22fa021220e3780bb3 59064 debian-installer extra busybox-cvs-floppy-udeb_20040306-1_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iEYEARECAAYFAkBMpG4ACgkQLkAIIn9ODhHLjQCgoXYghS5NNenRkrGNMfypkpe/
YAMAoJjcwc45IOjAdDlnmAJMyFWa0FZ3
=mdqw
-----END PGP SIGNATURE-----



Reply to: