- // set the right options
- _config->Set("Acquire::cdrom::mount", v[i].MountPath);
- _config->Set("APT::CDROM::NoMount", true);
- } else {
- string AptMountPoint = _config->FindDir("Dir::Media::MountPath");
- if (!FileExists(AptMountPoint))
- mkdir(AptMountPoint.c_str(), 0750);
- if(MountCdrom(AptMountPoint, v[i].DeviceName) == false)
- _error->Warning(_("Failed to mount '%s' to '%s'"), v[i].DeviceName.c_str(), AptMountPoint.c_str());
- _config->Set("Acquire::cdrom::mount", AptMountPoint);
- _config->Set("APT::CDROM::NoMount", true);
+ _error->PushToStack();
+ if (Add == true)
+ oneSuccessful = cdrom.Add(&log);
+ else
+ {
+ std::string id;
+ oneSuccessful = cdrom.Ident(id, &log);
+ }
+ _error->MergeWithStack();