[yum-commits] Branch 'yum-3_2_X' - 6 commits - docs/yum.conf.5 test/packagetests.py yum/config.py yum/depsolve.py yum.spec yum/yumRepo.py

skvidal at osuosl.org skvidal at osuosl.org
Tue Aug 31 21:43:19 UTC 2010


 docs/yum.conf.5      |   19 +++++++++++++++++++
 test/packagetests.py |    1 -
 yum.spec             |    2 +-
 yum/config.py        |    4 ++++
 yum/depsolve.py      |    4 ++++
 yum/yumRepo.py       |    2 ++
 6 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 2c57759d8c83a7595bbfaa4054d46cdbd5f68ad5
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Aug 31 17:42:38 2010 -0400

    remove self.po.rel bogon from the packagetest - since it doesn't do anything
    but it does seem to disturb dmalcolm's tests

diff --git a/test/packagetests.py b/test/packagetests.py
index dac8abd..1e3302b 100644
--- a/test/packagetests.py
+++ b/test/packagetests.py
@@ -8,7 +8,6 @@ class InPrcoRangePackageTests(unittest.TestCase):
 
     def setUp(self):
         self.po = packages.RpmBase()
-        self.po.rel = 10
         self.po.prco['provides'].append(("seth", "EQ", (1, 2, 3)))
         self.po.prco['requires'].append(("foo", "GE", (4, 5, None)))
 
commit c6f489a910c72073b89dc9e4a71fbd49e9374805
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Aug 30 16:45:01 2010 -0400

    bump urlgrabber req to 3.9.2 for the next urlgrabber with username/password

diff --git a/yum.spec b/yum.spec
index c3c7133..fc05aa6 100644
--- a/yum.spec
+++ b/yum.spec
@@ -15,7 +15,7 @@ BuildRequires: intltool
 Requires: python >= 2.4
 Requires: rpm-python, rpm >= 0:4.4.2
 Requires: python-sqlite
-Requires: urlgrabber >= 3.9.0
+Requires: urlgrabber >= 3.9.2
 Requires: yum-metadata-parser >= 1.1.0
 Requires: python-iniparse
 Requires: pygpgme
commit 4951840f636a387b3331136750210974bab848b5
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Aug 30 16:44:36 2010 -0400

    add username/password basic auth options and document in man page

diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 25b2c7d..8acc8f4 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -365,6 +365,14 @@ username to use for proxy
 password for this proxy
 
 .IP
+\fBusername \fR
+username to use for basic authentication to a repo or really any url.
+
+.IP
+\fBpassword \fR
+password to use with the username for basic authentication.
+
+.IP
 \fBplugins \fR
 Either `0' or `1'. Global switch to enable or disable yum plugins. Default is
 `0' (plugins disabled). See the \fBPLUGINS\fR section of the \fByum(8)\fR man
@@ -738,6 +746,17 @@ If this is unset it inherits it from the global setting
 password for this proxy.
 If this is unset it inherits it from the global setting
 
+
+.IP
+\fBusername \fR
+username to use for basic authentication to a repo or really any url.
+If this is unset it inherits it from the global setting
+
+.IP
+\fBpassword \fR
+password to use with the username for basic authentication.
+If this is unset it inherits it from the global setting
+
 .IP
 \fBcost \fR
 relative cost of accessing this repository. Useful for weighing one repo's packages
diff --git a/yum/config.py b/yum/config.py
index 650d7b9..49411e3 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -645,6 +645,8 @@ class YumConf(StartupConf):
     proxy = UrlOption(schemes=('http', 'ftp', 'https'), allow_none=True)
     proxy_username = Option()
     proxy_password = Option()
+    username = Option()
+    password = Option()
     installonlypkgs = ListOption(['kernel', 'kernel-bigmem',
             'kernel-enterprise','kernel-smp', 'kernel-modules', 'kernel-debug',
             'kernel-unsupported', 'kernel-source', 'kernel-devel', 'kernel-PAE',
@@ -794,6 +796,8 @@ class RepoConf(BaseConfig):
     proxy_password = Inherit(YumConf.proxy_password)
     retries = Inherit(YumConf.retries)
     failovermethod = Inherit(YumConf.failovermethod)
+    username = Inherit(YumConf.username)
+    password = Inherit(YumConf.password)
 
     # FIXME: rename gpgcheck to pkgs_gpgcheck
     gpgcheck = Inherit(YumConf.gpgcheck)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index dd595f0..37b4b3d 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -501,6 +501,8 @@ class YumRepository(Repository, config.RepoConf):
                  'ssl_cert': self.sslclientcert,
                  'ssl_key': self.sslclientkey,
                  'user_agent': default_grabber.opts.user_agent,
+                 'username': self.username,
+                 'password': self.password,
                  }
         return opts
 
commit ec20f136bbf846d534d07ee72887ab890ca70dcf
Merge: 59b3869... 530734e...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Aug 30 16:35:29 2010 -0400

    Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
    
    * 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
      l10n: Updated Panjabi (Punjabi) (pa) translation to 84%
      l10n: Updated Panjabi (Punjabi) (pa) translation to 74%

commit 59b3869ec71afd66d2a8e217e2f940efa7b38045
Merge: e5ec157... b25d012...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Aug 24 17:10:30 2010 -0400

    Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
    
    * 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
      l10n: Updated Spanish (Castilian) (es) translation to 100%

commit e5ec15722709427708f82ee18d7b4ee9e2616393
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Aug 24 17:06:52 2010 -0400

    - when we're looking at potential providers - if we have a newer version of the same pkg installed
    score down the pkg in the same way we score down an obsoleted pkg.
    seems to fix: https://bugzilla.redhat.com/show_bug.cgi?id=626965

diff --git a/yum/depsolve.py b/yum/depsolve.py
index e9b3fa7..886cca8 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1195,6 +1195,10 @@ class Depsolve(object):
                     #  We get here from bestPackagesFromList(), give a giant
                     # bump to stuff that is already installed.
                     pkgresults[pkg] += 1000
+                elif newest.verGT(pkg):
+                    # if the version we're looking at is older than what we have installed
+                    # score it down like we would an obsoleted pkg
+                    pkgresults[pkg] -= 1024
             else:
                 # just b/c they're not installed pkgs doesn't mean they should
                 # be ignored entirely. Just not preferred


More information about the Yum-commits mailing list