Mailinglist Archive: opensuse-buildservice (250 mails)

< Previous Next >
[opensuse-buildservice] Re: OBS design error?
  • From: Chris Frey <cdfrey@xxxxxxxxxxxxxx>
  • Date: Thu, 31 Jul 2008 22:55:12 -0400
  • Message-id: <20080801025512.GA6629@xxxxxxxxxxxxxx>
On Thu, Jul 31, 2008 at 03:53:38PM +0200, Marcus H?we wrote:
osc already stores the package meta in the .osc/_meta file. It might make
sense to do the same for the project meta. Or are you talking about something
else?

Yes, that's exactly what I was looking for. :-) I didn't realize it
was partly implemented already, as I was on version 104, so I grabbed
the latest SVN, and copied the pac implementation to update prj too.

Here's the patch. I hope someone can review it and possibly commit it.

Thanks,
- Chris


Index: osc/core.py
===================================================================
--- osc/core.py (revision 4585)
+++ osc/core.py (working copy)
@@ -282,6 +282,7 @@
checkout_package(self.apiurl, self.name, pac, \

pathname=getTransActPath(os.path.join(self.dir, pac)), \
prj_obj=self, prj_dir=self.dir)
+ self.update_local_prjmeta()

def set_state(self, pac, state):
node = self.get_package_node(pac)
@@ -388,6 +389,16 @@
else:
print 'unsupported state'

+ def update_local_prjmeta(self):
+ """
+ Update the local project _meta file in the store.
+ It is replaced with the version pulled from upstream.
+ """
+ meta = ''.join(show_project_meta(self.apiurl, self.name))
+ f = open(os.path.join(self.absdir, store, '_meta'), 'w')
+ f.write(meta)
+ f.close()
+
def update(self, pacs = (), expand_link=False, unexpand_link=False):
if len(pacs):
for pac in pacs:
@@ -451,6 +462,7 @@
self.checkout_missing_pacs()
finally:
self.write_packages()
+ self.update_local_prjmeta()

def commit(self, pacs = (), msg = '', files = {}):
if len(pacs):

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups