Bug#832901: apt: "apt upgrade -s" tries to remove a file
rOn Fri, Jul 29, 2016 at 04:11:19PM +0200, Vincent Lefevre wrote:
> On 2016-07-29 16:03:46 +0200, Julian Andres Klode wrote:
> > Control: severity -1 minor
> >
> > On Fri, Jul 29, 2016 at 03:41:37PM +0200, Vincent Lefevre wrote:
> > > Package: apt
> > > Version: 1.3~pre2
> > > Severity: grave
> > > Justification: causes non-serious data loss
> > > (well, not when run as a normal user, but it would when run as root)
> >
> > Not really, no.
>
> What do you mean?
>
> I've tried as root and got a change in its size:
>
> root@cventin:/home/vlefevre# ls -l /var/log/apt/eipp.log.xz
> -rw-r--r-- 1 root root 94376 2016-07-29 14:57:13 /var/log/apt/eipp.log.xz
> root@cventin:/home/vlefevre# apt upgrade -s
> [...]
> root@cventin:/home/vlefevre# ls -l /var/log/apt/eipp.log.xz
> -rw-r--r-- 1 root root 94456 2016-07-29 16:07:57 /var/log/apt/eipp.log.xz
Read the rest of the email. It's fairly obvious. This file contains
the latest scenario. You could argue that we should use a temporary
file name and then rename() to the final location instead of unlink()
+ open(), but that also has the *huge* disadvantage of cluttering up
your file system if you're careless. Doing unlink() first is probably
a sane choice here, given that it's a log file logging exactly one
scenario, and not multiple one (that is, it stores no history).
--
Debian Developer - deb.li/jak | jak-linux.org - free software dev
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to (`inline'). Thank you.
Reply to: