Commits

Anonymous committed 73d25f6

Change latest mode to build groups promote and mirror with advisories disabled

  • Participants
  • Parent commits 81dfb80

Comments (0)

Files changed (3)

File updatebot/bot.py

         start = time.time()
         log.info('starting update')
 
+        if not expectedRemovals:
+            ##
+            # We are going to put together a list of all the removed pkgs
+            # it is needed to check the group for stuff we want out
+            ##
+
+            removeObsoleted = set([ x for x in
+                itertools.chain(*self._cfg.removeObsoleted.values()) ])
+            updateRemovesPackage = set([ x for x in
+                itertools.chain(*self._cfg.updateRemovesPackages.values()) ])
+
+            expectedRemovals = removeObsoleted | updateRemovesPackage
+
+
         # Populate rpm source object from yum metadata.
         self._pkgSource.load()
 
         else:
             trvMap = self._builder.buildsplitarch(buildTroves)
 
-        if not self._cfg.disableAdvisories:
-            # Build group.
-            grpTrvs = (self._cfg.topSourceGroup, )
-            grpTrvMap = self._builder.build(grpTrvs)
 
-            # Promote group.
-            # We expect that everything that was built will be published.
-            expected = self._flattenSetDict(trvMap)
-            toPublish = self._flattenSetDict(grpTrvMap)
-            newTroves = self._updater.publish(toPublish, expected,
+        log.info("Proceed to build groups")
+
+        # Build group.
+        grpTrvs = (self._cfg.topSourceGroup, )
+        grpTrvMap = self._builder.build(grpTrvs)
+
+        # Promote group.
+        # We expect that everything that was built will be published.
+        expected = self._flattenSetDict(trvMap)
+        toPublish = self._flattenSetDict(grpTrvMap)
+        newTroves = self._updater.publish(toPublish, expected,
                                               self._cfg.targetLabel)
 
-            # Mirror out content
-            self._updater.mirror()
+        # Mirror out what we have done
+        self._updater.mirror()
 
+        if not self._cfg.disableAdvisories:
             # Send advisories.
             self._advisor.send(toAdvise, newTroves)
 

File updatebot/current.py

         # For debuging
         self._updateId = updateId
         log.info('UpdateID is %s' % self._updateId)
+        import epdb;epdb.st()
+
+
         # Figure out what packages still need to be promoted.
         promotePkgs = self._getPromotePackages()
 

File updatebot/update.py

                 srcPkg = self._pkgSource.binPkgMap[binPkg]
             elif (line.strip().endswith('.src.rpm') and
                   self._cfg.synthesizeSources):
+                print "This is a fake source %s" % line
                 # this is a fake source.  Move on.
                 continue
             else: