Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2012-10-07 18:54:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh", Maintainer is "dmuhameda...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2012-09-23 
17:31:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2012-10-07 
18:54:48.000000000 +0200
@@ -1,0 +2,9 @@
+Thu Sep 27 17:42:24 UTC 2012 - dmuhameda...@suse.com
+
+- ra: don't fail on unknown ${} term sequences (fixes oracle 
+  metadata)
+- cibconfig: update schema separately (don't remove the status
+  section)
+- upstream cs: 0994b099c2dc
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ crmsh.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/.hg_archival.txt new/crmsh/.hg_archival.txt
--- old/crmsh/.hg_archival.txt  2012-09-18 17:40:54.000000000 +0200
+++ new/crmsh/.hg_archival.txt  2012-09-27 19:36:05.000000000 +0200
@@ -1,5 +1,5 @@
 repo: 13c3bd69e935090cd25213c474cafc3f01b5910b
-node: df0b30262868a52fc5f21177fdb3d4a02badb49d
+node: 0994b099c2dcf9bb5e85aa7aae3a9bed368942c7
 branch: default
 latesttag: crmsh-1.2.0
-latesttagdistance: 1
+latesttagdistance: 4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/cibconfig.py 
new/crmsh/modules/cibconfig.py
--- old/crmsh/modules/cibconfig.py      2012-09-18 17:40:54.000000000 +0200
+++ new/crmsh/modules/cibconfig.py      2012-09-27 19:36:05.000000000 +0200
@@ -1677,6 +1677,7 @@
             common_err("current configuration not valid with %s, cannot change 
schema" % schema_st)
             return 4
         self.cib_attrs["validate-with"] = schema_st
+        self.new_schema = True
         return 0
     def is_elem_supported(self,obj_type):
         'Do we support this element?'
@@ -1723,13 +1724,6 @@
             self.cib_attrs[attr] = cib.getAttribute(attr)
         schema.init_schema(cib)
         return True
-    def refresh_cib_attrs(self):
-        doc,cib = read_cib(cibdump2doc)
-        if not cib:
-            return
-        self.cib_attrs = {}
-        for attr in cib.attributes.keys():
-            self.cib_attrs[attr] = cib.getAttribute(attr)
     #
     # create a doc from the list of objects
     # (used by CibObjectSetRaw)
@@ -1822,31 +1816,29 @@
             self.reset()
             self.initialize()
         return self.all_committed
-    def update_cib_attrs(self, cib, reread):
+    def commit_schema(self):
         '''
-        Set the validate-with, the schema might have changed.
-        Increase the epoch.
-        On reread (usually force) read the attributes from the
-        current CIB.
-        '''
-        if reread:
-            schema_st = self.get_schema()
-            self.refresh_cib_attrs()
-            self.cib_attrs["validate-with"] = schema_st
-        cib.setAttribute("validate-with", self.get_schema())
-        self.cib_attrs["epoch"] = str(int(self.cib_attrs["epoch"])+1)
-        cib.setAttribute("epoch", self.cib_attrs["epoch"])
+        Set the validate-with, if the schema changed.
+        '''
+        s = '<cib validate-with="%s"/>' % self.cib_attrs["validate-with"]
+        rc = pipe_string("%s -U" % cib_piped, s)
+        if rc != 0:
+            update_err("cib","-U",s, rc)
+            return False
+        self.new_schema = False
+        return True
     def commit_doc(self,force):
         try:
-            cib = self.doc.getElementsByTagName("cib")[0]
+            conf_node = self.doc.getElementsByTagName("configuration")[0]
         except:
-            common_error("cannot find the cib node")
+            common_error("cannot find the configuration node")
+            return False
+        if self.new_schema and not self.commit_schema():
             return False
-        self.update_cib_attrs(cib, force)
         cibadmin_opts = force and "-R --force" or "-R"
-        rc = pipe_string("%s %s" % (cib_piped,cibadmin_opts), cib.toxml())
+        rc = pipe_string("%s %s" % (cib_piped,cibadmin_opts), 
conf_node.toxml())
         if rc != 0:
-            update_err("cib",cibadmin_opts,cib.toprettyxml(), rc)
+            update_err("cib",cibadmin_opts,conf_node.toprettyxml(), rc)
             return False
         return True
     def mk_shadow(self):
@@ -1944,6 +1936,7 @@
         self.remove_queue = [] # a list of cib objects to be removed
         self.id_refs = {} # dict of id-refs
         self.overwrite = False # update cib unconditionally
+        self.new_schema = False # schema changed
     def reset(self):
         if not self.doc:
             return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/term.py new/crmsh/modules/term.py
--- old/crmsh/modules/term.py   2012-09-18 17:40:54.000000000 +0200
+++ new/crmsh/modules/term.py   2012-09-27 19:36:05.000000000 +0200
@@ -142,8 +142,10 @@
         return re.sub(r'\$\$|\${\w+}', self._render_sub, template)
     def _render_sub(self, match):
         s = match.group()
-        if s == '$$': return s
-        else: return getattr(self, s[2:-1])
+        try:
+            return getattr(self, s[2:-1])
+        except:
+            return s
     def is_color(self, s):
         try:
             attr = getattr(self, s.upper())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/ui.py.in new/crmsh/modules/ui.py.in
--- old/crmsh/modules/ui.py.in  2012-09-18 17:40:54.000000000 +0200
+++ new/crmsh/modules/ui.py.in  2012-09-27 19:36:05.000000000 +0200
@@ -1258,7 +1258,8 @@
             return False
         try:
             page_string(ra.meta_pretty())
-        except:
+        except Exception,msg:
+            common_err(msg)
             return False
 
 def ptestlike(simfun,def_verb,cmd,*args):

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to