On Thu, Mar 16, 2017 at 11:46:10 -0400, Jean-Louis Martineau wrote:
> Thanks for reporting the issue.
> I committed the attached patch.
Great, thanks.
I applied to the patch to Label.pm and can confirm it works as expected
now:
====
# su backup -c "amlabel TestBackup BLAH-02 slot 2"
Reading label...
Found an empty tape.
Label 'BLAH-02' doesn't match the labelstr '^TESTBACKUP-[0-9][0-9]*$'.
Label 'BLAH-02' doesn't match the labelstr '^TESTBACKUP-[0-9][0-9]*$'.
====
However, as you can see, the error message is repeated twice, and
there's no explicit message telling me that the label attempt failed.
I tried some other failure-to-write-label situations and found the
warning/failure messages were inconsistent:
====
# su backup -c "amlabel TestBackup TESTBACKUP-03 slot 2"
Reading label...
Volume with label 'TESTBACKUP-02' is active and contains data from this
configuration.
Not writing label.
Not writing label.
# su backup -c "amlabel TestBackup TESTBACKUP-02 slot 3"
Label 'TESTBACKUP-02' already on a volume
# su backup -c "amlabel TestBackup slot 3"
Reading label...
Found an empty tape.
template is not set, you must set autolabel
template is not set, you must set autolabel
====
How difficult would be it be to fix the program to consistently A) print
the error message just one time and B) print "Not writing label." (or
something similar) in all situation where the label is not successfully
written?
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239