1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

- fix for #492369 ("no warning on failed osc expansion")

This commit is contained in:
Marcus Hüwe 2009-04-06 20:08:14 +00:00
parent 8b1081a2af
commit 68f5d72061
2 changed files with 17 additions and 0 deletions

View File

@ -1456,6 +1456,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if len(pacs) > 1:
print 'Updating %s' % p.name
if opts.expand_link and p.haslinkerror():
raise oscerr.LinkExpandError(p.linkerror())
if not rev:
if opts.expand_link and p.islink() and not p.isexpanded():
print 'Expanding to rev', p.linkinfo.xsrcmd5

View File

@ -904,6 +904,20 @@ class Package:
Returns True if the package is expanded, otherwise False."""
return self.linkinfo.isexpanded()
def haslinkerror(self):
"""
Returns True if the link is broken otherwise False.
If the package is not a link it returns False.
"""
return self.linkinfo.haserror()
def linkerror(self):
"""
Returns an error message if the link is broken otherwise None.
If the package is not a link it returns None.
"""
return self.linkinfo.error
def update_local_pacmeta(self):
"""
Update the local _meta file in the store.