Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion elbepack/aptpkgutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,21 @@ def getdeps(pkg):
yield d.name


def getalldeps(c, pkgname):
def getalldeps(c, pkgname, blacklist=[]):
retval = []
togo = [pkgname]

while togo:
pp = togo.pop()
if pp in blacklist:
continue
pkg = c[pp]

for p in getdeps(pkg.candidate):
if p in retval:
continue
if p in blacklist:
continue
if p not in c:
continue
retval.append(p)
Expand Down
6 changes: 5 additions & 1 deletion elbepack/efilesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ def extract_target(src, xml, dst, cache):
arch = xml.text('project/buildimage/arch', key='arch')

if xml.tgt.has('diet'):
if xml.has('target/pkg-blacklist/'):
blacklist = [p.et.text for p in xml.node('target/pkg-blacklist/target')]
withdeps = []
for p in pkglist:
deps = cache.get_dependencies(p)
if p in blacklist:
continue
deps = cache.get_dependencies(p, blacklist)
withdeps += [d.name for d in deps]
withdeps += [p]

Expand Down
4 changes: 2 additions & 2 deletions elbepack/rpcaptcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def commit(self):
ElbeInstallProgress(fileno=sys.stdout.fileno()))
self.cache.open(progress=ElbeOpProgress())

def get_dependencies(self, pkgname):
deps = getalldeps(self.cache, pkgname)
def get_dependencies(self, pkgname, blacklist):
deps = getalldeps(self.cache, pkgname, blacklist)
return [APTPackage(self.cache[p]) for p in deps]

def get_installed_pkgs(self, section='all'):
Expand Down
7 changes: 7 additions & 0 deletions elbepack/schema/dbsfed.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3094,6 +3094,13 @@ SPDX-FileCopyrightText: Linutronix GmbH
</documentation>
</annotation>
<sequence>
<element name="target" type="rfs:pkg-list" minOccurs="0" maxOccurs="unbounded">
<annotation>
<documentation>
avoid installing the specified packages into the target
</documentation>
</annotation>
</element>
<element name="sysroot" type="rfs:pkg-list" minOccurs="0" maxOccurs="unbounded">
<annotation>
<documentation>
Expand Down
Loading