Skip to content

Commit

Permalink
check for virtual packages with apt-cache (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke authored and wjwwood committed Jul 31, 2017
1 parent 6eee245 commit b49c802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rosdep2/platforms/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def register_ubuntu(context):

# detect that apt show indicates that the package is virtual
APT_PURELY_VIRTUAL_RE = re.compile(
r'State: not a real package \(virtual\)',
r'as it is purely virtual',
flags=re.DOTALL)
# detect what lines in apt-cache showpkg show the packages providing a virtual
# package
Expand Down Expand Up @@ -120,7 +120,7 @@ def _is_installed_as_virtual_package(package, exec_fn=None):
# check output of `apt show package' for whether it's a virtual
# package and if so use `apt-cache showpkg package' to get the providing
# packages. Then check if one of those is installed.
cmd = ['apt', 'show', package]
cmd = ['apt-cache', 'show', package]
if exec_fn is None:
exec_fn = read_stdout
std_out, std_err = exec_fn(cmd, True) # use stderr as well to hide error message ... not too nice, but hopefully cautious
Expand Down

0 comments on commit b49c802

Please sign in to comment.