[yum-commits] 5 commits - docs/yum-security.8 plugins/auto-update-debuginfo reposync.py yum-builddep.py yumdownloader.py

James Antill james at osuosl.org
Thu Aug 11 13:22:37 UTC 2011


 docs/yum-security.8                                    |    8 ++++----
 plugins/auto-update-debuginfo/auto-update-debuginfo.py |    2 +-
 reposync.py                                            |   13 ++++++-------
 yum-builddep.py                                        |   11 ++++++++++-
 yumdownloader.py                                       |   16 ++++++++++++++--
 5 files changed, 35 insertions(+), 15 deletions(-)

New commits:
commit c050fba67f81810ee7320b8bf53819e8da6cfd51
Merge: efb3c7b ccf29c9
Author: James Antill <james at and.org>
Date:   Thu Aug 11 09:22:32 2011 -0400

    Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum-utils
    
    * 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum-utils: (4 commits)
      updated ChangeLog
      ...

commit efb3c7b3fb96523bb5997c163bf4e33ab897f1b8
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Thu Aug 11 14:34:42 2011 +0200

     Fix check for repos in opts, in auto-update-debuginfo plugin. BZ 729964.
    
     Also hasattr(None, 'repos') == False, so we don't need
    to check for None explicitly.

diff --git a/plugins/auto-update-debuginfo/auto-update-debuginfo.py b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
index 39993ad..9ff927c 100644
--- a/plugins/auto-update-debuginfo/auto-update-debuginfo.py
+++ b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
@@ -38,7 +38,7 @@ def _check_man_disable(mdrs, di):
 def enable_debuginfo_repos(yb, conduit):
     mdrs = set()
     opts, args = conduit.getCmdLine()
-    if opts is not None and hasattr(opts.repos) :
+    if hasattr(opts, 'repos'):
         for opt, repoexp in opts.repos:
             if opt == '--disablerepo':
                 mdrs.add(repoexp)
commit bb7abf0c4718a78086ce8e5a5aa8f5b265bdee30
Author: Dennis Gregorovic <dgregor at redhat.com>
Date:   Tue Aug 9 16:12:00 2011 -0400

    Hack for RHN source repos. in yumdownloader/yum-builddep. BZ 710469.

diff --git a/yum-builddep.py b/yum-builddep.py
index d7a37c3..dfcf585 100755
--- a/yum-builddep.py
+++ b/yum-builddep.py
@@ -26,6 +26,8 @@ import logging
 import rpmUtils
 import rpm
 
+rhn_source_repos = False
+
 # Copied from yumdownloader (need a yum-utils python module ;)
 # This is to fix Bug 469
 # To convert from a pkg to a source pkg, we have a problem in that all we have
@@ -118,9 +120,16 @@ class YumBuildDep(YumUtilBase):
         # enable the -source repos for enabled primary repos
         archlist = rpmUtils.arch.getArchList() + ['src']    
         for repo in self.repos.listEnabled():
-            if not repo.id.endswith('-source'):
+            issource_repo = repo.id.endswith('-source')
+            if rhn_source_repos and repo.id.endswith('-source-rpms'):
+                issource_repo = True
+            if rhn_source_repos and (not repo.id.endswith('-source-rpms') and
+                                     repo.id.endswith('-rpms')):
+                srcrepo = repo.id.replace('-rpms', '-source-rpms')
+            elif not issource_repo:
                 srcrepo = '%s-source' % repo.id
             else:
+                # Need to change the arch.
                 repo.close()
                 self.repos.disableRepo(repo.id)
                 srcrepo = repo.id
diff --git a/yumdownloader.py b/yumdownloader.py
index e6107d4..95144f1 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -31,6 +31,8 @@ import shutil
 import rpmUtils
 import logging
 
+rhn_source_repos = False
+
 # This is to fix Bug 469
 # To convert from a pkg to a source pkg, we have a problem in that all we have
 # is "sourcerpm", which can be a different nevra ... but just to make it fun
@@ -112,7 +114,10 @@ class YumDownloader(YumUtilBase):
 
         # Get all src repos.
         src_repos = {}
-        for repo in self.repos.findRepos('*-source'):
+        if rhn_source_repos: # RHN
+            repos_source += self.repos.findRepos('*-source-rpms')
+        repos_source = self.repos.findRepos('*-source')
+        for repo in repos_source:
             src_repos[repo.id] = False
 
         #  Find the enabled bin repos, and mark their respective *-source repo.
@@ -122,9 +127,16 @@ class YumDownloader(YumUtilBase):
                 srcrepo = '%s-source' % repo.id
                 if srcrepo in src_repos:
                     src_repos[srcrepo] = True
+                if not rhn_source_repos:
+                    continue
+                if not repo.id.endswith("-rpms"):
+                    continue
+                srcrepo = repo.id.replace('-rpms', '-source-rpms')
+                if srcrepo in src_repos:
+                    src_repos[srcrepo] = True
 
         # Toggle src repos that are set the wrong way
-        for repo in self.repos.findRepos('*-source'):
+        for repo in repos_source:
             if     repo.isEnabled() and not src_repos[repo.id]:
                 repo.close()
                 self.repos.disableRepo(repo.id)
commit 996bc92659e8b5e0ec549615ed305382304992b6
Author: Kirby Zhou <kirbyzhou at sogou-inc.com>
Date:   Tue Aug 9 15:52:02 2011 -0400

    Do repo setup. before RHN/etc. runs, so we can pick their repos. BZ 713108.

diff --git a/reposync.py b/reposync.py
index 7950854..6aa49cc 100755
--- a/reposync.py
+++ b/reposync.py
@@ -162,6 +162,12 @@ def main():
     elif opts.cachedir:
         my.repos.setCacheDir(opts.cachedir)
 
+    #  Use progress bar display when downloading repo metadata
+    # and package files ... needs to be setup before .repos (ie. RHN/etc.).
+    if not opts.quiet:
+        my.repos.setProgressBar(TextMeter(fo=sys.stdout))
+    my.doRepoSetup()
+
     if len(opts.repoid) > 0:
         myrepos = []
         
@@ -182,13 +188,6 @@ def main():
         print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories"
         sys.exit(1)
 
-    # Use progress bar display when downloading repo metadata
-    # and package files
-    if not opts.quiet:
-        my.repos.setProgressBar(TextMeter(fo=sys.stdout))
-
-    my.doRpmDBSetup()
-    my.doRepoSetup()
     try:
         arches = rpmUtils.arch.getArchList(opts.arch)
         if opts.source:
commit 95228a57ed3cceccbbccfbacd5fecf90272bb3c5
Author: James Antill <james at and.org>
Date:   Tue Aug 9 15:41:04 2011 -0400

    Fix typos in yum-security man page. BZ 720967.

diff --git a/docs/yum-security.8 b/docs/yum-security.8
index 7e260b0..f504fee 100644
--- a/docs/yum-security.8
+++ b/docs/yum-security.8
@@ -109,7 +109,7 @@ distribution.
 There are four options added to yum that are available in the "list updates", "info updates", "check-update" and "update" commands. They are:
 .PP 
 .IP "\fB\--advisory\fP"
-This option includes packages coresponding to the advisory ID, Eg. FEDORA-2201-123.
+This option includes packages corresponding to the advisory ID, Eg. FEDORA-2201-123.
 .IP "\fB\--bz\fP"
 This option includes packages that say they fix a Bugzilla ID, Eg. 123.
 .IP "\fB\--cve\fP"
@@ -123,7 +123,7 @@ This option includes packages that say they fix a security issue.
 
 .SH "EXAMPLES"
 .PP
-To list all updates that are security relevant, and get a reutrn code on whether there are security updates use:
+To list all updates that are security relevant, and get a return code on whether there are security updates use:
 .IP
 yum --security check-update
 .PP
@@ -141,7 +141,7 @@ To get a list of all BZs that are fixed for packages you have installed use:
 .IP
 yum updateinfo list bugzillas
 .PP
-To get a list of all security advisoryies, including the ones you have already
+To get a list of all security advisories, including the ones you have already
 installed use:
 .IP
 yum updateinfo list all security
@@ -185,6 +185,6 @@ James Antill <james.antill at redhat.com>.
 .SH "BUGS"
 The update-minimal command ignores the --obsoletes flag.
 
-The update-minimal command can only directly affect things atm., so if you update pkgA minimally but that requires an update to pkgB then pkgB will be updated to the newest version by the depsolver. Also the above will happen even if you've also minimally updated pkgB, if either the direct (minimal) update for pkgB happens after or if the minimal update for pkgB doesn't satisy the requirements of pkgA.
+The update-minimal command can only directly affect things atm., so if you update pkgA minimally but that requires an update to pkgB then pkgB will be updated to the newest version by the depsolver. Also the above will happen even if you've also minimally updated pkgB, if either the direct (minimal) update for pkgB happens after or if the minimal update for pkgB doesn't satisfy the requirements of pkgA.
 
 The main "problem" is that if the data is not correct the plugin cannot work correctly. For instance "--bz 123" will not fix BZ 123 if a package is updated to fix that BZ without referencing that it does so in the updateinfo.xml.


More information about the Yum-commits mailing list