def update_ebuild_mask(self, missing = False):
        for ebuild in porttree.iter_ebuilds():
            try:
                ebuild_obj = models.EbuildModel.objects.get(ebuild = ebuild)
            except models.EbuildModel.DoesNotExist:
                if missing:
                    self.missing_ebuild(ebuild)

                continue
            if ebuild_obj.is_hard_masked != ebuild.is_hard_masked:
                self.print_package(ebuild,
                    ebuild.package.category.porttree_name)

                ebuild_obj.is_hard_masked = ebuild.is_hard_masked
                ebuild_obj.save(force_update = True)
 def add_mising_ebuilds(self):
     for ebuild in porttree.iter_ebuilds():
         try:
             ebuild_obj = models.EbuildModel.objects.get(ebuild = ebuild)
         except models.EbuildModel.DoesNotExist:
             self.missing_ebuild(ebuild)