VirtualBox

Changeset 68918 in vbox


Ignore:
Timestamp:
Sep 28, 2017 4:30:45 PM (7 years ago)
Author:
vboxsync
Message:

Main,iprt: Don't fail an import just because the manifest contains more entries than what we processed during the import.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/manifest.h

    r62473 r68918  
    123123 * @todo implement this  */
    124124#define RTMANIFEST_EQUALS_IGN_MISSING_ATTRS_1ST     RT_BIT_32(1)
     125/** Ignore missing entries in the 2nd manifest. */
     126#define RTMANIFEST_EQUALS_IGN_MISSING_ENTRIES_2ND   RT_BIT_32(2)
    125127/** Mask of valid flags. */
    126 #define RTMANIFEST_EQUALS_VALID_MASK                UINT32_C(0x00000003)
     128#define RTMANIFEST_EQUALS_VALID_MASK                UINT32_C(0x00000005)
    127129/** @}  */
    128130
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r68158 r68918  
    22402240        char szErr[256];
    22412241        vrc = RTManifestEqualsEx(m->hTheirManifest, m->hOurManifest, NULL /*papszIgnoreEntries*/,
    2242                                  NULL /*papszIgnoreAttrs*/, RTMANIFEST_EQUALS_IGN_MISSING_ATTRS, szErr, sizeof(szErr));
     2242                                 NULL /*papszIgnoreAttrs*/,
     2243                                 RTMANIFEST_EQUALS_IGN_MISSING_ATTRS | RTMANIFEST_EQUALS_IGN_MISSING_ENTRIES_2ND,
     2244                                 szErr, sizeof(szErr));
    22432245        if (RT_SUCCESS(vrc))
    22442246            hrc = S_OK;
  • trunk/src/VBox/Runtime/common/checksum/manifest2.cpp

    r68496 r68918  
    554554    if (!pEntry2)
    555555    {
    556         RTStrPrintf(pEquals->pszError, pEquals->cbError, "'%s' not found in the 2nd manifest", pEntry1->StrCore.pszString);
    557         return VERR_NOT_EQUAL;
     556        if (!(pEquals->fFlags & RTMANIFEST_EQUALS_IGN_MISSING_ENTRIES_2ND))
     557        {
     558            RTStrPrintf(pEquals->pszError, pEquals->cbError, "'%s' not found in the 2nd manifest", pEntry1->StrCore.pszString);
     559            return VERR_NOT_EQUAL;
     560        }
     561        pEntry1->fVisited = true;
     562        return VINF_SUCCESS;
    558563    }
    559564
     
    590595        AssertReturn(pThis2->u32Magic == RTMANIFEST_MAGIC, VERR_INVALID_HANDLE);
    591596    }
    592     AssertReturn(!(fFlags & ~(RTMANIFEST_EQUALS_IGN_MISSING_ATTRS)), VERR_INVALID_PARAMETER);
     597    AssertReturn(!(fFlags & ~RTMANIFEST_EQUALS_VALID_MASK), VERR_INVALID_PARAMETER);
    593598
    594599    /*
Note: See TracChangeset for help on using the changeset viewer.

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