Skip to content

Commit

Permalink
who_depends_this_lib: exclude debug packages and fix StopIteration
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed May 4, 2023
1 parent 1733e78 commit 1307ed9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion who_depends_this_lib
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def main(db: Path, lib_re: re.Pattern, dep_pkgname: Optional[str]) -> None:
name = tarinfo.name.split('/', 1)[0]
continue

if '-debug-' in name:
continue

if tarinfo.name.endswith('/depends'):
continue

Expand All @@ -154,7 +157,10 @@ def main(db: Path, lib_re: re.Pattern, dep_pkgname: Optional[str]) -> None:

it = iter(data.splitlines())
while True:
l = next(it)
try:
l = next(it)
except StopIteration:
break
if l == '%FILENAME%':
filename = next(it)
break
Expand Down

0 comments on commit 1307ed9

Please sign in to comment.