Debian Bug report logs - #654690
/usr/bin/rst2html: don't overwrite (non .html files) by default

version graph

Package: python-docutils; Maintainer for python-docutils is Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>; Source for python-docutils is src:python-docutils.

Reported by: Karl Goetz <karl@kgoetz.id.au>

Date: Thu, 5 Jan 2012 09:57:02 UTC

Severity: normal

Found in version python-docutils/0.7-2

Forwarded to http://sourceforge.net/p/docutils/feature-requests/36/

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#654690; Package python-docutils. (Thu, 05 Jan 2012 09:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Goetz <karl@kgoetz.id.au>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 05 Jan 2012 09:57:09 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Karl Goetz <karl@kgoetz.id.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/bin/rst2html: don't overwrite (non .html files) by default
Date: Thu, 05 Jan 2012 20:54:58 +1100
Package: python-docutils
Version: 0.7-2
Severity: normal
File: /usr/bin/rst2html


Hi,
Please require an option before rst2html will overwrite an existing
file. I just ran 'rst2html *ipv6*.rst' without realising i had two files
containing ipv6 in the name. The second file was turned into html, and
its rst contents lost.
I thought about tagging this grave (data loss), but thought that might
be a bit over the top.
thanks,
kk


-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-docutils depends on:
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-roman            0.7-2            module for generating/analyzing Ro
ii  python-support          1.0.10           automated rebuilding support for P

Versions of packages python-docutils recommends:
ii  libpaper-utils          1.1.24           library for handling paper charact
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-imaging          1.1.7-2          Python Imaging Library
ii  python-lxml             2.2.8-2          pythonic binding for the libxml2 a
ii  python-pygments         1.3.1+dfsg-1     syntax highlighting package writte

Versions of packages python-docutils suggests:
pn  texlive-lang-french           <none>     (no description available)
ii  texlive-latex-base            2009-11    TeX Live: Basic LaTeX packages
ii  texlive-latex-recommended     2009-11    TeX Live: LaTeX recommended packag

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#654690; Package python-docutils. (Thu, 05 Jan 2012 21:03:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 05 Jan 2012 21:03:10 GMT) Full text and rfc822 format available.

Message #10 received at 654690@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: Karl Goetz <karl@kgoetz.id.au>, 654690@bugs.debian.org
Subject: Re: Bug#654690: /usr/bin/rst2html: don't overwrite (non .html files) by default
Date: Thu, 5 Jan 2012 22:00:45 +0100
* Karl Goetz <karl@kgoetz.id.au>, 2012-01-05, 20:54:
>Please require an option before rst2html will overwrite an existing 
>file. I just ran 'rst2html *ipv6*.rst' without realising i had two 
>files containing ipv6 in the name. The second file was turned into 
>html, and its rst contents lost.

Overwriting the output file is the behaviour some people (including me) 
rely on. You said "(non .html files)" in the subject, but how would 
docutils decide if the output file is a ".html file" or not?

-- 
Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#654690; Package python-docutils. (Thu, 05 Jan 2012 23:24:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Goetz <karl@kgoetz.id.au>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 05 Jan 2012 23:24:03 GMT) Full text and rfc822 format available.

Message #15 received at 654690@bugs.debian.org (full text, mbox):

From: Karl Goetz <karl@kgoetz.id.au>
To: Jakub Wilk <jwilk@debian.org>
Cc: 654690@bugs.debian.org
Subject: Re: Bug#654690: /usr/bin/rst2html: don't overwrite (non .html files) by default
Date: Fri, 6 Jan 2012 10:20:54 +1100
[Message part 1 (text/plain, inline)]
On Thu, 5 Jan 2012 22:00:45 +0100
Jakub Wilk <jwilk@debian.org> wrote:

> * Karl Goetz <karl@kgoetz.id.au>, 2012-01-05, 20:54:
> >Please require an option before rst2html will overwrite an existing
> >>file. I just ran 'rst2html *ipv6*.rst' without realising i had two
> >>>files containing ipv6 in the name. The second file was turned into
> >>>>html, and its rst contents lost.
> 
> Overwriting the output file is the behaviour some people (including
> me) rely on. You said "(non .html files)" in the subject, but how

I'm sure, it wouldn't behave that way if no one wanted it to do so.
fwiw, an option to say 'ask before overwriting' would suite me just as
well (ala cp/mv with -i).

> would docutils decide if the output file is a ".html file" or not?

I assumed by its mime type.
thanks,
kk

-- 
Karl Goetz, (Kamping_Kaiser / VK7FOSS)
http://www.kgoetz.id.au
No, I won't join your social networking group
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#654690; Package python-docutils. (Thu, 05 Jan 2012 23:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Goetz <karl@kgoetz.id.au>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 05 Jan 2012 23:24:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#654690; Package python-docutils. (Fri, 15 Mar 2013 22:51:09 GMT) Full text and rfc822 format available.

Message #23 received at 654690@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: Karl Goetz <karl@kgoetz.id.au>, 654690@bugs.debian.org
Subject: Re: Bug#654690: /usr/bin/rst2html: don't overwrite (non .html files) by default
Date: Fri, 15 Mar 2013 23:48:33 +0100
Control: forwarded -1 http://sourceforge.net/p/docutils/feature-requests/36/

* Karl Goetz <karl@kgoetz.id.au>, 2012-01-05, 20:54:
>Please require an option before rst2html will overwrite an existing 
>file. I just ran 'rst2html *ipv6*.rst' without realising i had two 
>files containing ipv6 in the name. The second file was turned into 
>html, and its rst contents lost.

One way to avoid such accidents is to use stdin redirects:

$ ls *ipv6*.rst
baripv6.rst  fooipv6.rst

$ rst2html < *ipv6*.rst
bash: *ipv6.rst: ambiguous redirect

(This works in bash, other shells may behave differently.)

But anyway, I forwarded the bug upstream.

-- 
Jakub Wilk



Set Bug forwarded-to-address to 'http://sourceforge.net/p/docutils/feature-requests/36/'. Request was from Jakub Wilk <jwilk@debian.org> to 654690-submit@bugs.debian.org. (Fri, 15 Mar 2013 22:51:09 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 01:09:19 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.