VirtualBox

Changeset 49103 in vbox


Ignore:
Timestamp:
Oct 15, 2013 6:20:39 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89937
Message:

pr6927. ISO images are skipped by default during export. The command "VBoxManage export" has a new argument "--iso" to explicitly export ISO images.

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp

    r49038 r49103  
    796796        { "--ovf20",              '2', RTGETOPT_REQ_NOTHING },
    797797        { "--manifest",           'm', RTGETOPT_REQ_NOTHING },
     798        { "--iso",                'I', RTGETOPT_REQ_NOTHING },
    798799        { "--vsys",               's', RTGETOPT_REQ_UINT32 },
    799800        { "--product",            'p', RTGETOPT_REQ_STRING },
     
    814815    Utf8Str strOvfFormat("ovf-1.0"); // the default export version
    815816    bool fManifest = false; // the default
     817    bool fExportISOImages = false; // the default
    816818    std::list< ComPtr<IMachine> > llMachines;
    817819
     
    851853                case '2':   // --ovf20
    852854                     strOvfFormat = "ovf-2.0";
     855                     break;
     856
     857                case 'I':   // --iso
     858                     fExportISOImages = true;
    853859                     break;
    854860
     
    10551061            options.push_back(ExportOptions_CreateManifest);
    10561062
     1063        if (fExportISOImages)
     1064            options.push_back(ExportOptions_ExportDVDImages);
     1065
    10571066        ComPtr<IProgress> progress;
    10581067        CHECK_ERROR_BREAK(pAppliance, Write(Bstr(strOvfFormat).raw(),
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r49086 r49103  
    410410                     "                            [--legacy09|--ovf09|--ovf10|--ovf20]\n"
    411411                     "                            [--manifest]\n"
     412                     "                            [--iso]\n"
    412413                     "                            [--vsys <number of virtual system>]\n"
    413414                     "                                    [--product <product name>]\n"
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r49038 r49103  
    339339    const settings::MachineConfigFile* getMachineConfig() const;
    340340
     341    void removeByType(VirtualSystemDescriptionType_T aType);
     342
    341343    /* private instance data */
    342344private:
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r49038 r49103  
    5555      , fManifest(true)
    5656      , fSha256(false)
     57      , fExportISOImages(false)
    5758      , pReader(NULL)
    5859      , ulWeightForXmlOperation(0)
     
    7879    bool                fSha256;        // true = SHA256 (OVF 2.0), false = SHA1 (OVF 1.0)
    7980    Utf8Str             strOVFSHADigest;//SHA digest of OVf file. It is stored here after reading OVF file (before import)
     81
     82    bool                fExportISOImages;// when 1 the ISO images are exported
    8083
    8184    RTCList<ImportOptions_T> optListImport;
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r49039 r49103  
    15591559
    15601560/**
     1561 * Private method; delete all records from the list
     1562 * m->llDescriptions that match the given type.
     1563 * @param aType
     1564 * @return
     1565 */
     1566void VirtualSystemDescription::removeByType(VirtualSystemDescriptionType_T aType)
     1567{
     1568    std::list<VirtualSystemDescriptionEntry*> vsd;
     1569
     1570    list<VirtualSystemDescriptionEntry>::iterator it = m->llDescriptions.begin();
     1571    while (it != m->llDescriptions.end())
     1572    {
     1573        if (it->type == aType)
     1574            it = m->llDescriptions.erase(it);
     1575        else
     1576            ++it;
     1577    }
     1578}
     1579
     1580/**
    15611581 * Private method; looks thru the member hardware items for the IDE, SATA, or SCSI controller with
    15621582 * the given reference ID. Useful when needing the controller for a particular
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r49047 r49103  
    597597        m->optListExport = com::SafeArray<ExportOptions_T>(ComSafeArrayInArg(options)).toList();
    598598
    599     AssertReturn(!(m->optListExport.contains(ExportOptions_CreateManifest) && m->optListExport.contains(ExportOptions_ExportDVDImages)), E_INVALIDARG);
     599//    AssertReturn(!(m->optListExport.contains(ExportOptions_CreateManifest) && m->optListExport.contains(ExportOptions_ExportDVDImages)), E_INVALIDARG);
     600
     601    m->fExportISOImages = m->optListExport.contains(ExportOptions_ExportDVDImages);
     602
     603    if (!m->fExportISOImages)/* remove all ISO images from VirtualSystemDescription */
     604    {
     605        list< ComObjPtr<VirtualSystemDescription> >::const_iterator it;
     606        for (it = m->virtualSystemDescriptions.begin();
     607             it != m->virtualSystemDescriptions.end();
     608             ++it)
     609        {
     610            ComObjPtr<VirtualSystemDescription> vsdescThis = (*it);
     611            vsdescThis->removeByType(VirtualSystemDescriptionType_CDROM);
     612        }
     613    }
    600614
    601615    // do not allow entering this method if the appliance is busy reading or writing
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette