def doFile(self, path):
        autopkg = self.recipe.autopkg
        pkg = autopkg.findComponent(path)
        if pkg is None:
            return
        f = pkg.getFile(path)
        m = self.recipe.magic[path]
        if m and m.name == 'ELF' and 'isnset' in m.contents:
            isnset = m.contents['isnset']
        elif self.hasLibInPath(path) or self.hasLibInDependencyFlag(path, f):
            # all possible paths in a %(lib)s-derived path get default
            # instruction set assigned if they don't have one already
            if f.hasContents:
                isnset = self.baseIsnset
            else:
                # this file can't be marked by arch, but the troves
                # and package must be.  (e.g. symlinks and empty directories)
                # we don't need to union in the base arch flavor more
                # than once.
                if self.troveMarked:
                    return
                self.packageFlavor.union(self.baseArchFlavor)
                self.troveMarked = True
                return
        else:
            return

        flv = deps.Flavor()
        flv.addDep(deps.InstructionSetDependency, deps.Dependency(isnset, []))
        # get the Arch.* dependencies
        # set the flavor for the file to match that discovered in the
        # magic - but do not let that propagate up to the flavor of
        # the package - instead the package will have the flavor that
        # it was cooked with.  This is to avoid unnecessary or extra files
        # causing the entire package from being flavored inappropriately.
        # Such flavoring requires a bunch of Flavor exclusions to fix.
        # Note that we need to set all shared paths between containers
        # to share flavors and ensure that fileIds are the same
        for pkg in autopkg.findComponents(path):
            f = pkg.getFile(path)
            f.flavor.set(flv)

        # get the Arch.* dependencies
        flv.union(self.archFlavor)
        if isnset in self.allowableIsnSets:
            self.packageFlavor.union(flv)