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
7 changes: 4 additions & 3 deletions bloom/generators/debian/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,10 @@ def match_branches_with_prefix(prefix, get_branches, prune=False):
# Prune listed branches by packages in latest upstream
with inbranch('upstream'):
pkg_names, version, pkgs_dict = get_package_data('upstream')
for branch in branches:
if branch.split(prefix)[-1].strip('/') not in pkg_names:
branches.remove(branch)

def filter_in_upstream(b):
return b.split(prefix)[-1].strip('/') in pkg_names
branches = list(filter(filter_in_upstream, branches))
return branches


Expand Down
7 changes: 4 additions & 3 deletions bloom/generators/rpm/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@ def match_branches_with_prefix(prefix, get_branches, prune=False):
# Prune listed branches by packages in latest upstream
with inbranch('upstream'):
pkg_names, version, pkgs_dict = get_package_data('upstream')
for branch in branches:
if branch.split(prefix)[-1].strip('/') not in pkg_names:
branches.remove(branch)

def filter_in_upstream(b):
return b.split(prefix)[-1].strip('/') in pkg_names
branches = list(filter(filter_in_upstream, branches))
return branches


Expand Down