protected function convert($extra)
    {
        if (isset($extra['custom-installer'])) {
            foreach ($extra['custom-installer'] as $pattern => $specs) {
                foreach ($specs as $spec) {
                    $match = array();
                    // Type matching
                    if (preg_match('/^type:(.*)$/', $spec, $match)) {
                        $this->types[$match[1]] = $pattern;
                    } // Else it must be the package name.
                    else {
                        $this->packages[$spec] = $pattern;
                    }
                }
            }
        }
    }