bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] Bug#587291: same age/newer messages, document error codes


From: jidanni
Subject: [Bug-cpio] Bug#587291: same age/newer messages, document error codes
Date: Sun, 27 Jun 2010 13:06:57 +0800

X-debbugs-Cc: address@hidden
Package: cpio
Version: 2.11-4
Severity: wishlist

Here I am again saying that instead of this message
1. cpio: /some/file not created: newer or same age version exists
You should give differing error messages
2. cpio: /some/file not created: same age version exists
3. cpio: /some/file not created: newer version exists
Which would very much help the user be aware of what is going on in his
file system, and would be little skin off the program's back.

Indeed, you could even have them return different error codes, say 2 and 3.

One notes that what constitutes an error is totally undocumented by the way.

And so are the codes returned, which indeed you might as well start
returning. Isn't the intended operation not done an error?

One notes that attention has been paid to error codes somewhat,

Version 2.10 - Sergey Poznyakoff, 2009-06-20
* Fix exit codes to reliably indicate success or failure of the operation.

But they certainly aren't documented. Yes "doesn't work = error" by
default, but not good enough as I have explained above.

Hmmm, OK, if some files were copies, but some files were not, and some
were newer, and some were same age, then indeed that would be quite a
complicated error code. Indeed, have different bits set in the error
code bit string according to each situation that occurred!

Or just return
0: every file copied
1: "technical errors"
2: some files copied
3: no files copied
perhaps.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]