Bug#343578: dpkg: delete available-new when 'No space left on device'

2019-03-02 Thread Guillem Jover
Hi!

On Fri, 2005-12-16 at 11:42:02 +0100, A Mennucc wrote:
> Package: dpkg
> Version: 1.13.11.0.1
> Severity: normal

> did you ever ran out of disk space while installing/upgrading packages?
> When the dreaded message  "dpkg: . No space left on device" appears,
> you readily know it is time for a coffe and 25 minutes of messy
> hacking in your Debian box.
> 
> apt-get (and aptitude for that matter) are no help: they will
> stubbornly insist on reinstalling the last package that failed ("hey
> APT, guess what...  since it failed, it will not succeed next time
> around" ; unfortunately Super Cows do not have good ears :-) )
> 
> While you are cursing APT and the relatives, dpkg is not helping
> either: whenever it fails, it will leave two nice huge files around,
> /var/lib/dpkg/status-new and /var/lib/dpkg/available-new . Those two
> files are carefully designed to fill out your / device up to the last
> byte, so that any following command you issue will fail choking.
> 
> So here is my letter to Santa Bug: dear Santa, I promise I will be a
> better hacker next year (yes, I know I should not replace obnoxious
> sounds into my wife favourite videogames); but, pleeease, when 'dpkg'
> fails while writing /var/lib/dpkg/status-new and
> /var/lib/dpkg/available-new , could it also delete them?

dpkg does not write to these files by default anymore for some time
now. Some commands use it because that's their entire purpose, others
can be told to optionally use it (such as dpkg-query).

I don't think removing the -new file is a good idea, as that's
required to generate the new available file. If you are so short on
disk that this fails, and the available file is required then you
really need to free up space in the system.

What I can do, though I stop generating a backup for the available
file, as that's information that should be easy to regenerate and
there's no big loss if the available file gets damaged or disappears.
Targetting this change for 1.20.x.

Thanks,
Guillem



Bug#343578: dpkg: delete available-new when 'No space left on device'

2005-12-16 Thread A Mennucc
Package: dpkg
Version: 1.13.11.0.1
Severity: normal

hi

did you ever ran out of disk space while installing/upgrading packages?
When the dreaded message  dpkg: . No space left on device appears,
you readily know it is time for a coffe and 25 minutes of messy
hacking in your Debian box.

apt-get (and aptitude for that matter) are no help: they will
stubbornly insist on reinstalling the last package that failed (hey
APT, guess what...  since it failed, it will not succeed next time
around ; unfortunately Super Cows do not have good ears :-) )

While you are cursing APT and the relatives, dpkg is not helping
either: whenever it fails, it will leave two nice huge files around,
/var/lib/dpkg/status-new and /var/lib/dpkg/available-new . Those two
files are carefully designed to fill out your / device up to the last
byte, so that any following command you issue will fail choking.

So here is my letter to Santa Bug: dear Santa, I promise I will be a
better hacker next year (yes, I know I should not replace obnoxious
sounds into my wife favourite videogames); but, pleeease, when 'dpkg'
fails while writing /var/lib/dpkg/status-new and
/var/lib/dpkg/available-new , could it also delete them?

a.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-k7
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages dpkg depends on:
ii  coreutils [textutils] 5.2.1-2.1  The GNU core utilities
ii  libc6 2.3.5-8GNU C Library: Shared libraries an

dpkg recommends no packages.

-- no debconf information

-- 
Andrea Mennucc
 E' un mondo difficile. Che vita intensa! (Tonino Carotone)


signature.asc
Description: Digital signature