Skip to content

Commit

Permalink
fix(ci): the latest package version coincides with the version apt wo…
Browse files Browse the repository at this point in the history
…uld choose (magma#12909)
  • Loading branch information
nstng authored and emakeev committed Aug 5, 2022
1 parent 23c7aa8 commit ff4d137
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lte/gateway/release/pydep
Original file line number Diff line number Diff line change
Expand Up @@ -394,18 +394,14 @@ def get_latest_apt_pkg_version(pkgname: str, py2: bool = False) -> Optional[str]
"""
cache = apt.Cache()
sys_pkgname = gen_sys_package_name(pkgname, py2)

try:
avail_versions = cache[sys_pkgname].versions
package = cache[sys_pkgname]
except KeyError:
# package isn't available
return None

latest = None
for v in avail_versions:
if not latest or v.version > latest:
latest = v.version

return latest
return package.candidate.version


def gen_fpm_dep_string_from_lockfile(lockfile_str: str) -> str:
Expand Down

0 comments on commit ff4d137

Please sign in to comment.