General:
+Changes to 1.37.39:
+15Sep05
+- Apply Nicolas' dvd-freespace.in patch.
+- Make sure SQL table names are not translated.
+- Eliminate incorrect message saying barcodes not
+ found in "label barcodes" -- fixes bug report.
Changes to 1.37.38:
07Sep05
- Add ability to have passwords on backup of catalog as
print "Cannot get media lead-out index from " + dvdrwmediainfo
sys.exit(0)
-cmd=df + " " + device
-process = popen2.Popen4(cmd)
-status = process.wait()
-if not os.WIFEXITED(status):
- print -errno.EPIPE
- print df + " process did not not exit correctly."
- sys.exit(0)
-
-exitstat = os.WEXITSTATUS(status) & ~0x80
-if exitstat == errno.ENOSPC:
- print "0"
- print os.strerror(exitstat)
- sys.exit(0)
-if exitstat != 0:
- print -exitstat
- print os.strerror(exitstat)
- sys.exit(0)
-size = 0
-while 1:
- result = process.fromchild.readline()
- if not result:
+def getcurrentsize():
+ cmd=df + " " + device
+ process = popen2.Popen4(cmd)
+ status = process.wait()
+ if not os.WIFEXITED(status):
print -errno.EPIPE
- print "Cannot get output from " + df
+ print df + " process did not not exit correctly."
sys.exit(0)
- index = result.find(device)
- if index > -1:
- while result[index] != ' ':
- index += 1
- while result[index] == ' ':
- index += 1
- eindex = index;
- while result[eindex] != ' ':
- eindex += 1
- res = result[index:eindex]
- if not res.isdigit():
- print -errno.EPIPE;
- print "Could not find size in df output"
- sys.exit(0)
- size = long(res)*1024
- break
-size = gettotalsize()-(size+margin)
+ exitstat = os.WEXITSTATUS(status) & ~0x80
+ if exitstat == errno.ENOSPC:
+ print "0"
+ print os.strerror(exitstat)
+ sys.exit(0)
+ if exitstat != 0:
+ print -exitstat
+ print os.strerror(exitstat)
+ sys.exit(0)
+ size = 0
+ while 1:
+ result = process.fromchild.readline()
+ if not result:
+ return 0
+ index = result.find(device)
+ if index > -1:
+ while result[index] != ' ':
+ index += 1
+ while result[index] == ' ':
+ index += 1
+ eindex = index;
+ while result[eindex] != ' ':
+ eindex += 1
+ res = result[index:eindex]
+ if not res.isdigit():
+ print -errno.EPIPE;
+ print "Could not find size in df output"
+ sys.exit(0)
+ return long(res)*1024
+ break
+
+size = gettotalsize()-(getcurrentsize()+margin)
if size < 0:
size = 0
print size
jr->JobId = 0;
stat = 0;
} else {
- jr->JobId = sql_insert_id(mdb, _("Job"));
+ jr->JobId = sql_insert_id(mdb, N_("Job"));
stat = 1;
}
db_unlock(mdb);
pr->PoolId = 0;
stat = false;
} else {
- pr->PoolId = sql_insert_id(mdb, _("Pool"));
+ pr->PoolId = sql_insert_id(mdb, N_("Pool"));
stat = true;
}
db_unlock(mdb);
dr->DeviceId = 0;
ok = false;
} else {
- dr->DeviceId = sql_insert_id(mdb, _("Device"));
+ dr->DeviceId = sql_insert_id(mdb, N_("Device"));
ok = true;
}
db_unlock(mdb);
Jmsg(jcr, M_ERROR, 0, "%s", mdb->errmsg);
ok = false;
} else {
- sr->StorageId = sql_insert_id(mdb, _("Storage"));
+ sr->StorageId = sql_insert_id(mdb, N_("Storage"));
sr->created = true;
ok = true;
}
mr->MediaTypeId = 0;
stat = false;
} else {
- mr->MediaTypeId = sql_insert_id(mdb, _("MediaType"));
+ mr->MediaTypeId = sql_insert_id(mdb, N_("MediaType"));
stat = true;
}
db_unlock(mdb);
mdb->cmd, sql_strerror(mdb));
stat = 0;
} else {
- mr->MediaId = sql_insert_id(mdb, _("Media"));
+ mr->MediaId = sql_insert_id(mdb, N_("Media"));
stat = 1;
if (mr->set_label_date) {
char dt[MAX_TIME_LENGTH];
cr->ClientId = 0;
stat = 0;
} else {
- cr->ClientId = sql_insert_id(mdb, _("Client"));
+ cr->ClientId = sql_insert_id(mdb, N_("Client"));
stat = 1;
}
db_unlock(mdb);
fsr->FileSetId = 0;
stat = false;
} else {
- fsr->FileSetId = sql_insert_id(mdb, _("FileSet"));
+ fsr->FileSetId = sql_insert_id(mdb, N_("FileSet"));
fsr->created = true;
stat = true;
}
ar->FileId = 0;
stat = 0;
} else {
- ar->FileId = sql_insert_id(mdb, _("File"));
+ ar->FileId = sql_insert_id(mdb, N_("File"));
stat = 1;
}
return stat;
ar->PathId = 0;
stat = 0;
} else {
- ar->PathId = sql_insert_id(mdb, _("Path"));
+ ar->PathId = sql_insert_id(mdb, N_("Path"));
stat = 1;
}
Jmsg(jcr, M_FATAL, 0, "%s", mdb->errmsg);
ar->FilenameId = 0;
} else {
- ar->FilenameId = sql_insert_id(mdb, _("Filename"));
+ ar->FilenameId = sql_insert_id(mdb, N_("Filename"));
}
return ar->FilenameId > 0;
}
MEDIA_DBR mr, omr;
POOL_DBR pr;
bool print_reminder = true;
+ bool label_barcodes = false;
int ok = FALSE;
int i;
int drive;
if (!open_db(ua)) {
return 1;
}
+
+ if (!relabel && (i=find_arg_keyword(ua, barcode_keyword)) >= 0) {
+ *ua->argk[i] = 0; /* zap barcode keyword */
+ label_barcodes = true;
+ }
+
store = get_storage_resource(ua, true/*use default*/);
if (!store) {
return 1;
drive = get_storage_drive(ua, store);
set_storage(ua->jcr, store);
- if (!relabel && find_arg_keyword(ua, barcode_keyword) >= 0) {
+ if (label_barcodes) {
label_from_barcodes(ua, drive);
return 1;
}
*/
#undef VERSION
-#define VERSION "1.37.38"
-#define BDATE "07 September 2005"
-#define LSMDATE "07Sep05"
+#define VERSION "1.37.39"
+#define BDATE "15 September 2005"
+#define LSMDATE "15Sep05"
/* Debug flags */
#undef DEBUG