blob: c1d7bd033ccf295a1f950aa0a7e35432796a0009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
"""module for extracting packages from a package/architecture list """
from .gentooPackage import gentooPackage as gP
def findPackages (s, arch):
""" Given a string s,
and a string arch
return all gentooPackages from that string that need actioning on that arch """
packages = []
for line in s.splitlines():
atom, _, arches = line.partition(' ')
if not arches or arch in arches.split(' '):
packages.append(gP(atom))
return(packages)
|