Return set of canonical names of linked packages in `prefix`.

def linked(prefix):
        """Return set of canonical names of linked packages in `prefix`."""
        logger.debug(str(prefix))

        if not isdir(prefix):
            return set()

        meta_dir = join(prefix, 'conda-meta')
        if not isdir(meta_dir):
            # We might have nothing in linked (and no conda-meta directory)
            return set()

        return set(fn[:-5] for fn in os.listdir(meta_dir)
                   if fn.endswith('.json'))