/**
  * {@inheritdoc}
  */
 public function setPackageName($packageName)
 {
     if ($packageName === $this->rootPackageFile->getPackageName()) {
         return;
     }
     $previousName = $this->rootPackageFile->getPackageName();
     $this->rootPackageFile->setPackageName($packageName);
     try {
         $this->packageFileStorage->saveRootPackageFile($this->rootPackageFile);
     } catch (Exception $e) {
         $this->rootPackageFile->setPackageName($previousName);
         throw $e;
     }
 }