rpms/yum/devel yum-HEAD.patch,1.50,1.51 yum.spec,1.308,1.309

James Antill james at fedoraproject.org
Fri Apr 16 14:27:49 UTC 2010


Author: james

Update of /cvs/pkgs/rpms/yum/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13892

Modified Files:
	yum-HEAD.patch yum.spec 
Log Message:
* Fri Apr 16 2010 James Antill <james at fedoraproject.org> - 3.2.27-7
- Latest yum-3_2_X head.
- Add the "big update" speedup patch.
- Add nocontexts ts flag.
- Add provides and obsoleted to "yum check".
- Add new dump_xml stuff for createrepo/modifyrepo.
- Move /var/lib/yum/vars to /etc/yum/vars


yum-HEAD.patch:
 Makefile                 |    2 
 b/Makefile               |    2 
 b/cli.py                 |   63 ++
 b/docs/yum.8             |   10 
 b/docs/yum.conf.5        |    5 
 b/etc/Makefile           |    1 
 b/etc/yum.bash           |    7 
 b/output.py              |   39 +
 b/po/fi.po               |  204 ++++-----
 b/po/ru.po               |   13 
 b/rpmUtils/miscutils.py  |   45 --
 b/rpmUtils/oldUtils.py   |    2 
 b/rpmUtils/updates.py    |   13 
 b/test/depsolvetests.py  |   16 
 b/test/testbase.py       |    2 
 b/utils.py               |    3 
 b/yum.spec               |    3 
 b/yum/__init__.py        |   11 
 b/yum/config.py          |    3 
 b/yum/depsolve.py        |   12 
 b/yum/history.py         |   35 +
 b/yum/logginglevels.py   |    3 
 b/yum/misc.py            |    9 
 b/yum/packageSack.py     |   32 -
 b/yum/packages.py        |   16 
 b/yum/pgpmsg.py          |    3 
 b/yum/repoMDObject.py    |   93 +++-
 b/yum/rpmsack.py         |   17 
 b/yum/sqlitesack.py      |   27 +
 b/yum/transactioninfo.py |   11 
 b/yum/update_md.py       |    5 
 b/yum/yumRepo.py         |    9 
 b/yumcommands.py         |   23 -
 cli.py                   |   56 ++
 docs/yum.8               |   31 +
 docs/yum.conf.5          |   41 +
 etc/yum.bash             |   15 
 output.py                |   11 
 po/ru.po                 | 1038 +++++++++++++++++++++--------------------------
 test/testbase.py         |   13 
 yum.spec                 |    9 
 yum/__init__.py          |  100 ++--
 yum/config.py            |   43 +
 yum/depsolve.py          |   42 +
 yum/logginglevels.py     |   51 +-
 yum/packageSack.py       |   30 -
 yum/packages.py          |   95 +++-
 yum/pgpmsg.py            |    4 
 yum/repoMDObject.py      |    5 
 yum/rpmsack.py           |  116 ++++-
 yum/sqlitesack.py        |   76 ++-
 yum/transactioninfo.py   |    6 
 yumcommands.py           |   13 
 53 files changed, 1551 insertions(+), 983 deletions(-)

Index: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -p -r1.50 -r1.51
--- yum-HEAD.patch	12 Apr 2010 19:08:40 -0000	1.50
+++ yum-HEAD.patch	16 Apr 2010 14:27:45 -0000	1.51
@@ -1,7 +1,7 @@
 From cc5d13a39dcefbc401255d224c8700f4f907f285 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Mon, 22 Mar 2010 19:31:43 +0200
-Subject: [PATCH 01/53] Fix unknown syslog facility mapping.
+Subject: [PATCH 01/67] Fix unknown syslog facility mapping.
 
 ---
  yum/logginglevels.py |    2 +-
@@ -27,7 +27,7 @@ index 6c23f88..3d82b55 100644
 From 11dfde5e065e21c5bdb25a087501b90afe0b0dab Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Tue, 23 Mar 2010 10:09:20 -0400
-Subject: [PATCH 02/53] make sure we aren't overwriting the value of 'keys'
+Subject: [PATCH 02/67] make sure we aren't overwriting the value of 'keys'
 
 this determines how many args we pass back in our yielded results
 never noticed it b/c nothing in yum uses keys=True - but it broke PK
@@ -72,7 +72,7 @@ index ea73549..0aaa819 100644
 From c6f4d336bd6be5cdb575c94628da2eb7bcb900f4 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Mon, 22 Mar 2010 19:56:44 +0200
-Subject: [PATCH 03/53] Use LOG_USER as default syslog facility everywhere in base.
+Subject: [PATCH 03/67] Use LOG_USER as default syslog facility everywhere in base.
 
 ---
  yum/config.py |    2 +-
@@ -98,7 +98,7 @@ index ad8db7e..cb01306 100644
 From 40a53f0d3a8dd8ad4fb4802890e4f30b0214f3f9 Mon Sep 17 00:00:00 2001
 From: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>
 Date: Wed, 24 Mar 2010 12:37:03 +0000
-Subject: [PATCH 04/53] l10n: Updates to Finnish (fi) translation
+Subject: [PATCH 04/67] l10n: Updates to Finnish (fi) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -708,7 +708,7 @@ index 4347eba..4240973 100644
 From 2d8c8f210292766cc5389ac5700c3fa7fe1c8342 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 18:25:35 +0200
-Subject: [PATCH 05/53] Fix syslog_indent and syslog_facility settings, improve syslog format.
+Subject: [PATCH 05/67] Fix syslog_indent and syslog_facility settings, improve syslog format.
 
 ---
  yum/logginglevels.py |   22 +++++++++-------------
@@ -785,7 +785,7 @@ index 3d82b55..3a62945 100644
 From a479fa2fca23ca0173cc06f7e4e24305df0db3cc Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 19:19:30 +0200
-Subject: [PATCH 06/53] Add support for remote syslogs with host:port values for syslog_device.
+Subject: [PATCH 06/67] Add support for remote syslogs with host:port values for syslog_device.
 
 ---
  yum/logginglevels.py |   27 +++++++++++++++++----------
@@ -836,7 +836,7 @@ index 3a62945..1ab11db 100644
 From b9484bfd83e3c0f83389a649a4cfd7b50b8c2b8e Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 22:04:35 +0200
-Subject: [PATCH 07/53] Document syslog_ident and syslog_facility config parameters.
+Subject: [PATCH 07/67] Document syslog_ident and syslog_facility config parameters.
 
 ---
  docs/yum.conf.5 |    4 ++--
@@ -867,7 +867,7 @@ index cca3db7..a4789da 100644
 From 311221f71bba055a623565996e981156265789ef Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Wed, 24 Mar 2010 23:31:28 +0200
-Subject: [PATCH 08/53] Make syslog_device configurable.
+Subject: [PATCH 08/67] Make syslog_device configurable.
 
 ---
  docs/yum.conf.5 |    6 ++++++
@@ -941,7 +941,7 @@ index cb01306..c82fabc 100644
 From 203a39125e1de20500739c94e7c92d074d19790f Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 4 Mar 2010 17:17:30 -0500
-Subject: [PATCH 09/53]  Add distro-sync command, to "force update" to the latest versions.
+Subject: [PATCH 09/67]  Add distro-sync command, to "force update" to the latest versions.
 
  This should be safe to go in for 3.2.27, as it's an entirely self
 contained command ... I've tried it here going on multiple directions,
@@ -1072,7 +1072,7 @@ index 35bd97c..88c047f 100644
 From cb59d97fba6765d03a908219d5258b3896f2ecb1 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 11:54:41 -0500
-Subject: [PATCH 10/53] Add documentation for distro-sync command.
+Subject: [PATCH 10/67] Add documentation for distro-sync command.
 
 ---
  docs/yum.8 |    9 +++++++++
@@ -1112,7 +1112,7 @@ index 8d42d9d..ff7ed8f 100644
 From a33aa64f23ac3c197871e9100c99e9cccc3f58b1 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 11:47:33 -0500
-Subject: [PATCH 11/53] Add a little more documentation to get_applicable_notices()
+Subject: [PATCH 11/67] Add a little more documentation to get_applicable_notices()
 
 ---
  yum/update_md.py |    4 +++-
@@ -1146,7 +1146,7 @@ index 54d4cd7..fc051b0 100644
 From 008d74a13173bcb7005e7150ebc1367720078452 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 11 Mar 2010 14:47:40 -0500
-Subject: [PATCH 12/53]  Return an error code if yum can't install any of the specified packages
+Subject: [PATCH 12/67]  Return an error code if yum can't install any of the specified packages
 
  People want a bash scriptable way to say "X should be installed". So
 with this patch:
@@ -1205,7 +1205,7 @@ index a34d205..cebbae3 100644
 From b3ca56aed8f2949b73d07bf3c1aa90ae20793848 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Tue, 16 Mar 2010 17:37:04 -0400
-Subject: [PATCH 13/53] Add the provides data for each pkg, to format_missing_requires. Add relations.
+Subject: [PATCH 13/67] Add the provides data for each pkg, to format_missing_requires. Add relations.
 
 ---
  output.py |   38 +++++++++++++++++++++++++++++++++-----
@@ -1280,7 +1280,7 @@ index b09730a..aa5dc4d 100755
 From f2c3967ea8185541a3c68fad754d19b2dfd71d35 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Mon, 22 Mar 2010 14:21:11 -0400
-Subject: [PATCH 14/53]  Don't traceback when we can't open the history DB (non-root users by default
+Subject: [PATCH 14/67]  Don't traceback when we can't open the history DB (non-root users by default
  now), BZ 575917.
   Provide a .readable interface for callers to check.
 
@@ -1418,7 +1418,7 @@ index 2707cac..3ef5f74 100644
 From 7d04b0e6816cfb27e769bb19f44811f88523ed2b Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Mon, 22 Mar 2010 17:43:25 -0400
-Subject: [PATCH 15/53] Minor description fixup
+Subject: [PATCH 15/67] Minor description fixup
 
 ---
  yum.spec |    2 +-
@@ -1444,7 +1444,7 @@ index 29870e5..3a724cd 100644
 From 1c2b28e36ef1d7051428ea57446cf800b388f36e Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 25 Mar 2010 11:29:06 -0400
-Subject: [PATCH 16/53] Show if transactions have error output, in history list
+Subject: [PATCH 16/67] Show if transactions have error output, in history list
 
 ---
  docs/yum.8 |    2 ++
@@ -1485,7 +1485,7 @@ index aa5dc4d..c4fde7c 100755
 From 5579a905155a6be3171f6968a24e691bafcac40b Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 25 Mar 2010 11:53:51 -0400
-Subject: [PATCH 17/53] Fix login user column output length, for history summary
+Subject: [PATCH 17/67] Fix login user column output length, for history summary
 
 ---
  output.py |    2 +-
@@ -1511,7 +1511,7 @@ index c4fde7c..7b09695 100755
 From 9c3b0e9ae6b86cd96ee8751fc9e131e063724b23 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 25 Mar 2010 15:57:24 -0400
-Subject: [PATCH 18/53] Add groupremove_leaf_only option
+Subject: [PATCH 18/67] Add groupremove_leaf_only option
 
 ---
  docs/yum.8      |    3 +++
@@ -1610,7 +1610,7 @@ index 11c9f29..f654d84 100644
 From e0175dae0b4eb45f4c2b14f816f1145553ef0e1b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Fri, 26 Mar 2010 20:44:37 +0200
-Subject: [PATCH 19/53] Add distro-sync completion.
+Subject: [PATCH 19/67] Add distro-sync completion.
 
 ---
  etc/yum.bash |    6 +++---
@@ -1651,7 +1651,7 @@ index 5dfdb64..c71344e 100644
 From 1f800dfd4b8c7adb96c653ebd41f7d6b3869d569 Mon Sep 17 00:00:00 2001
 From: Timur Malikin <sora_tm at mail.ru>
 Date: Sun, 28 Mar 2010 14:56:53 +0000
-Subject: [PATCH 20/53] l10n: Updates to Russian (ru) translation
+Subject: [PATCH 20/67] l10n: Updates to Russian (ru) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -1708,7 +1708,7 @@ index a1b946e..7c5137d 100644
 From 305cb4c7c937dd2ea59180c4f08c0635c614e9c9 Mon Sep 17 00:00:00 2001
 From: Timur Malikin <sora_tm at mail.ru>
 Date: Sun, 28 Mar 2010 14:58:49 +0000
-Subject: [PATCH 21/53] l10n: Updates to Russian (ru) translation
+Subject: [PATCH 21/67] l10n: Updates to Russian (ru) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -1744,7 +1744,7 @@ index 7c5137d..44c4591 100644
 From 32fa4bdafb9c820af8f6bbbbc75cea976725e247 Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Mon, 29 Mar 2010 22:25:18 -0400
-Subject: [PATCH 22/53] add --setopt option to yum cli
+Subject: [PATCH 22/67] add --setopt option to yum cli
 
 this allows setting any config option by name. Either globally or in
 any repo config.
@@ -1882,7 +1882,7 @@ index 7b84a61..88d4467 100644
 From d38a25828b7699a6ffdaaecb06ba223ff2d24edb Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Tue, 30 Mar 2010 18:47:35 +0300
-Subject: [PATCH 23/53] Add --setopt to completions.
+Subject: [PATCH 23/67] Add --setopt to completions.
 
 ---
  etc/yum.bash |    4 ++--
@@ -1917,7 +1917,7 @@ index c71344e..966e33a 100644
 From ecfd7b5e643bab7337d44c981157768b86cab439 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Tue, 30 Mar 2010 14:31:11 -0400
-Subject: [PATCH 24/53] Test for repo_setopts, only there for cli
+Subject: [PATCH 24/67] Test for repo_setopts, only there for cli
 
 ---
  yum/__init__.py |    2 +-
@@ -1943,7 +1943,7 @@ index 88d4467..f7dd8f2 100644
 From 3e1d76650dc1c5c6128a75230db80d50e56fde65 Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Tue, 30 Mar 2010 14:39:34 -0400
-Subject: [PATCH 25/53] change out the repo_setopts fix  so instead of hasattr'ing it - we
+Subject: [PATCH 25/67] change out the repo_setopts fix  so instead of hasattr'ing it - we
  are adding an empty one.
 
 ---
@@ -1980,7 +1980,7 @@ index f7dd8f2..cbb0dfa 100644
 From 4f267e0e7eca1898ff57a546e8daa9cf89450e20 Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Tue, 30 Mar 2010 16:54:37 -0400
-Subject: [PATCH 26/53] minor change so that if there are any empty lines in the gpgkey file we're
+Subject: [PATCH 26/67] minor change so that if there are any empty lines in the gpgkey file we're
  checking that we don't traceback.
 
 We won't find a key, but at least we don't traceback b/c of it.
@@ -2009,7 +2009,7 @@ index f8dccdb..454768a 100644
 From 01c8ad02dedeb47842d4a01593abcdba3617904a Mon Sep 17 00:00:00 2001
 From: Misha Shnurapet <zayzayats at yandex.ru>
 Date: Thu, 1 Apr 2010 17:49:34 +0000
-Subject: [PATCH 27/53] l10n: Updates to Russian (ru) translation
+Subject: [PATCH 27/67] l10n: Updates to Russian (ru) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -3908,7 +3908,7 @@ index 44c4591..47cd5ba 100644
 From 0ac90c93ee164ea24951926e8b26ae897ec270af Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Thu, 1 Apr 2010 15:29:18 -0400
-Subject: [PATCH 28/53] fix the documentation to be on the correct methods.
+Subject: [PATCH 28/67] fix the documentation to be on the correct methods.
 
 ---
  yum/packageSack.py |   31 ++++++++++++++++---------------
@@ -4010,7 +4010,7 @@ index 1278cba..723f0cd 100644
 From 204f47d96e8c585b96da60adf4ef94d8211be168 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Tue, 30 Mar 2010 15:48:29 -0400
-Subject: [PATCH 29/53]  Speedup repeated calls to .install() with a pattern, via. returnPackages().
+Subject: [PATCH 29/67]  Speedup repeated calls to .install() with a pattern, via. returnPackages().
       Add negative caching to both sqlite and rpmdb.
       Add pkg names with a '-' in them to pkgnames_loaded in sqlite.
 
@@ -4173,7 +4173,7 @@ index 1d6c764..9a95b7b 100644
 From ae29fa070f83cf2e11b06ea938468e51eac00eba Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Tue, 30 Mar 2010 18:47:49 -0400
-Subject: [PATCH 30/53] Add searchProvides() into the false positive cache
+Subject: [PATCH 30/67] Add searchProvides() into the false positive cache
 
 ---
  yum/sqlitesack.py |    7 ++++++-
@@ -4204,7 +4204,7 @@ index 9a95b7b..d387c76 100644
 From 1f76f743d187226461a226358147c37d42a8fab1 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Tue, 30 Mar 2010 18:52:39 -0400
-Subject: [PATCH 31/53] Pkgname caching for rpmdb.returnPackages() so update is as fast as install
+Subject: [PATCH 31/67] Pkgname caching for rpmdb.returnPackages() so update is as fast as install
 
 ---
  yum/rpmsack.py |   31 ++++++++++++++++++++++++++-----
@@ -4316,7 +4316,7 @@ index 4580150..4c17b67 100644
 From 2a9161a8b4bfc121fa8245700df355c63b58b442 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Wed, 31 Mar 2010 00:12:09 -0400
-Subject: [PATCH 32/53] Should work around the reget MD problems
+Subject: [PATCH 32/67] Should work around the reget MD problems
 
 ---
  yum/yumRepo.py |    8 ++++++++
@@ -4351,7 +4351,7 @@ index 8d7617e..b67b897 100644
 From 9ef0326b38b2098d5bac9442ec4eac2fb0f06bb0 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 1 Apr 2010 18:25:50 -0400
-Subject: [PATCH 33/53] Fix make check due to groupremove_leaf_only
+Subject: [PATCH 33/67] Fix make check due to groupremove_leaf_only
 
 ---
  test/testbase.py |    1 +
@@ -4376,7 +4376,7 @@ index 0b05812..b4ce5d7 100644
 From 3d629ee9686dc972ebd431ee0db9c5912e4f24f3 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 1 Apr 2010 18:26:16 -0400
-Subject: [PATCH 34/53] Add testcase for dcbd and lldpad in F13
+Subject: [PATCH 34/67] Add testcase for dcbd and lldpad in F13
 
 ---
  test/depsolvetests.py |   15 +++++++++++++++
@@ -4412,7 +4412,7 @@ index 02bbf8f..7af3f16 100644
 From 20b93715c0cf57068c5714699a2f2065a0489e2c Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Thu, 1 Apr 2010 18:29:35 -0400
-Subject: [PATCH 35/53] Use TMPDIR for people who don't want to use /var/tmp, yum#337
+Subject: [PATCH 35/67] Use TMPDIR for people who don't want to use /var/tmp, yum#337
 
 ---
  yum/__init__.py |    6 +++++-
@@ -4448,7 +4448,7 @@ index cbb0dfa..917fa1f 100644
 From 7a56e51a1fa707d46f58ccb8d5687617d78795b6 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Sat, 3 Apr 2010 17:13:02 -0400
-Subject: [PATCH 36/53] Don't traceback when lock holder doesn't exist anymore
+Subject: [PATCH 36/67] Don't traceback when lock holder doesn't exist anymore
 
 ---
  utils.py |    2 +-
@@ -4474,7 +4474,7 @@ index dd6b642..e93facb 100644
 From c6ffca42ae0c542e0c16ef7d5d2fbba1db1c5fb6 Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Thu, 8 Apr 2010 11:27:45 -0400
-Subject: [PATCH 37/53] make rangecompare accept <, <=, >, >=, = instead of just letterflags and numerics
+Subject: [PATCH 37/67] make rangecompare accept <, <=, >, >=, = instead of just letterflags and numerics
 
 makes certain types of comparisons simpler when coming from text.
 ---
@@ -4560,7 +4560,7 @@ index a925027..b5f3566 100644
 From 72e0bbb2d2dd704071e222b2b3cea86d31d22985 Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Thu, 8 Apr 2010 11:28:45 -0400
-Subject: [PATCH 38/53] add a provides_for method to package objects
+Subject: [PATCH 38/67] add a provides_for method to package objects
 
 so we can check if this package satisfies the specific requirement
 completely (including file deps).
@@ -4608,7 +4608,7 @@ index 33cbc39..58be729 100644
 From 8f7e8978263d9c60bdfa37abaf0c6a44ed42b46d Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Thu, 8 Apr 2010 14:05:25 -0400
-Subject: [PATCH 39/53] fix for testRL_dcbd1 unittest -
+Subject: [PATCH 39/67] fix for testRL_dcbd1 unittest -
 
 When we're doing an install for dep - make sure what we're installing provides for the thing we need.
 this should really only ever happen on the obsolete pathway.
@@ -4688,7 +4688,7 @@ index f654d84..48f77d5 100644
 From c508ed6723b73b7606637376b374ee72e5afd42b Mon Sep 17 00:00:00 2001
 From: Seth Vidal <skvidal at fedoraproject.org>
 Date: Thu, 8 Apr 2010 16:22:04 -0400
-Subject: [PATCH 40/53] - clean up debug statement :(
+Subject: [PATCH 40/67] - clean up debug statement :(
  - make provides_for use misc.re_primary_filename/dirname
 
 ---
@@ -4731,7 +4731,7 @@ index 58be729..f4a00eb 100644
 From 12a63c100f706738805cb0ead8852308be88027d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Thu, 8 Apr 2010 23:58:58 +0300
-Subject: [PATCH 41/53] Spelling fixes.
+Subject: [PATCH 41/67] Spelling fixes.
 
 ---
  rpmUtils/oldUtils.py |    2 +-
@@ -4833,7 +4833,7 @@ index d387c76..5887cb7 100644
 From 0e58f4bbafd9e1701a33e3805015d647565239c4 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 00:09:51 -0400
-Subject: [PATCH 42/53] Cleanup the docs for re_primary_*() to make them less confusing
+Subject: [PATCH 42/67] Cleanup the docs for re_primary_*() to make them less confusing
 
 ---
  yum/misc.py     |    9 ++++-----
@@ -4886,7 +4886,7 @@ index f4a00eb..427893b 100644
 From 1b6b585eab225209cfbfdc156eeb27197dfecedc Mon Sep 17 00:00:00 2001
 From: skvidal <skvidal at fedoraproject.org>
 Date: Fri, 9 Apr 2010 14:06:19 +0000
-Subject: [PATCH 43/53] l10n: Updates to Russian (ru) translation
+Subject: [PATCH 43/67] l10n: Updates to Russian (ru) translation
 
 Transmitted-via: Transifex (www.transifex.net)
 ---
@@ -5801,7 +5801,7 @@ index 47cd5ba..ad4391c 100644
 From 8d3f214597e03e5f4e30c877351cf4926a241627 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 00:17:36 -0400
-Subject: [PATCH 44/53] Allow users to see just specific version groups
+Subject: [PATCH 44/67] Allow users to see just specific version groups
 
 ---
  yumcommands.py |    6 ++++++
@@ -5838,7 +5838,7 @@ index 88c047f..9bc06ad 100644
 From 543344aa1346a5e3b37a6b813121f6078cfb9aa4 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 15:59:07 -0400
-Subject: [PATCH 45/53] Add dynamic yumvars from the filesystem.
+Subject: [PATCH 45/67] Add dynamic yumvars from the filesystem.
 
 ---
  docs/yum.conf.5 |   12 ++++++++++++
@@ -5922,7 +5922,7 @@ index d869a26..e13eb12 100644
 From d2638b9d8b360713f9739a88dfa03e1e3ffab28b Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 16:14:27 -0400
-Subject: [PATCH 46/53] Remove bad assert: yum list blah\*
+Subject: [PATCH 46/67] Remove bad assert: yum list blah\*
 
 ---
  yum/sqlitesack.py |    1 -
@@ -5947,7 +5947,7 @@ index 5887cb7..8a4ec8b 100644
 From 3ec0eb7fe87f339c71539636282c018d278d04c5 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 16:46:08 -0400
-Subject: [PATCH 47/53]  Disallow symlinks, for variables (although it is root only), and tweak docs
+Subject: [PATCH 47/67]  Disallow symlinks, for variables (although it is root only), and tweak docs
 
  Add the vars directory on install, to make it easier for users.
  Own the vars directory in the specfile.
@@ -6039,7 +6039,7 @@ index e13eb12..ea8bcbf 100644
 From cf43ce922a58f6514a7bc76cdc326a89134379fc Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Fri, 9 Apr 2010 16:59:16 -0400
-Subject: [PATCH 48/53] Add more docs for version command
+Subject: [PATCH 48/67] Add more docs for version command
 
 ---
  docs/yum.8 |   20 +++++++++++++++++++-
@@ -6090,7 +6090,7 @@ index d36b1cc..6761f1c 100644
 From 7fc1a9491a0fc74ec9cf4e95f3c28a0e86c408cd Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Sat, 10 Apr 2010 13:47:48 +0300
-Subject: [PATCH 49/53] Add basic version completion.
+Subject: [PATCH 49/67] Add basic version completion.
 
 ---
  etc/yum.bash |    9 ++++++++-
@@ -6130,7 +6130,7 @@ index 966e33a..0fcba24 100644
 From c46e474d6db8f1e1d9aff21de44a3325535cb24f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta at iki.fi>
 Date: Sat, 10 Apr 2010 13:58:43 +0300
-Subject: [PATCH 50/53] Clean up some unnecessary/redundant code.
+Subject: [PATCH 50/67] Clean up some unnecessary/redundant code.
 
 ---
  rpmUtils/updates.py |   13 +++++--------
@@ -6197,7 +6197,7 @@ index ed64441..e45d70a 100644
 From d3c698e03df6f664c67b61301320ebdc2dc11422 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Mon, 12 Apr 2010 11:50:55 -0400
-Subject: [PATCH 51/53] Do the pkgnames_loaded in the correct place, for _search
+Subject: [PATCH 51/67] Do the pkgnames_loaded in the correct place, for _search
 
 ---
  yum/rpmsack.py |    7 ++++---
@@ -6235,7 +6235,7 @@ index 4c17b67..179b008 100644
 From 62759284de079371407f4ba429f48a0be5a5589b Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Mon, 12 Apr 2010 11:53:17 -0400
-Subject: [PATCH 52/53] Do the pkgmatch_fails negative caching, in _search
+Subject: [PATCH 52/67] Do the pkgmatch_fails negative caching, in _search
 
 ---
  yum/rpmsack.py |   10 ++++++++++
@@ -6297,7 +6297,7 @@ index 179b008..2b932cf 100644
 From e45f29737d830587373e2b494fdcee95ad708e65 Mon Sep 17 00:00:00 2001
 From: James Antill <james at and.org>
 Date: Mon, 12 Apr 2010 11:56:00 -0400
-Subject: [PATCH 53/53] Don't integrate negative pkgnames with provides, probably fine but...
+Subject: [PATCH 53/67] Don't integrate negative pkgnames with provides, probably fine but...
 
 ---
  yum/rpmsack.py    |    6 ++++--
@@ -6375,3 +6375,1273 @@ index 8a4ec8b..344a966 100644
 -- 
 1.6.6.1
 
+
+From ade6d1655f790cc3be68eb8178d164f9c3e1cc3e Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Tue, 13 Apr 2010 11:50:28 -0400
+Subject: [PATCH 54/67] Move /var/lib/yum/vars to /etc/yum/vars as it's not yum generated
+
+---
+ Makefile        |    2 +-
+ docs/yum.conf.5 |    6 ++----
+ etc/Makefile    |    1 +
+ yum.spec        |    4 ++--
+ yum/config.py   |    6 ++----
+ 5 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f20795f..8065899 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,7 @@ install:
+ 	install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd
+ 
+ 	mkdir -p $(DESTDIR)/var/cache/yum
+-	mkdir -p $(DESTDIR)/var/lib/yum/vars
++	mkdir -p $(DESTDIR)/var/lib/yum
+ 
+ 	for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
+ 
+diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
+index f4ce88d..dfc09b7 100644
+--- a/docs/yum.conf.5
++++ b/docs/yum.conf.5
+@@ -770,10 +770,8 @@ the same name. If the shell environment variable does not exist then the
+ configuration file variable will not be replaced.
+ 
+ .LP
+-As of 3.2.28, any file in <installroot>/<persistdir>/vars is turned into
+-a variable named after the filename (or overrides any of the above variables).
+-The obvious exception is that you cannot use these variables in the definition
+-of persistdir itself.
++As of 3.2.28, any file in /etc/yum/vars is turned into a variable named after
++the filename (or overrides any of the above variables).
+ 
+ Note that no warnings/errors are given if the files are unreadable, so creating
+ files that only root can read may be confusing for users.
+diff --git a/etc/Makefile b/etc/Makefile
+index 68dd3c2..91b1791 100644
+--- a/etc/Makefile
++++ b/etc/Makefile
+@@ -9,6 +9,7 @@ clean:
+ install:
+ 	mkdir -p $(DESTDIR)/etc/yum/
+ 	mkdir -p $(DESTDIR)/etc/yum/repos.d
++	mkdir -p $(DESTDIR)/etc/yum/vars
+ 
+ 	install -m 644 yum.conf $(YUMETC)/yum.conf
+ 
+diff --git a/yum.spec b/yum.spec
+index 48e5fea..5ece693 100644
+--- a/yum.spec
++++ b/yum.spec
+@@ -80,8 +80,9 @@ exit 0
+ %doc README AUTHORS COPYING TODO INSTALL ChangeLog PLUGINS
+ %config(noreplace) %{_sysconfdir}/yum/yum.conf
+ %config(noreplace) %{_sysconfdir}/yum/version-groups.conf
+-%dir %{_sysconfdir}/%{name}
++%dir %{_sysconfdir}/yum
+ %dir %{_sysconfdir}/yum/repos.d
++%dir %{_sysconfdir}/yum/vars
+ %config %{_sysconfdir}/logrotate.d/%{name}
+ %{_sysconfdir}/bash_completion.d
+ %{_datadir}/yum-cli/*
+@@ -91,7 +92,6 @@ exit 0
+ /usr/lib/python?.?/site-packages/rpmUtils
+ %dir /var/cache/yum
+ %dir /var/lib/yum
+-%dir /var/lib/yum/vars
+ %ghost /var/lib/yum/uuid
+ %ghost /var/lib/yum/history
+ %ghost /var/lib/yum/plugins
+diff --git a/yum/config.py b/yum/config.py
+index ea8bcbf..3e91735 100644
+--- a/yum/config.py
++++ b/yum/config.py
+@@ -873,11 +873,9 @@ def readMainConfig(startupconf):
+         ir_path = varReplace(ir_path, yumvars)
+         setattr(yumconf, option, ir_path)
+     
+-    _apply_installroot(yumconf, 'persistdir')
+-
+     # Read the FS yumvars
+     try:
+-        dir_fsvars = yumconf.persistdir + "/vars/"
++        dir_fsvars = yumconf.installroot + "/etc/yum/vars/"
+         fsvars = os.listdir(dir_fsvars)
+     except OSError:
+         fsvars = []
+@@ -893,7 +891,7 @@ def readMainConfig(startupconf):
+         yumvars[fsvar] = val
+ 
+     # These can use the above FS yumvars
+-    for option in ('cachedir', 'logfile'):
++    for option in ('cachedir', 'logfile', 'persistdir'):
+         _apply_installroot(yumconf, option)
+ 
+     # Add in some extra attributes which aren't actually configuration values 
+-- 
+1.6.6.1
+
+
+From 05c2b1e916f371b91f4bde35c1b447f6f6288818 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Tue, 13 Apr 2010 17:13:55 -0400
+Subject: [PATCH 55/67] Slight speed increase for repodiff, up/11 vs. up/12: 8:27 => 1:50 :) :)
+
+---
+ yum/packageSack.py |    9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/yum/packageSack.py b/yum/packageSack.py
+index 723f0cd..7a5ce7a 100644
+--- a/yum/packageSack.py
++++ b/yum/packageSack.py
+@@ -941,8 +941,13 @@ class PackageSack(PackageSackBase):
+            be compared to each other for highest version."""
+ 
+         highdict = {}
+-        for pkg in self.returnPackages(patterns=patterns,
+-                                       ignore_case=ignore_case):
++        if patterns is None and name is not None:
++            pkgs = self.searchNevra(name=name)
++        else:
++            pkgs = self.returnPackages(patterns=patterns,
++                                       ignore_case=ignore_case)
++
++        for pkg in pkgs:
+             if not highdict.has_key(pkg.name):
+                 highdict[pkg.name] = []
+                 highdict[pkg.name].append(pkg)
+-- 
+1.6.6.1
+
+
+From 0a50151d301d187dcac3989733cd24e66a37f064 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Tue, 13 Apr 2010 17:20:37 -0400
+Subject: [PATCH 56/67] Minor correction to rest testing for pkgnames_loaded (harmless)
+
+---
+ yum/sqlitesack.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
+index 344a966..b5cea0e 100644
+--- a/yum/sqlitesack.py
++++ b/yum/sqlitesack.py
+@@ -1599,7 +1599,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+             self._pkgnames_loaded.update([po.name for po in returnList])
+         if need_full:
+             for (pat, rest) in patterns:
+-                if rest == 'glob':
++                if rest not in ('=', ''): # Wildcards: 'glob' or ' ESCAPE "!"'
+                     continue
+                 for pkg in returnList:
+                     if pkg.name == pat:
+-- 
+1.6.6.1
+
+
+From 59f29da93ce4c75869c0a5fecc71f333c61aa54f Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Wed, 14 Apr 2010 00:11:49 -0400
+Subject: [PATCH 57/67] Add a header to the automatic yum check output to make it more obvious.
+
+---
+ yum/__init__.py |    8 +++++++-
+ yumcommands.py  |    3 ++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index e45d70a..35da86e 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -1139,9 +1139,14 @@ class YumBase(depsolve.Depsolve):
+             toRemove.add(dep)
+             self._getDepsToRemove(dep, deptree, toRemove)
+ 
+-    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd='all'):
++    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd='all',header=None):
+         if out is None:
+             out = self.logger.warning
++        if header is None:
++            # FIXME: _N()
++            msg = _("** Found %d pre-existing rpmdb problem(s),"
++                    " 'yum check' output follows:")
++            header = lambda problems: not problems or out(msg % problems)
+         if warn:
+             out(_('Warning: RPMDB altered outside of yum.'))
+ 
+@@ -1156,6 +1161,7 @@ class YumBase(depsolve.Depsolve):
+             iopkgs = set(self.conf.installonlypkgs)
+             probs.extend(self.rpmdb.check_duplicates(iopkgs))
+ 
++        header(len(probs))
+         for prob in sorted(probs):
+             out(prob)
+ 
+diff --git a/yumcommands.py b/yumcommands.py
+index 9bc06ad..89c562c 100644
+--- a/yumcommands.py
++++ b/yumcommands.py
+@@ -1381,7 +1381,8 @@ class CheckRpmdbCommand(YumCommand):
+             print x
+ 
+         rc = 0
+-        if base._rpmdb_warn_checks(_out, False, chkcmd):
++        if base._rpmdb_warn_checks(out=_out, warn=False, chkcmd=chkcmd,
++                                   header=lambda x: None):
+             rc = 1
+         return rc, ['%s %s' % (basecmd, chkcmd)]
+ 
+-- 
+1.6.6.1
+
+
+From b792f26a18906cf722f7354cc91e0c2e6679c471 Mon Sep 17 00:00:00 2001
+From: Seth Vidal <skvidal at fedoraproject.org>
+Date: Wed, 14 Apr 2010 16:09:54 -0400
+Subject: [PATCH 58/67] new dump_xml methods for repodata and repomd and related changes
+
+- add dump_xml methods to RepoData and RepoMD so we can write them back out
+
+- also make them more object-y by allowing us to create the objects without having
+  anything to put in them so we populate them by hand, if need be.
+---
+ yum/repoMDObject.py |   92 +++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 85 insertions(+), 7 deletions(-)
+
+diff --git a/yum/repoMDObject.py b/yum/repoMDObject.py
+index 0021d94..eab351a 100755
+--- a/yum/repoMDObject.py
++++ b/yum/repoMDObject.py
+@@ -23,7 +23,7 @@ from Errors import RepoMDError
+ 
+ import sys
+ import types
+-from misc import AutoFileChecksums
++from misc import AutoFileChecksums, to_xml
+ 
+ def ns_cleanup(qn):
+     if qn.find('}') == -1: return qn 
+@@ -32,7 +32,9 @@ def ns_cleanup(qn):
+ class RepoData:
+     """represents anything beneath a <data> tag"""
+     def __init__(self, elem):
+-        self.type = elem.attrib.get('type')
++        self.type = None
++        if elem:
++            self.type = elem.attrib.get('type')
+         self.location = (None, None)
+         self.checksum = (None,None) # type,value
+         self.openchecksum = (None,None) # type,value
+@@ -40,8 +42,9 @@ class RepoData:
+         self.dbversion = None
+         self.size      = None
+         self.opensize  = None
+-    
+-        self.parse(elem)
++
++        if elem:
++            self.parse(elem)
+ 
+     def parse(self, elem):
+         
+@@ -70,11 +73,47 @@ class RepoData:
+                 self.size = child.text
+             elif child_name == 'open-size':
+                 self.opensize = child.text
++
++    def dump_xml(self):
++        msg = ""
++        top = """<data type="%s">\n""" % to_xml(self.type, attrib=True)
++        msg += top
++        
++        for (data, xmlname) in [('checksum', 'checksum'),('openchecksum', 'open-checksum')]:
++            if hasattr(self, data):
++                val = getattr(self, data)
++                if val[0]:
++                    d_xml = """  <%s type="%s">%s</%s>\n""" % (xmlname,
++                                       to_xml(val[0], attrib=True), 
++                                       to_xml(val[1]), xmlname)
++                    msg += d_xml
++
++        if hasattr(self, 'location'):
++            val = getattr(self, 'location')
++            if val[1]:
++                loc = """  <location href="%s"/>\n""" % to_xml(val[1], attrib=True)
++                if val[0]:
++                    loc = """  <location xml:base="%s" href="%s"/>\n""" % (
++                       to_xml(val[0], attrib=True), to_xml(val[1], attrib=True))
++                msg += loc
++            
++        for (data,xmlname) in [('timestamp', 'timestamp'),
++                               ('dbversion', 'database_version'),
++                               ('size','size'), ('opensize', 'open-size')]:
++            val = getattr(self, data)
++            if val:
++                d_xml = """  <%s>%s</%s>\n""" % (xmlname, to_xml(val), 
++                                                 xmlname)
++                msg += d_xml
++
++        bottom = """</data>\n"""
++        msg += bottom
++        return msg
+         
+ class RepoMD:
+     """represents the repomd xml file"""
+     
+-    def __init__(self, repoid, srcfile):
++    def __init__(self, repoid, srcfile=None):
+         """takes a repoid and a filename for the repomd.xml"""
+         
+         self.timestamp = 0
+@@ -83,8 +122,12 @@ class RepoMD:
+         self.checksums = {}
+         self.length    = 0
+         self.revision  = None
+-        self.tags      = {'content' : set(), 'distro' : {}}
+-        
++        self.tags      = {'content' : set(), 'distro' : {}, 'repo': set()}
++    
++        if srcfile:
++            self.parse(srcfile)
++    
++    def parse(self, srcfile):
+         if type(srcfile) in types.StringTypes:
+             # srcfile is a filename string
+             try:
+@@ -168,6 +211,41 @@ class RepoMD:
+             print '    open checksum: %s - %s' %  thisdata.openchecksum
+             print '    dbversion    : %s' % thisdata.dbversion
+             print ''
++    def dump_xml(self):
++        msg = ""
++        
++        top = """<?xml version="1.0" encoding="UTF-8"?>
++<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">\n"""
++        msg += top
++        if self.revision:
++            rev = """ <revision>%s</revision>\n""" % self.revision
++            msg += rev
++        
++        if self.tags['content'] or self.tags['distro'] or self.tags['repo']:
++            tags = """ <tags>\n"""
++            for item in self.tags['content']:
++                tag = """   <content>%s</content>\n""" % (to_xml(item))
++                tags += tag
++            for item in self.tags['repo']:
++                tag = """   <repo>%s</repo>\n""" % (to_xml(item))
++                tags += tag
++            for (cpeid, item) in self.tags['distro'].items():
++                itemlist = list(item) # frellingsets.
++                if cpeid:
++                    tag = """   <distro cpeid="%s">%s</distro>\n""" % (
++                                to_xml(cpeid, attrib=True), to_xml(itemlist[0]))
++                else:
++                    tag = """   <distro>%s</distro>\n""" % (to_xml(itemlist[0]))
++                tags += tag
++            tags += """ </tags>\n"""
++            msg += tags
++        
++        for md in self.repoData.values():
++            msg += md.dump_xml()
++        
++        msg += """</repomd>\n"""
++
++        return msg
+ 
+ def main():
+ 
+-- 
+1.6.6.1
+
+
+From 87f51be49f80ddcb3c7a0df56a106a048327a641 Mon Sep 17 00:00:00 2001
+From: Seth Vidal <skvidal at fedoraproject.org>
+Date: Thu, 15 Apr 2010 08:56:10 -0400
+Subject: [PATCH 59/67] to_xml(revision) and make sure elem is None by default for RepoData objects.
+
+---
+ yum/repoMDObject.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/yum/repoMDObject.py b/yum/repoMDObject.py
+index eab351a..7a4593e 100755
+--- a/yum/repoMDObject.py
++++ b/yum/repoMDObject.py
+@@ -31,7 +31,7 @@ def ns_cleanup(qn):
+ 
+ class RepoData:
+     """represents anything beneath a <data> tag"""
+-    def __init__(self, elem):
++    def __init__(self, elem=None):
+         self.type = None
+         if elem:
+             self.type = elem.attrib.get('type')
+@@ -218,7 +218,7 @@ class RepoMD:
+ <repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">\n"""
+         msg += top
+         if self.revision:
+-            rev = """ <revision>%s</revision>\n""" % self.revision
++            rev = """ <revision>%s</revision>\n""" % to_xml(self.revision)
+             msg += rev
+         
+         if self.tags['content'] or self.tags['distro'] or self.tags['repo']:
+-- 
+1.6.6.1
+
+
+From e27832b442d39b3cfb525bcdf6875a55bf890e45 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Wed, 14 Apr 2010 18:25:22 -0400
+Subject: [PATCH 60/67] Enable "big update" speedup, disable if a repo. doesn't have pkgfiles index.
+
+---
+ test/testbase.py       |   11 +++++++++++
+ yum/packageSack.py     |   11 ++++++++---
+ yum/packages.py        |    3 +++
+ yum/sqlitesack.py      |   24 ++++++++++++++++++++++++
+ yum/transactioninfo.py |   10 ++++++----
+ 5 files changed, 52 insertions(+), 7 deletions(-)
+
+diff --git a/test/testbase.py b/test/testbase.py
+index b4ce5d7..44d1959 100644
+--- a/test/testbase.py
++++ b/test/testbase.py
+@@ -46,10 +46,21 @@ class FakeConf(object):
+         self.uid = 0
+         self.groupremove_leaf_only = False
+ 
++class FakeSack:
++    """ Fake PackageSack to use with FakeRepository"""
++    def __init__(self):
++        pass # This is fake, so do nothing
++    
++    def have_fastSearchFiles(self):
++        return True
++
+ class FakeRepo(object):
+ 
++    __fake_sack = FakeSack()
+     def __init__(self, id=None,sack=None):
+         self.id = id
++        if sack is None:
++            sack = self.__fake_sack
+         self.sack = sack
+         self.cost = 1000
+ 
+diff --git a/yum/packageSack.py b/yum/packageSack.py
+index 7a5ce7a..e63a8d7 100644
+--- a/yum/packageSack.py
++++ b/yum/packageSack.py
+@@ -152,6 +152,10 @@ class PackageSackBase(object):
+         """returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]"""
+         raise NotImplementedError()
+ 
++    def have_fastSearchFiles(self):
++        """ Is calling searchFiles() faster than using """
++        raise NotImplementedError()
++
+     def searchFiles(self, name):
+         """return list of packages by filename"""
+         raise NotImplementedError()
+@@ -772,10 +776,11 @@ class PackageSack(PackageSackBase):
+             
+         return obs
+         
++    def have_fastSearchFiles(self):
++        return True
++
+     def searchFiles(self, name):
+-        """return list of packages by filename
+-           FIXME - need to add regex match against keys in file list
+-        """
++        """ Return list of packages by filename. """
+         self._checkIndexes(failure='build')
+         if self.filenames.has_key(name):
+             return self.filenames[name]
+diff --git a/yum/packages.py b/yum/packages.py
+index 427893b..289660d 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -159,6 +159,9 @@ class FakeSack:
+     def __init__(self):
+         pass # This is fake, so do nothing
+     
++    def have_fastSearchFiles(self):
++        return True
++
+     def delPackage(self, obj):
+         """delete a pkgobject, do nothing, but make localpackages work with --skip-broken"""
+         pass # This is fake, so do nothing
+diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
+index b5cea0e..74c793a 100644
+--- a/yum/sqlitesack.py
++++ b/yum/sqlitesack.py
+@@ -842,6 +842,30 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+         return misc.unique(results)
+         
+     @catchSqliteException
++    def _have_fastSearchFiles(self):
++        """ Return true if searchFiles() is always fast, basically relies on
++            "CREATE INDEX pkgfiles ON files (pkgKey);" existing. """
++
++        for (rep,cache) in self.primarydb.items():
++            if rep in self._all_excludes:
++                continue
++            cur = cache.cursor()
++            executeSQL(cur, "PRAGMA index_info(pkgfiles)")
++            #  If we get anything, we're fine. There might be a better way of
++            # saying "anything" but this works.
++            for ob in cur:
++                break
++            else:
++                return False
++
++        return True
++
++    def have_fastSearchFiles(self):
++        if not hasattr(self, '_cached_have_fastSearchFiles'):
++            self._cached_have_fastSearchFiles = self._have_fastSearchFiles()
++        return self._cached_have_fastSearchFiles
++
++    @catchSqliteException
+     def searchFiles(self, name, strict=False):
+         """search primary if file will be in there, if not, search filelists, use globs, if possible"""
+         
+diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
+index e7b60de..cad36f4 100644
+--- a/yum/transactioninfo.py
++++ b/yum/transactioninfo.py
+@@ -89,9 +89,7 @@ class TransactionData:
+         self.pkgSack = None
+         self.pkgSackPackages = 0
+         self.localSack = PackageSack()
+-        # FIXME: This is turned off atm. ... it'll be turned on when
+-        #        the new yum-metadata-parser with the "pkgfiles" index is std.
+-        self._inSack = None # GetProvReqOnlyPackageSack()
++        self._inSack = GetProvReqOnlyPackageSack()
+ 
+         # lists of txmbrs in their states - just placeholders
+         self.instgroups = []
+@@ -239,7 +237,11 @@ class TransactionData:
+         elif isinstance(txmember.po, YumAvailablePackageSqlite):
+             self.pkgSackPackages += 1
+         if self._inSack is not None and txmember.output_state in TS_INSTALL_STATES:
+-            self._inSack.addPackage(txmember.po)
++            if not txmember.po.repo.sack.have_fastSearchFiles():
++                # In theory we could keep this on if a "small" repo. fails
++                self._inSack = None
++            else:
++                self._inSack.addPackage(txmember.po)
+ 
+         if self.conditionals.has_key(txmember.name):
+             for pkg in self.conditionals[txmember.name]:
+-- 
+1.6.6.1
+
+
+From 204a4d086e601cf4517cf39e23eaad49ac71eedf Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 01:32:19 -0400
+Subject: [PATCH 61/67] Add obsoleted and provides index checking, don't default to doing them though
+
+---
+ yum/__init__.py |   19 ++++++++++++++++---
+ yum/rpmsack.py  |   43 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 59 insertions(+), 3 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index 35da86e..cc5064e 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -1139,9 +1139,11 @@ class YumBase(depsolve.Depsolve):
+             toRemove.add(dep)
+             self._getDepsToRemove(dep, deptree, toRemove)
+ 
+-    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd='all',header=None):
++    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd=None, header=None):
+         if out is None:
+             out = self.logger.warning
++        if chkcmd is None:
++            chkcmd = ['dependencies', 'duplicates']
+         if header is None:
+             # FIXME: _N()
+             msg = _("** Found %d pre-existing rpmdb problem(s),"
+@@ -1150,17 +1152,28 @@ class YumBase(depsolve.Depsolve):
+         if warn:
+             out(_('Warning: RPMDB altered outside of yum.'))
+ 
++        if type(chkcmd) in (type([]), type(set())):
++            chkcmd = set(chkcmd)
++        else:
++            chkcmd = set([chkcmd])
++
+         rc = 0
+         probs = []
+-        if chkcmd in ('all', 'dependencies'):
++        if chkcmd.intersection(set(('all', 'dependencies'))):
+             prob2ui = {'requires' : _('missing requires'),
+                        'conflicts' : _('installed conflict')}
+             probs.extend(self.rpmdb.check_dependencies())
+ 
+-        if chkcmd in ('all', 'duplicates'):
++        if chkcmd.intersection(set(('all', 'duplicates'))):
+             iopkgs = set(self.conf.installonlypkgs)
+             probs.extend(self.rpmdb.check_duplicates(iopkgs))
+ 
++        if chkcmd.intersection(set(('all', 'obsoleted'))):
++            probs.extend(self.rpmdb.check_obsoleted())
++
++        if chkcmd.intersection(set(('all', 'provides'))):
++            probs.extend(self.rpmdb.check_provides())
++
+         header(len(probs))
+         for prob in sorted(probs):
+             out(prob)
+diff --git a/yum/rpmsack.py b/yum/rpmsack.py
+index e113802..e18df3f 100644
+--- a/yum/rpmsack.py
++++ b/yum/rpmsack.py
+@@ -114,6 +114,23 @@ class RPMDBProblemDuplicate(RPMDBProblem):
+         return _("%s is a duplicate with %s") % (self.pkg, self.duplicate)
+ 
+ 
++class RPMDBProblemObsoleted(RPMDBProblem):
++    def __init__(self, pkg, **kwargs):
++        RPMDBProblem.__init__(self, pkg, "obsoleted", **kwargs)
++
++    def __str__(self):
++        return _("%s is obsoleted by %s") % (self.pkg, self.obsoleter)
++
++
++class RPMDBProblemProvides(RPMDBProblem):
++    def __init__(self, pkg, **kwargs):
++        RPMDBProblem.__init__(self, pkg, "provides", **kwargs)
++
++    def __str__(self):
++        return _("%s provides %s but it cannot be found") % (self.pkg,
++                                                             self.provide)
++
++
+ class RPMDBPackageSack(PackageSackBase):
+     '''
+     Represent rpmdb as a packagesack
+@@ -1298,6 +1315,32 @@ class RPMDBPackageSack(PackageSackBase):
+             problems.append(RPMDBProblemDuplicate(pkg, duplicate=last))
+         return problems
+ 
++    def check_obsoleted(self):
++        """ Checks for any packages which are obsoleted by other packages. """
++        obsoleters = []
++        problems = []
++        for pkg in sorted(self.returnPackages()):
++            if not pkg.obsoletes:
++                continue
++            obsoleters.append(pkg)
++        for pkg in sorted(self.returnPackages()):
++            provtup = (pkg.name, 'EQ', (pkg.epoch, pkg.version, pkg.release))
++            for obspo in obsoleters:
++                if obspo.inPrcoRange('obsoletes', provtup):
++                    problems.append(RPMDBProblemObsoleted(pkg, obsoleter=obspo))
++        return problems
++
++    def check_provides(self):
++        """ For each package, check that a provides search for it's name (and
++            everything it provides) finds it. """
++        problems = []
++        for pkg in sorted(self.returnPackages()):
++            for provtup in pkg.provides:
++                name, flags, version = provtup
++                if pkg not in self.getProvides(name, flags, version):
++                    problems.append(RPMDBProblemProvides(pkg, provide=provtup))
++                    break
++        return problems
+ 
+ def _sanitize(path):
+     return path.replace('/', '').replace('~', '')
+-- 
+1.6.6.1
+
+
+From 1f714fa2f00b1d92fc5636e58cf9ad97fd638b03 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 01:33:32 -0400
+Subject: [PATCH 62/67] Fix rpmdb.searchPrco() with "globs", can also affect getProvides() etc.
+
+---
+ yum/rpmsack.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/yum/rpmsack.py b/yum/rpmsack.py
+index e18df3f..eba1409 100644
+--- a/yum/rpmsack.py
++++ b/yum/rpmsack.py
+@@ -322,8 +322,8 @@ class RPMDBPackageSack(PackageSackBase):
+             if not glob:
+                 if po.checkPrco(prcotype, (n, f, (e,v,r))):
+                     result[po.pkgid] = po
+-                else:
+-                    result[po.pkgid] = po
++            else:
++                result[po.pkgid] = po
+         del mi
+ 
+ 
+-- 
+1.6.6.1
+
+
+From e8ce2ff4619b69d8ad244a5df5aeaf484076203b Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 12:37:51 -0400
+Subject: [PATCH 63/67]  Fix the docs. for have_fast*
+
+ Rename it from have_fastSearchFiles to have_fastReturnFileEntries to
+better reflect what it means.
+ Add a dummy to PO, as that's the logical place for it even though it
+needs to be in the sack for sqlite to get the answer.
+
+ Add some docs. to the package object classes, while we are here.
+---
+ test/testbase.py       |    2 +-
+ yum/__init__.py        |    2 +-
+ yum/packageSack.py     |    9 ++++++---
+ yum/packages.py        |   38 ++++++++++++++++++++++++++++++++------
+ yum/sqlitesack.py      |   16 +++++++++-------
+ yum/transactioninfo.py |    2 +-
+ 6 files changed, 50 insertions(+), 19 deletions(-)
+
+diff --git a/test/testbase.py b/test/testbase.py
+index 44d1959..fa2e512 100644
+--- a/test/testbase.py
++++ b/test/testbase.py
+@@ -51,7 +51,7 @@ class FakeSack:
+     def __init__(self):
+         pass # This is fake, so do nothing
+     
+-    def have_fastSearchFiles(self):
++    def have_fastReturnFileEntries(self):
+         return True
+ 
+ class FakeRepo(object):
+diff --git a/yum/__init__.py b/yum/__init__.py
+index cc5064e..9e8fad9 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -4409,7 +4409,7 @@ class YumBase(depsolve.Depsolve):
+         
+         if pkg1.name != pkg2.name:
+             return False
+-        if not pkg1.EVR  > pkg2.EVR:
++        if pkg1.verLE(pkg2):
+             return False
+         if pkg1.arch not in self.arch.archlist:
+             return False
+diff --git a/yum/packageSack.py b/yum/packageSack.py
+index e63a8d7..dbe54bf 100644
+--- a/yum/packageSack.py
++++ b/yum/packageSack.py
+@@ -152,8 +152,9 @@ class PackageSackBase(object):
+         """returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]"""
+         raise NotImplementedError()
+ 
+-    def have_fastSearchFiles(self):
+-        """ Is calling searchFiles() faster than using """
++    def have_fastReturnFileEntries(self):
++        """ Is calling pkg.returnFileEntries(primary_only=True) faster than
++            using searchFiles(). """
+         raise NotImplementedError()
+ 
+     def searchFiles(self, name):
+@@ -776,7 +777,9 @@ class PackageSack(PackageSackBase):
+             
+         return obs
+         
+-    def have_fastSearchFiles(self):
++    def have_fastReturnFileEntries(self):
++        """ Is calling pkg.returnFileEntries(primary_only=True) faster than
++            using searchFiles(). """
+         return True
+ 
+     def searchFiles(self, name):
+diff --git a/yum/packages.py b/yum/packages.py
+index 289660d..731d217 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -159,7 +159,9 @@ class FakeSack:
+     def __init__(self):
+         pass # This is fake, so do nothing
+     
+-    def have_fastSearchFiles(self):
++    def have_fastReturnFileEntries(self):
++        """ Is calling pkg.returnFileEntries(primary_only=True) faster than
++            using searchFiles(). """
+         return True
+ 
+     def delPackage(self, obj):
+@@ -213,8 +215,10 @@ class FakeRepository:
+         return self.id
+ 
+ 
+-# goal for the below is to have a packageobject that can be used by generic
++#  Goal for the below is to have a packageobject that can be used by generic
+ # functions independent of the type of package - ie: installed or available
++#  Note that this is also used to history etc. ... so it's more a nevra+checksum
++# holder than a base for things which are actual packages.
+ class PackageObject(object):
+     """Base Package Object - sets up the default storage dicts and the
+        most common returns"""
+@@ -299,11 +303,16 @@ class PackageObject(object):
+     def verEQ(self, other):
+         """ Compare package to another one, only rpm-version equality. """
+         if not other:
+-            return False
++            return None
+         ret = cmp(self.name, other.name)
+         if ret != 0:
+             return False
+         return comparePoEVREQ(self, other)
++    def verNE(self, other):
++        """ Compare package to another one, only rpm-version inequality. """
++        if not other:
++            return None
++        return not self.verEQ(other)
+     def verLT(self, other):
+         """ Uses verCMP, tests if the other _rpm-version_ is <  ours. """
+         return self.verCMP(other) <  0
+@@ -335,6 +344,10 @@ class PackageObject(object):
+             if csumid:
+                 return (csumtype, csum)
+ 
++#  This is the virtual base class of actual packages, it basically requires a
++# repo. even though it doesn't set one up in it's __init__. It also doesn't have
++# PackageObject methods ... so is basically unusable on it's own
++# see: YumAvailablePackage.
+ class RpmBase(object):
+     """return functions and storage for rpm-specific data"""
+ 
+@@ -561,11 +574,18 @@ class RpmBase(object):
+ 
+     base_package_name = property(fget=lambda self: self._getBaseName())
+ 
++    def have_fastReturnFileEntries(self):
++        """ Is calling pkg.returnFileEntries(primary_only=True) faster than
++            using searchFiles(). """
++        return self.repo.sack.have_fastReturnFileEntries()
+ 
++
++# This is kind of deprecated
+ class PackageEVR:
+ 
+     """
+-    A comparable epoch, version, and release representation.
++    A comparable epoch, version, and release representation. Note that you
++    almost certainly want to use pkg.verEQ() or pkg.verGT() etc. instead.
+     """
+     
+     def __init__(self,e,v,r):
+@@ -608,7 +628,8 @@ class PackageEVR:
+         return False
+     
+ 
+-
++#  This is the real base class of actual packages, it has a repo. and is
++# usable on it's own, in theory (but in practise see sqlitesack).
+ class YumAvailablePackage(PackageObject, RpmBase):
+     """derived class for the  packageobject and RpmBase packageobject yum
+        uses this for dealing with packages in a repository"""
+@@ -1124,7 +1145,8 @@ class YumAvailablePackage(PackageObject, RpmBase):
+ 
+ 
+ 
+-
++#  This is a tweak on YumAvailablePackage() and is a base class for packages
++# which are actual rpms.
+ class YumHeaderPackage(YumAvailablePackage):
+     """Package object built from an rpm header"""
+     def __init__(self, repo, hdr):
+@@ -1364,6 +1386,7 @@ _RPMVERIFY_RDEV     = (1 << 7)
+ 
+ _installed_repo = FakeRepository('installed')
+ _installed_repo.cost = 0
++# This is a tweak on YumHeaderPackage() for installed rpm packages.
+ class YumInstalledPackage(YumHeaderPackage):
+     """super class for dealing with packages in the rpmdb"""
+     def __init__(self, hdr, yumdb=None):
+@@ -1627,6 +1650,7 @@ class YumInstalledPackage(YumHeaderPackage):
+         return results
+         
+                              
++# This is a tweak on YumHeaderPackage() for rpm packages which are on disk.
+ class YumLocalPackage(YumHeaderPackage):
+     """Class to handle an arbitrary package from a file path
+        this inherits most things from YumInstalledPackage because
+@@ -1770,6 +1794,8 @@ class YumLocalPackage(YumHeaderPackage):
+         return msg
+ 
+ 
++#  This is a tweak on YumLocalPackage() to download rpm packages to disk, and
++# then use them directly.
+ class YumUrlPackage(YumLocalPackage):
+     """Class to handle an arbitrary package from a URL
+        this inherits most things from YumLocalPackage, but will download a
+diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
+index 74c793a..1885d57 100644
+--- a/yum/sqlitesack.py
++++ b/yum/sqlitesack.py
+@@ -842,9 +842,9 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+         return misc.unique(results)
+         
+     @catchSqliteException
+-    def _have_fastSearchFiles(self):
+-        """ Return true if searchFiles() is always fast, basically relies on
+-            "CREATE INDEX pkgfiles ON files (pkgKey);" existing. """
++    def _have_fastReturnFileEntries(self):
++        """ Return true if pkg.returnFileEntries(primary_only=True) is fast.
++            basically does "CREATE INDEX pkgfiles ON files (pkgKey);" exist. """
+ 
+         for (rep,cache) in self.primarydb.items():
+             if rep in self._all_excludes:
+@@ -860,10 +860,12 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+ 
+         return True
+ 
+-    def have_fastSearchFiles(self):
+-        if not hasattr(self, '_cached_have_fastSearchFiles'):
+-            self._cached_have_fastSearchFiles = self._have_fastSearchFiles()
+-        return self._cached_have_fastSearchFiles
++    def have_fastReturnFileEntries(self):
++        """ Is calling pkg.returnFileEntries(primary_only=True) faster than
++            using searchFiles(). """
++        if not hasattr(self, '_cached_fRFE'):
++            self._cached_fRFE = self._have_fastReturnFileEntries()
++        return self._cached_fRFE
+ 
+     @catchSqliteException
+     def searchFiles(self, name, strict=False):
+diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
+index cad36f4..d7d8859 100644
+--- a/yum/transactioninfo.py
++++ b/yum/transactioninfo.py
+@@ -237,7 +237,7 @@ class TransactionData:
+         elif isinstance(txmember.po, YumAvailablePackageSqlite):
+             self.pkgSackPackages += 1
+         if self._inSack is not None and txmember.output_state in TS_INSTALL_STATES:
+-            if not txmember.po.repo.sack.have_fastSearchFiles():
++            if not txmember.po.have_fastReturnFileEntries():
+                 # In theory we could keep this on if a "small" repo. fails
+                 self._inSack = None
+             else:
+-- 
+1.6.6.1
+
+
+From 5f6c04f93ef6cf3272197560bb914ce5fd410155 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 12:54:42 -0400
+Subject: [PATCH 64/67]  Add primary_only arg. to returnFileTypes(), use it from transactioninfo
+ sack so that we don't require filelists to be downloaded.
+
+---
+ yum/packages.py        |   23 ++++++++++++++++++++---
+ yum/sqlitesack.py      |   11 ++++++++++-
+ yum/transactioninfo.py |    2 +-
+ 3 files changed, 31 insertions(+), 5 deletions(-)
+
+diff --git a/yum/packages.py b/yum/packages.py
+index 731d217..c1a14d0 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -514,9 +514,26 @@ class RpmBase(object):
+                 return self.files[ftype]
+         return []
+             
+-    def returnFileTypes(self):
+-        """return list of types of files in the package"""
+-        # maybe should die - use direct access to attribute
++    def returnFileTypes(self, primary_only=False):
++        """return list of types of files in the package, you can pass
++           primary_only=True to limit to those files in the primary repodata"""
++        if primary_only:
++            ret = [] # We only return the types for the primary files.
++            for ftype in self.files.keys():
++                if ftype == 'dir':
++                    match = misc.re_primary_dirname
++                else:
++                    match = misc.re_primary_filename
++                #  As soon as we find a primary file of this type, we can
++                # return it.
++                for fn in self.files[ftype]:
++                    if match(fn):
++                        break
++                else:
++                    continue
++                ret.append(ftype)
++            return ret
++
+         return self.files.keys()
+ 
+     def returnPrcoNames(self, prcotype):
+diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
+index 1885d57..43f60cd 100644
+--- a/yum/sqlitesack.py
++++ b/yum/sqlitesack.py
+@@ -353,6 +353,8 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
+         return self._changelog
+     
+     def returnFileEntries(self, ftype='file', primary_only=False):
++        """return list of files based on type, you can pass primary_only=True
++           to limit to those files in the primary repodata"""
+         if primary_only and not self._loadedfiles:
+             sql = "SELECT name as fname FROM files WHERE pkgKey = ? and type = ?"
+             cur = self._sql_MD('primary', sql, (self.pkgKey, ftype))
+@@ -361,7 +363,14 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
+         self._loadFiles()
+         return RpmBase.returnFileEntries(self,ftype,primary_only)
+     
+-    def returnFileTypes(self):
++    def returnFileTypes(self, primary_only=False):
++        """return list of types of files in the package, you can pass
++           primary_only=True to limit to those files in the primary repodata"""
++        if primary_only and not self._loadedfiles:
++            sql = "SELECT DISTINCT type as ftype FROM files WHERE pkgKey = ?"
++            cur = self._sql_MD('primary', sql, (self.pkgKey,))
++            return map(lambda x: x['ftype'], cur)
++
+         self._loadFiles()
+         return RpmBase.returnFileTypes(self)
+ 
+diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
+index d7d8859..dfa34b3 100644
+--- a/yum/transactioninfo.py
++++ b/yum/transactioninfo.py
+@@ -39,7 +39,7 @@ class GetProvReqOnlyPackageSack(PackageSack):
+         self._need_index_files = need_files
+ 
+     def __addPackageToIndex_primary_files(self, obj):
+-        for ftype in obj.returnFileTypes():
++        for ftype in obj.returnFileTypes(primary_only=True):
+             for file in obj.returnFileEntries(ftype, primary_only=True):
+                 self._addToDictAsList(self.filenames, file, obj)
+     def __addPackageToIndex_files(self, obj):
+-- 
+1.6.6.1
+
+
+From 94d742bf395cc565cf3a0dca138608a9296b1303 Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 13:18:18 -0400
+Subject: [PATCH 65/67]  Add pkg.filterObsoleters(), so we don't have to create the provide
+ tuple and test "backwards".
+  Also convert callers.
+
+ We've screwed this up a few times, by doing provides checks instead and
+this drops a few lines of code anyway ... so should be good.
+---
+ yum/__init__.py |   16 +++++++---------
+ yum/depsolve.py |    3 +--
+ yum/packages.py |   14 ++++++++++++++
+ yum/rpmsack.py  |    6 ++----
+ 4 files changed, 24 insertions(+), 15 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index 9e8fad9..ab2e6d5 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -2874,11 +2874,9 @@ class YumBase(depsolve.Depsolve):
+                     installed_pkg =  self.getInstalledPackageObject(inst_tup)
+                     yield installed_pkg
+         else:
+-            for (obs_n, obs_f, (obs_e, obs_v, obs_r)) in po.obsoletes:
++            for obs_n in po.obsoletes_names:
+                 for pkg in self.rpmdb.searchNevra(name=obs_n):
+-                    installedtup = (pkg.name, 'EQ', (pkg.epoch, 
+-                                   pkg.ver, pkg.release))
+-                    if po.inPrcoRange('obsoletes', installedtup):
++                    if pkg.filterObsoleters([po]):
+                         yield pkg
+ 
+     def _add_prob_flags(self, *flags):
+@@ -3037,11 +3035,11 @@ class YumBase(depsolve.Depsolve):
+                 # pull in foo.i586 when foo.x86_64 already obsoletes the pkg and
+                 # is already installed
+                 already_obs = None
+-                poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release))
+-                for pkg in self.rpmdb.searchNevra(name=obsoleting_pkg.name):
+-                    if pkg.inPrcoRange('obsoletes', poprovtup):
+-                        already_obs = pkg
+-                        continue
++                pkgs = self.rpmdb.searchNevra(name=obsoleting_pkg.name)
++                pkgs = po.filterObsoleters(pkgs, limit=1)
++                if pkgs:
++                    already_obs = pkgs[0]
++                    continue
+ 
+                 if already_obs:
+                     self.verbose_logger.warning(_('Package %s is obsoleted by %s which is already installed'), 
+diff --git a/yum/depsolve.py b/yum/depsolve.py
+index 48f77d5..8b02d7c 100644
+--- a/yum/depsolve.py
++++ b/yum/depsolve.py
+@@ -1203,8 +1203,7 @@ class Depsolve(object):
+                     pkgresults[po] -= 1024
+ 
+                 obsoleted = False
+-                poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release))
+-                if nextpo.inPrcoRange('obsoletes', poprovtup):
++                if po.filterObsoleters([nextpo]):
+                     obsoleted = True
+                     pkgresults[po] -= 1024
+                                 
+diff --git a/yum/packages.py b/yum/packages.py
+index c1a14d0..6108636 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -596,6 +596,20 @@ class RpmBase(object):
+             using searchFiles(). """
+         return self.repo.sack.have_fastReturnFileEntries()
+ 
++    def filterObsoleters(self, obsoleters, limit=0):
++        """ Returns list of obsoleters that obsolete this package. Note that we
++            don't do obsoleting loops. If limit is != 0, then we stop after
++            finding that many. """
++        provtup = (self.name, 'EQ', (self.epoch, self.version, self.release))
++        ret = []
++        for obspo in obsoleters:
++            if obspo.inPrcoRange('obsoletes', provtup):
++                ret.append(obspo)
++                if limit and len(ret) > limit:
++                    break
++        return ret
++
++
+ 
+ # This is kind of deprecated
+ class PackageEVR:
+diff --git a/yum/rpmsack.py b/yum/rpmsack.py
+index eba1409..996416b 100644
+--- a/yum/rpmsack.py
++++ b/yum/rpmsack.py
+@@ -1324,10 +1324,8 @@ class RPMDBPackageSack(PackageSackBase):
+                 continue
+             obsoleters.append(pkg)
+         for pkg in sorted(self.returnPackages()):
+-            provtup = (pkg.name, 'EQ', (pkg.epoch, pkg.version, pkg.release))
+-            for obspo in obsoleters:
+-                if obspo.inPrcoRange('obsoletes', provtup):
+-                    problems.append(RPMDBProblemObsoleted(pkg, obsoleter=obspo))
++            for obspo in pkg.filterObsoleters(obsoleters):
++                problems.append(RPMDBProblemObsoleted(pkg, obsoleter=obspo))
+         return problems
+ 
+     def check_provides(self):
+-- 
+1.6.6.1
+
+
+From f9b8420f54162289d79e5c8b84291057758a609f Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Thu, 15 Apr 2010 15:11:32 -0400
+Subject: [PATCH 66/67] Add nocontexts to possible ts flag usage, when available
+
+---
+ yum/depsolve.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/yum/depsolve.py b/yum/depsolve.py
+index 8b02d7c..e62680f 100644
+--- a/yum/depsolve.py
++++ b/yum/depsolve.py
+@@ -138,6 +138,9 @@ class Depsolve(object):
+                             'test': rpm.RPMTRANS_FLAG_TEST,
+                             'justdb': rpm.RPMTRANS_FLAG_JUSTDB,
+                             'repackage': rpm.RPMTRANS_FLAG_REPACKAGE}
++        # This is only in newer rpm.org releases
++        if hasattr(rpm, 'RPMTRANS_FLAG_NOCONTEXTS'):
++            ts_flags_to_rpm['nocontexts'] = rpm.RPMTRANS_FLAG_NOCONTEXTS
+         
+         self._ts.setFlags(0) # reset everything.
+         
+-- 
+1.6.6.1
+
+
+From f06b289b3e88cd22948f376509cd84d04263b7aa Mon Sep 17 00:00:00 2001
+From: James Antill <james at and.org>
+Date: Fri, 16 Apr 2010 09:32:53 -0400
+Subject: [PATCH 67/67] Rename filterObsoleters => obsoletedBy, before it goes public
+
+---
+ yum/__init__.py |    4 ++--
+ yum/depsolve.py |    2 +-
+ yum/packages.py |    2 +-
+ yum/rpmsack.py  |    2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/yum/__init__.py b/yum/__init__.py
+index ab2e6d5..34f2de7 100644
+--- a/yum/__init__.py
++++ b/yum/__init__.py
+@@ -2876,7 +2876,7 @@ class YumBase(depsolve.Depsolve):
+         else:
+             for obs_n in po.obsoletes_names:
+                 for pkg in self.rpmdb.searchNevra(name=obs_n):
+-                    if pkg.filterObsoleters([po]):
++                    if pkg.obsoletedBy([po]):
+                         yield pkg
+ 
+     def _add_prob_flags(self, *flags):
+@@ -3036,7 +3036,7 @@ class YumBase(depsolve.Depsolve):
+                 # is already installed
+                 already_obs = None
+                 pkgs = self.rpmdb.searchNevra(name=obsoleting_pkg.name)
+-                pkgs = po.filterObsoleters(pkgs, limit=1)
++                pkgs = po.obsoletedBy(pkgs, limit=1)
+                 if pkgs:
+                     already_obs = pkgs[0]
+                     continue
+diff --git a/yum/depsolve.py b/yum/depsolve.py
+index e62680f..a9e4d55 100644
+--- a/yum/depsolve.py
++++ b/yum/depsolve.py
+@@ -1206,7 +1206,7 @@ class Depsolve(object):
+                     pkgresults[po] -= 1024
+ 
+                 obsoleted = False
+-                if po.filterObsoleters([nextpo]):
++                if po.obsoletedBy([nextpo]):
+                     obsoleted = True
+                     pkgresults[po] -= 1024
+                                 
+diff --git a/yum/packages.py b/yum/packages.py
+index 6108636..e01790c 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -596,7 +596,7 @@ class RpmBase(object):
+             using searchFiles(). """
+         return self.repo.sack.have_fastReturnFileEntries()
+ 
+-    def filterObsoleters(self, obsoleters, limit=0):
++    def obsoletedBy(self, obsoleters, limit=0):
+         """ Returns list of obsoleters that obsolete this package. Note that we
+             don't do obsoleting loops. If limit is != 0, then we stop after
+             finding that many. """
+diff --git a/yum/rpmsack.py b/yum/rpmsack.py
+index 996416b..7f5b233 100644
+--- a/yum/rpmsack.py
++++ b/yum/rpmsack.py
+@@ -1324,7 +1324,7 @@ class RPMDBPackageSack(PackageSackBase):
+                 continue
+             obsoleters.append(pkg)
+         for pkg in sorted(self.returnPackages()):
+-            for obspo in pkg.filterObsoleters(obsoleters):
++            for obspo in pkg.obsoletedBy(obsoleters):
+                 problems.append(RPMDBProblemObsoleted(pkg, obsoleter=obspo))
+         return problems
+ 
+-- 
+1.6.6.1
+


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum.spec,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -p -r1.308 -r1.309
--- yum.spec	12 Apr 2010 19:08:41 -0000	1.308
+++ yum.spec	16 Apr 2010 14:27:49 -0000	1.309
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.27
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -110,6 +110,14 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Fri Apr 16 2010 James Antill <james at fedoraproject.org> - 3.2.27-7
+- Latest yum-3_2_X head.
+- Add the "big update" speedup patch.
+- Add nocontexts ts flag.
+- Add provides and obsoleted to "yum check".
+- Add new dump_xml stuff for createrepo/modifyrepo.
+- Move /var/lib/yum/vars to /etc/yum/vars
+
 * Mon Apr 12 2010 James Antill <james at fedoraproject.org> - 3.2.27-6
 - Latest yum-3_2_X head.
 - Fix the caching changes.



More information about the scm-commits mailing list