#2 Let the "latest" config option be either an int or a bool
Merged 8 years ago by ausil. Opened 9 years ago by ralph.
ralph/mash master  into  master

file modified
+17 -2
@@ -29,6 +29,7 @@ 

  import multilib

  import metadata

  import yum

+ import yum.config

  

  import rpmUtils.arch

  
@@ -326,11 +327,25 @@ 

  

          if self.config.cachedir and not os.path.exists(self.config.cachedir):

              os.makedirs(self.config.cachedir, 0755)

+ 

          # Get package list. This is an expensive operation.

          self.logger.info("Getting package lists for %s..." % (self.config.tag))

  

-         (pkglist, buildlist) = self.session.listTaggedRPMS(self.config.tag,

-                                                            inherit=self.config.inherit, latest=self.config.latest, rpmsigs=True)

+         # Latest may be an int or a bool.

+         # https://bugzilla.redhat.com/showdependencytree.cgi?id=1082830

+         latest = self.config.latest

+         try:

+             latest = int(latest)

+         except ValueError:

+             latest = yum.config.BoolOption().parse(latest)

+ 

+         (pkglist, buildlist) = self.session.listTaggedRPMS(

+             self.config.tag,

+             inherit=self.config.inherit,

+             latest=latest,

+             rpmsigs=True,

+         )

+ 

          # filter by key

          biglist = PackageList(self.config)

          for pkg in pkglist:

file modified
+1 -1
@@ -114,7 +114,7 @@ 

      max_delta_rpm_size = config.IntOption(300000000)

      max_delta_rpm_age = config.IntOption()

      make_ancient = config.BoolOption(False)

-     latest = config.BoolOption(True)

+     latest = config.Option(True)

      distro_tags = config.Option()

      content_tags = config.ListOption()

      prefer_ppc64 = config.BoolOption(False)

no initial comment

I can not merge this

This repo enforces that all commits are signed off by their author.

can you please resubmit a signed off copy

Rebased with a signed-off message added.

Metadata