When reporting a problem, can you at least report which version you are
using.
We also need a way to reproduce the issue, the minum it hat case is the
amlabel command line argument and all setting related to the changer.
Bug get fixed a lot faster when enough information to reproduce the
issue is provided.
I committed the attached patch to fix the issue.
Jean-Louis
On 17/10/15 08:39 AM, Kamil Jońca wrote:
I want to add some new virtual tapes, but I got:
--8<---------------cut here---------------start------------->8---
Reading label...
Found an empty tape.
amlabel: Can't use an undefined value as a subroutine reference at
/usr/sbin/amlabel line 120.
--8<---------------cut here---------------end--------------->8---
lines from sbin/amlabel:
--8<---------------cut here---------------start------------->8---
117 if ($res) {
118 $res->release(finished_cb => sub {
119 # ignore error
120 $finished_cb->()
121 });
--8<---------------cut here---------------end--------------->8---
KJ
diff --git a/config/compile b/config/compile
old mode 100644
new mode 100755
diff --git a/config/config.guess b/config/config.guess
old mode 100644
new mode 100755
diff --git a/server-src/amlabel.pl b/server-src/amlabel.pl
index 307af07..b3c8aa4 100644
--- a/server-src/amlabel.pl
+++ b/server-src/amlabel.pl
@@ -255,7 +255,7 @@ sub main {
my ($err, $meta) = @_;
if (defined $meta && defined $opt_meta && $meta ne $opt_meta) {
- return failure();
+ return failure("Device meta '$meta' is not the same as the --meta argument '$opt_meta'", $finished_cb);
}
$meta = $opt_meta if !defined $meta;
($meta, my $merr) = $res->make_new_meta_label() if !defined $meta;
@@ -347,7 +347,7 @@ sub main {
if (defined $meta) {
if (defined($tle->{'meta'}) && $meta ne $tle->{'meta'} &&
!$opt_force) {
- return failure("Can't change meta-label with --force, old meta-label is '$tle->{'meta'}'");
+ return failure("Can't change meta-label with --force, old meta-label is '$tle->{'meta'}'", $finished_cb);
}
} else {
$meta = $tle->{'meta'};
@@ -357,7 +357,7 @@ sub main {
if (defined($tle->{'barcode'}) &&
$barcode ne $tle->{'barcode'} &&
!$opt_force) {
- return failure("Can't change barcode with --force, old barcode is '$tle->{'barcode'}'");
+ return failure("Can't change barcode with --force, old barcode is '$tle->{'barcode'}'", $finished_cb);
}
} else {
$barcode = $tle->{'barcode'};