public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
    {
        if (!$repo->hasPackage($initial)) {
            throw new \InvalidArgumentException('Package is not installed: '.$initial);
        }

        $this->logVerbose(sprintf('Updating Contao sources for %s', $initial->getName()));

        $contaoRoot = $this->getContaoRoot();

        $this->removeSymlinks($initial, $contaoRoot, $this->getSources($initial));

        parent::update($repo, $initial, $target);

        $this->addSymlinks($target, $contaoRoot, $this->getSources($target));
        $this->addCopies($target, $this->getFilesRoot(), $this->getUserFiles($target), self::DUPLICATE_IGNORE);
        $this->addRunonces($target, $this->getRunonces($target));

        $this->logVerbose('');
    }