savelog man page incorrect

Bug #555960 reported by jimav
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debianutils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: debianutils

The file-renaming algorithm described in the savelog(8) man page seems to be incorrect.
Currently the man page says:

   "Version cycle-2 is moved to version cycle-3, version cycle-1 is moved to version cycle-2 , and so on.
   Finally version 0 is moved to version 1, and version cycle is deleted. "

...which would never work ('cycle' is the max number of versions kept, from the -c option).
Presumably the program FIRST deletes version 'cycle', then moves cycle-1 to cycle, then moves cycle-2 to cycle-1 etc.

For example, imagine that option -c 3 is given so that cycle==3; then the description then would mean:

    "Version 1 is moved to version 0, version 2 is moved to version 1, and so on.
    Finally version 0 is moved to version 1, and version 3 is deleted.

...which would clobber the previous version 2.

ProblemType: Bug
Architecture: amd64
Date: Mon Apr 5 12:28:55 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: fglrx
Package: debianutils 2.30ubuntu3
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-21.59-generic
SourcePackage: debianutils
Uname: Linux 2.6.31-21-generic x86_64

Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
Maarten Bezemer (veger) wrote :

It seems that the manpage is updated already (checked version 4.0.2 and 4.2.1), but still not completely correct.

    Version numbered files are cycled. Version file.2 is moved to version file.3, version file.1 is
    moved to version file.2, and so on. Finally version file.0 is moved to version file.1, and version
    file is deleted. Both compressed names and uncompressed names are cycled, regardless of -l. Miss‐
    ing version files are ignored.

I would say:

    Version numbered files are cycled. Version file.cycle is deleted. Version file.cycle-1 is moved to
    version file.cycle, version file.cycle-2 is moved to version file.cycle-1, and so on. Finally version file.0 is
    moved to version file.1. Both compressed names and uncompressed names are cycled, regardless of -l.
    Missing version files are ignored.

Any comments? If not, I'll create a patch and see to get it updated.

Changed in debianutils (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.