def testNonFlavorFileChange(self):
        repos = self.openRepository()
        d = { 'cfg' : self.cfg, 'repos' : repos }
        built = []
        text = []

        loader = rephelp.LoaderFromString(recipes.testRecipe1, "/path",
                                          cfg = self.cfg,
                                          repos = repos,
                                          component = 'TestRecipe1')
        recipe = loader.getRecipe()

        recipe.withUse = False
        text.append(recipe.fileText)
        built += self.cookObject(loader)

        # change the flavor and the file
        recipe.withUse = True
        recipe.initialFileText = "1\n2\n3\n4\n5\n"
        text.append(recipe.initialFileText)
        built += self.cookObject(loader)

        # it's a shame built doesn't return the flavors; this makes sure
        # the version wasn't updated though
        assert(built[0][0:2] == built[1][0:2])

        repos = self.openRepository()
        version = versions.VersionFromString(built[0][1])

        # make sure all of the pathIds's are the same in the two components
        troves = [ None, None ]
        troves[0] = (repos.getTrove(built[0][0], version, built[0][2]))
        troves[1] = (repos.getTrove(built[1][0], version, built[1][2]))

        pathIds = {}
        for (pathId, path, fileId, fileVersion) in troves[0].iterFileList():
            pathIds[path] = pathId
        for (pathId, path, fileId, fileVersion) in troves[1].iterFileList():
            assert(pathIds[path] == pathId)
            del pathIds[path]
        assert(not pathIds)

        # XXX
        # if we could specify a flavor for updates we could just do that.
        # we can't, so make changesets and install those
        cs = repos.createChangeSet([('testcase:runtime', (None, None), 
                                     (version, troves[0].getFlavor()), 1)])
        self.updatePkg(self.rootDir, cs)
        assert(open(os.path.join(self.rootDir, "usr/share/changed")).read() ==
                    text[0])

        cs = repos.createChangeSet([('testcase:runtime', 
                                     (None, None),
                                     (version, troves[1].getFlavor()), 1)])
        self.updatePkg(self.rootDir, cs)
        assert(open(os.path.join(self.rootDir, "usr/share/changed")).read() ==
                    text[1])
Test _AssembleDNSequence().
dataset/ETHPy150Open sassoftware/conary/conary_test/updatetest.py/UpdateTest.testNonFlavorFileChange--crossover with--dataset/ETHPy150Open google/simian/src/tests/simian/auth/x509_test.py/X509CertificateTest.testAssembleDNSequenceWhenBadStructure