Add Package.in_staging method
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
55f6ad0c95
commit
5bf28d1cab
@ -332,6 +332,17 @@ def in_testing(self):
|
||||
except Package.DoesNotExist:
|
||||
return None
|
||||
|
||||
def in_staging(self):
|
||||
'''attempt to locate this package in a staging repo; if we are in
|
||||
a staging repo we will always return None.'''
|
||||
if self.repo.staging:
|
||||
return None
|
||||
try:
|
||||
return Package.objects.normal().get(repo__staging=True,
|
||||
pkgname=self.pkgname, arch=self.arch)
|
||||
except Package.DoesNotExist:
|
||||
return None
|
||||
|
||||
def elsewhere(self):
|
||||
'''attempt to locate this package anywhere else, regardless of
|
||||
architecture or repository. Excludes this package from the list.'''
|
||||
|
Loading…
Reference in New Issue
Block a user