1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-07 05:38:43 +02:00

Add info for projects

Without this change, `osc info` in a project checkout dir returned

    Directory '.' is not an OBS SCM working copy of a package
This commit is contained in:
Bernhard M. Wiedemann
2024-06-11 10:47:56 +02:00
parent 84524b565d
commit 29d44d540b
3 changed files with 21 additions and 3 deletions

View File

@@ -242,6 +242,14 @@ class Project:
else:
return None
def info(self):
from ..core import project_info_templ
from ..core import makeurl
source_url = makeurl(self.apiurl, ['source', self.name])
r = project_info_templ % (self.name, self.absdir, self.apiurl, source_url)
return r
def new_package_entry(self, name, state):
ET.SubElement(self.pac_root, 'package', name=name, state=state)