diff -Nru simplestreams-0.1.0-483-gcf14265/debian/changelog simplestreams-0.1.0-484-g21782a0/debian/changelog --- simplestreams-0.1.0-483-gcf14265/debian/changelog 2019-06-27 15:46:17.000000000 +0000 +++ simplestreams-0.1.0-484-g21782a0/debian/changelog 2019-07-15 19:31:51.000000000 +0000 @@ -1,6 +1,6 @@ -simplestreams (0.1.0-483-gcf14265-0ubuntu1~ubuntu18.10.1) cosmic; urgency=low +simplestreams (0.1.0-484-g21782a0-0ubuntu1~ubuntu18.10.1) cosmic; urgency=low * Auto build. - -- Launchpad Package Builder Thu, 27 Jun 2019 15:46:17 +0000 + -- Launchpad Package Builder Mon, 15 Jul 2019 19:31:51 +0000 diff -Nru simplestreams-0.1.0-483-gcf14265/debian/git-build-recipe.manifest simplestreams-0.1.0-484-g21782a0/debian/git-build-recipe.manifest --- simplestreams-0.1.0-483-gcf14265/debian/git-build-recipe.manifest 2019-06-27 15:46:17.000000000 +0000 +++ simplestreams-0.1.0-484-g21782a0/debian/git-build-recipe.manifest 2019-07-15 19:31:51.000000000 +0000 @@ -1,2 +1,2 @@ -# git-build-recipe format 0.4 deb-version 0.1.0-483-gcf14265-0ubuntu1 -lp:simplestreams git-commit:cf142654c8ea7e4cc6786d28d085d2dc6bc33501 +# git-build-recipe format 0.4 deb-version 0.1.0-484-g21782a0-0ubuntu1 +lp:simplestreams git-commit:21782a0d0b45b13dca1d712a1c889b68cdb1e4f5 diff -Nru simplestreams-0.1.0-483-gcf14265/simplestreams/mirrors/__init__.py simplestreams-0.1.0-484-g21782a0/simplestreams/mirrors/__init__.py --- simplestreams-0.1.0-483-gcf14265/simplestreams/mirrors/__init__.py 2019-06-27 15:46:17.000000000 +0000 +++ simplestreams-0.1.0-484-g21782a0/simplestreams/mirrors/__init__.py 2019-07-15 19:31:51.000000000 +0000 @@ -280,6 +280,23 @@ filtered_products = [] prodname = None + + # Apply filters to items before filtering versions + for prodname, product in list(stree.items()): + + for vername, version in list(product.get('versions', {}).items()): + for itemname, item in list(version.get('items', {}).items()): + pgree = (prodname, vername, itemname) + if not self.filter_item(item, src, target, pgree): + LOG.debug("Filtered out item: %s/%s", itemname, item) + del stree[prodname]['versions'][vername]['items'][ + itemname] + if not stree[prodname]['versions'][vername].get( + 'items', {}): + del stree[prodname]['versions'][vername] + if not stree[prodname].get('versions', {}): + del stree[prodname] + for prodname, product in stree.items(): if not self.filter_product(product, src, target, (prodname,)): filtered_products.append(prodname) @@ -320,9 +337,6 @@ added_items = [] for itemname, item in version.get('items', {}).items(): pgree = (prodname, vername, itemname) - if not self.filter_item(item, src, target, pgree): - LOG.debug("Filtered out item: %s/%s", itemname, item) - continue added_items.append(itemname)