@testhelp.context('rollback', 'fileoverlap')
    def testLocalNonRegularFileChange(self):
        # build recipes
        (built, d) = self.setupRecipes()
        vers = [ x[1] for x in built ]
        pkgname = built[0][0]

        # test that a non-config file that switches from a regular file
        # to a non-regular file updates properly fails with an error
        self.updatePkg(self.rootDir, pkgname, vers[0])

        target = os.path.join(self.rootDir, 'usr/share/changed')
        os.unlink(target)
        os.symlink('danglingSymlink', target)

        self.logCheck(self.updatePkg, (self.rootDir, pkgname, vers[1]), 
                      ("error: changeset cannot be applied:\n"
                       'applying update would cause errors:\n'
                       "file type of /usr/share/changed changed"))
        
        # verify that the update did not succeed
        assert(os.readlink(target) == 'danglingSymlink')

        # it should all work fine if we --replace-files
        self.updatePkg(self.rootDir, pkgname, vers[1], 
                       replaceModifiedFiles = True)
        self.verifyFile(target, d['TestRecipe2'].fileText)

        self.rollback(self.rootDir, 1)
        assert(os.readlink(target) == 'danglingSymlink')

        # test that a config file that switches from a regular file
        # to a non-regular file updates properly fails with an error
        self.resetRoot()
        
        self.updatePkg(self.rootDir, pkgname, vers[0])
        
        target = os.path.join(self.rootDir, 'etc/changedconfig')
        os.unlink(target)
        os.symlink('danglingSymlink', target)

        self.logCheck(self.updatePkg, (self.rootDir, pkgname, vers[1]),
                      ("error: changeset cannot be applied:\n"
                       'applying update would cause errors:\n'
                       "file type of /etc/changedconfig changed",))

        # verify that the update did not succeed
        assert(os.readlink(target) == 'danglingSymlink')

        # it should all work fine if we --replace-files
        self.updatePkg(self.rootDir, pkgname, vers[1], 
                       replaceModifiedConfigFiles = True)
        self.verifyFile(target, d['TestRecipe2'].fileText)

        self.rollback(self.rootDir, 1)
        assert(os.readlink(target) == 'danglingSymlink')
test to ensure that a local file that changes from a
dataset/ETHPy150Open sassoftware/conary/conary_test/updatetest.py/UpdateTest.testLocalNonRegularFileChange