Commit 4f803a30 authored by claes's avatar claes

Possibility to control dbs file version

parent b9d87032
......@@ -46,7 +46,7 @@ realclean : clean $(clean_wbl)
$(load_dir)/nmps.dbs :
@ echo "Generating loadfile for nmps"
@ export pwr_load=$(pwr_eload);\
wb_cmd -q -i create snapshot /file=\"$(pwre_sroot)/wbl/nmps/src/\"/out=\"$(target)\"
wb_cmd -q -i create snapshot $(wblflags) /file=\"$(pwre_sroot)/wbl/nmps/src/\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_nmpsclasses.h :
......
......@@ -46,7 +46,7 @@ realclean : clean $(clean_wbl)
$(load_dir)/remote.dbs :
@ echo "Generating loadfile for remote"
@ export pwr_load=$(pwr_eload);\
wb_cmd -q -i create snapshot /file=\"$(pwre_sroot)/wbl/remote/src/\"/out=\"$(target)\"
wb_cmd -q -i create snapshot $(wblflags) /file=\"$(pwre_sroot)/wbl/remote/src/\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_remoteclasses.h :
......
/*
* Proview $Id: pwr_version.h,v 1.6 2006-05-05 11:34:50 claes Exp $
* Proview $Id: pwr_version.h,v 1.7 2006-05-11 07:15:08 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -63,7 +63,7 @@
# define SET_VERSION(a, b, c, d) ((pwr_tVersion)((a << 24) + (a << 16) + (a << 8) + a))
#endif
#define pwrv_cBuildTimeStr "14 Oct 2004"
#define pwrv_cBuildTimeStr "10-MAY-2006 12:00:00"
#define pwrv_cPwrVersionStr "V4.2.0"
#define pwrv_cPwrVersion SET_VERSION('V', 4, 2, 0)
......
......@@ -114,6 +114,8 @@ javac := javac
#list = $(to-vms $(lis_dir)/$(sname)$(lis_ext))
map = $(bld_dir)/$(tname)$(map_ext)
mkdir := mkdir
# Set to /buildversion for frozen dbs versions
wblflags :=
ifeq ($(pwre_btype),rls)
cflags := -c -O3 -D_GNU_SOURCE -DPWR_NDEBUG -D_REENTRANT
......
......@@ -76,7 +76,7 @@ clean_ps_en_us := $(patsubst %.wb_load,clean_%_en_us.ps,$(wbl_sources))
$(load_dir)/%.dbs : ../../%.wb_load
@ echo "Generating loadfile for $(source)"
@ export pwr_load=$(pwr_eload);\
wb_cmd -q -i create snapshot /file=\"$(source)\"/out=\"$(target)\"
wb_cmd -q -i create snapshot $(wblflags) /file=\"$(source)\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_%classes.h : ../../%.wb_load
......
......@@ -47,7 +47,7 @@ realclean : clean clean_pwrb_xtthelp clean_pwrb_html clean_baseclasses
$(load_dir)/pwrb.dbs :
@ echo "Generating loadfile for pwrb"
@ wb_cmd -q -i create snapshot /file=\"$(pwre_sroot)/wbl/pwrb/src/\"/out=\"$(target)\"
@ wb_cmd -q -i create snapshot $(wblflags) /file=\"$(pwre_sroot)/wbl/pwrb/src/\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_baseclasses.h :
......
......@@ -45,7 +45,7 @@ realclean : clean clean_pwrs_xtthelp clean_pwrs_html clean_systemclasses
$(load_dir)/pwrs.dbs :
@ echo "Generating loadfile for pwrs"
@ wb_cmd -q -i create snapshot /file=\"$(pwre_sroot)/wbl/pwrs/src/\"/out=\"$(target)\"
@ wb_cmd -q -i create snapshot $(wblflags) /file=\"$(pwre_sroot)/wbl/pwrs/src/\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_systemclasses.h :
......
......@@ -46,7 +46,7 @@ realclean : clean $(clean_wbl)
$(load_dir)/tlog.dbs :
@ echo "Generating loadfile for tlog"
@ export pwr_load=$(pwr_eload); \
wb_cmd -q -i create snapshot /file=\"$(pwre_sroot)/wbl/tlog/src/\"/out=\"$(target)\"
wb_cmd -q -i create snapshot $(wblflags) /file=\"$(pwre_sroot)/wbl/tlog/src/\"/out=\"$(target)\"
@ chmod a+w $(target)
$(inc_dir)/pwr_tlogclasses.h :
......
/*
* Proview $Id: wb_dbs.cpp,v 1.24 2005-12-15 07:41:17 claes Exp $
* Proview $Id: wb_dbs.cpp,v 1.25 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -106,6 +106,12 @@ wb_dbs::setFileName(const char *name)
dcli_translate_filename(m_fileName, name);
}
void
wb_dbs::setTime(const pwr_tTime t)
{
m_volume.time = t;
}
static int
comp_dbs_name(tree_sTable *tp, tree_sNode *x, tree_sNode *y)
{
......
/*
* Proview $Id: wb_dbs.h,v 1.14 2005-09-06 10:43:31 claes Exp $
* Proview $Id: wb_dbs.h,v 1.15 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -130,6 +130,7 @@ public:
bool operator==(const wb_dbs&) const;
void setFileName(const char *name);
void setTime(const pwr_tTime t);
void getAliasServer(sOentry *oep, void *p);
char *pathName(sOentry *oep);
......
/*
* Proview $Id: wb_ldh.cpp,v 1.53 2006-03-31 14:29:39 claes Exp $
* Proview $Id: wb_ldh.cpp,v 1.54 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -203,7 +203,7 @@ ldh_CreatVolumeSnapshot(ldh_tWorkbench workbench, char *name, ldh_tVolume *volum
//wb_env *wb = (wb_env *)workbench;
wb_volume *v = (wb_volume *)volume;
v->createSnapshot(name);
v->createSnapshot(name, 0);
return LDH__SUCCESS;
}
......@@ -1851,7 +1851,7 @@ ldh_CreateLoadFile(ldh_tSession session)
wb_session *sp = (wb_session*)session;
try {
sp->createSnapshot( 0);
sp->createSnapshot( 0, 0);
}
catch (wb_error& e) {
return e.sts();
......
/*
* Proview $Id: wb_volume.h,v 1.25 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_volume.h,v 1.26 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -98,7 +98,8 @@ public:
bool isLocal(wb_object &o) const;
bool createSnapshot(const char *fileName) { return m_vrep->createSnapshot(fileName);}
bool createSnapshot(const char *fileName, const pwr_tTime *time)
{ return m_vrep->createSnapshot(fileName, time);}
bool exportTree( wb_volume &import, pwr_tOid oid);
pwr_tStatus syntaxCheck( int *errorcount, int *warningcount);
......
/*
* Proview $Id: wb_vrep.h,v 1.24 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrep.h,v 1.25 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -148,7 +148,7 @@ public:
virtual const char *name() { return m_name;}
virtual wb_merep *merep() const = 0;
virtual bool createSnapshot(const char *fileName) = 0;
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time) = 0;
virtual void objectName(const wb_orep *o, char *str) = 0;
virtual bool isCommonMeta() const { return false;}
......
/*
* Proview $Id: wb_vrepdb.cpp,v 1.40 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrepdb.cpp,v 1.41 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -150,7 +150,7 @@ bool wb_vrepdb::isLocal(const wb_orep *o)
return false;
}
bool wb_vrepdb::createSnapshot(const char *fileName)
bool wb_vrepdb::createSnapshot(const char *fileName, const pwr_tTime *time)
{
try {
wb_dbs dbs(this);
......
/*
* Proview $Id: wb_vrepdb.h,v 1.28 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrepdb.h,v 1.29 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -171,7 +171,7 @@ public:
virtual bool isLocal(const wb_orep *o);
virtual bool createSnapshot(const char *fileName);
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time);
virtual void objectName(const wb_orep *o, char *str);
......
/*
* Proview $Id: wb_vrepdbs.cpp,v 1.46 2005-10-25 15:27:47 claes Exp $
* Proview $Id: wb_vrepdbs.cpp,v 1.47 2006-05-11 07:12:19 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -548,7 +548,7 @@ wb_merep *wb_vrepdbs::merep() const
return m_merep;
}
bool wb_vrepdbs::createSnapshot(const char *)
bool wb_vrepdbs::createSnapshot(const char *, const pwr_tTime *)
{
return false;
}
......@@ -674,6 +674,14 @@ bool wb_vrepdbs::exportTreeObject(wb_treeimport &i, dbs_sObject *op, bool isRoot
return true;
}
bool wb_vrepdbs::time( pwr_tTime *t)
{
if ( m_dbsmep) {
*t = m_dbsmep->venv->vp->time;
return true;
}
return false;
}
......
/*
* Proview $Id: wb_vrepdbs.h,v 1.33 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrepdbs.h,v 1.34 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -136,7 +136,7 @@ public:
wb_orepdbs *new_wb_orepdbs(size_t size);
void delete_wb_orepdbs(void *p);
bool time( pwr_tTime *t);
virtual wb_vrep *next ();
......@@ -144,7 +144,7 @@ public:
virtual bool isLocal (const wb_orep *);
virtual pwr_tCid cid () const;
virtual wb_merep *merep () const;
virtual bool createSnapshot (const char *);
virtual bool createSnapshot (const char *, const pwr_tTime *);
virtual bool isCommonMeta() const { return false;}
virtual bool isMeta() const { return (cid() == pwr_eClass_ClassVolume);}
......
/*
* Proview $Id: wb_vrepext.h,v 1.7 2005-11-22 12:28:18 claes Exp $
* Proview $Id: wb_vrepext.h,v 1.8 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -162,7 +162,7 @@ public:
wb_vrep *next();
virtual bool createSnapshot(const char *fileName) { return false;}
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time) { return false;}
char volume_class[32];
char volume_name[32];
......
/*
* Proview $Id: wb_vrepmem.cpp,v 1.21 2005-12-20 11:58:29 claes Exp $
* Proview $Id: wb_vrepmem.cpp,v 1.22 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -191,13 +191,15 @@ void wb_vrepmem::info()
}
bool
wb_vrepmem::createSnapshot(const char *fileName)
wb_vrepmem::createSnapshot(const char *fileName, const pwr_tTime *time)
{
try {
wb_dbs dbs(this);
if ( fileName)
dbs.setFileName( fileName);
if ( time)
dbs.setTime( *time);
dbs.importVolume(*this);
......
/*
* Proview $Id: wb_vrepmem.h,v 1.17 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrepmem.h,v 1.18 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -224,7 +224,7 @@ public:
wb_vrep *next();
virtual bool createSnapshot(const char *fileName);
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time);
char volume_class[32];
char volume_name[32];
......
/*
* Proview $Id: wb_vrepref.h,v 1.6 2005-10-21 16:11:23 claes Exp $
* Proview $Id: wb_vrepref.h,v 1.7 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -76,7 +76,7 @@ public:
wb_erep *erep() {return m_erep;}
wb_merep *merep() const { return m_merep;}
virtual bool createSnapshot(const char *fileName) { return false;}
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time) { return false;}
virtual pwr_tOid oid(pwr_tStatus *sts, const wb_orep *o) { return pwr_cNOid;}
virtual pwr_tVid vid(pwr_tStatus *sts, const wb_orep *o) { return pwr_cNVid;}
virtual pwr_tOix oix(pwr_tStatus *sts, const wb_orep *o) { return pwr_cNOix;}
......
/*
* Proview $Id: wb_vrepwbl.cpp,v 1.49 2006-03-28 15:03:16 claes Exp $
* Proview $Id: wb_vrepwbl.cpp,v 1.50 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -127,13 +127,15 @@ void wb_vrepwbl::info()
}
bool
wb_vrepwbl::createSnapshot(const char *fileName)
wb_vrepwbl::createSnapshot(const char *fileName, const pwr_tTime *time)
{
try {
wb_dbs dbs(this);
if ( fileName)
dbs.setFileName( fileName);
if ( time)
dbs.setTime( *time);
dbs.importVolume(*this);
......
/*
* Proview $Id: wb_vrepwbl.h,v 1.35 2005-09-06 10:43:32 claes Exp $
* Proview $Id: wb_vrepwbl.h,v 1.36 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -68,7 +68,7 @@ public:
wb_vrep *next();
virtual bool createSnapshot(const char *fileName);
virtual bool createSnapshot(const char *fileName, const pwr_tTime *time);
int load( const char *fname);
int load_files( const char *file_spec);
......
/*
* Proview $Id: wb_wnav_command.cpp,v 1.40 2006-03-31 14:29:39 claes Exp $
* Proview $Id: wb_wnav_command.cpp,v 1.41 2006-05-11 07:12:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -279,7 +279,7 @@ dcli_tCmdTable wnav_command_table[] = {
"/LASTCHILD", "/VOLUME", "/ALL",
"/CLASS", "/DEBUG", "/NODECONFIG",
"/NAME", "/IDENTITY", "/FILES", "/OUT", "/IGNORE",
"/DIRECTORY", ""}
"/DIRECTORY", "/BUILDVERSION", ""}
},
{
"NEW",
......@@ -3826,7 +3826,9 @@ static int wnav_create_func( void *client_data,
pwr_tFileName outstr;
char *outstr_p;
int ignore;
int buildversion;
pwr_tStatus sts;
pwr_tTime buildtime, *timep;
// Command is "CREATE SNAPSHOT"
......@@ -3842,6 +3844,14 @@ static int wnav_create_func( void *client_data,
outstr_p = 0;
ignore = ODD( dcli_get_qualifier( "/IGNORE", 0, 0));
buildversion = ODD( dcli_get_qualifier( "/BUILDVERSION", 0, 0));
if ( buildversion) {
time_AsciiToA( pwrv_cBuildTimeStr, &buildtime);
timep = &buildtime;
}
else
timep = 0;
sts = wnav_wccm_get_wbctx_cb( wnav, &wnav->wbctx);
if ( EVEN(sts)) return sts;
......@@ -3853,7 +3863,7 @@ static int wnav_create_func( void *client_data,
wbl->ref();
sts = wbl->load( filestr);
if ( ODD(sts) || ignore)
wbl->createSnapshot( outstr_p);
wbl->createSnapshot( outstr_p, timep);
delete wbl;
}
catch ( wb_error &e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment