[meego-commits] 5276: Changes to Trunk/yum-utils
Anas Nashif
nashif at linux.intel.com
Thu Jul 1 03:03:32 UTC 2010
Hi,
I have made the following changes to yum-utils in project Trunk. Please review and accept ASAP.
Thank You,
Anas Nashif
[This message was auto-generated]
---
Request #5276:
submit: Trunk:Testing/yum-utils(r8) -> Trunk/yum-utils
Message:
migrate from Testing after handset day1
State: new 2010-06-30T14:59:38 nashif
Comment: None
changes files:
--------------
--- yum-utils.changes
+++ yum-utils.changes
@@ -0,0 +1,9 @@
+* Tue Jun 29 2010 Yi Yang <yi.y.yang at intel.com> - 1.1.27
+- Remove NetworkManager plugin and clean up install
+
+* Mon Jun 28 2010 Yi Yang <yi.y.yang at intel.com> - 1.1.27
+- Update to 1.1.27 (fixed BMC #2316)
+
+* Tue Jun 22 2010 Yi Yang <yi.y.yang at intel.com> - 1.1.25
+- Mark man pages as %doc
+
old:
----
meegobug338-fix-yum-builddep-attributeerror.patch
yum-utils-1.1.25.tar.gz
new:
----
Makefile
yum-utils-1.1.27.tar.gz
yum-utils.yaml
spec files:
-----------
--- yum-utils.spec
+++ yum-utils.spec
@@ -1,16 +1,24 @@
-Summary: Utilities based around the yum package manager
+#
+# Do not Edit! Generated by:
+# spectacle version 0.17
+#
+# >> macros
+# << macros
+
Name: yum-utils
-Version: 1.1.25
+Summary: Utilities based around the yum package manager
+Version: 1.1.27
Release: 1
-License: GPLv2+
Group: Development/Tools
-Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz
-URL: http://yum.baseurl.org/download/yum-utils/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+License: GPLv2+
BuildArch: noarch
-Requires: python >= 2.4 , yum >= 3.2.24
+URL: http://yum.baseurl.org/download/yum-utils/
+Source0: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz
+Source100: yum-utils.yaml
+Requires: python >= 2.4
+Requires: yum >= 3.2.24
BuildRequires: python >= 2.4
-Patch100: meegobug338-fix-yum-builddep-attributeerror.patch
+
%description
yum-utils is a collection of utilities and examples for the yum package
@@ -20,64 +28,72 @@
repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader,
yum-debug-dump, yum-debug-restore and yum-groups-manager.
-%package -n yum-updateonboot
-Summary: Run yum update on system boot
-Group: System/Base
-Requires: python, yum >= 2.4
-Requires(pre): chkconfig
-Requires(post): chkconfig
-%description -n yum-updateonboot
-Runs yum update on system boot. This allows machines that have been turned
-off for an extended amount of time to become secure immediately, instead of
-waiting until the next early morning cron job.
-%package -n yum-plugin-changelog
-Summary: Yum plugin for viewing package changelogs before/after updating
+%package -n yum-plugin-aliases
+Summary: Yum plugin to enable aliases filters
Group: System/Base
-Provides: yum-changelog = %{version}-%{release}
-Obsoletes: yum-changelog < 1.1.20-0
-Conflicts: yum-changelog < 1.1.20-0
-# changelog requires new update_md.UpdateMetadata() API in 3.2.23
+Requires: %{name} = %{version}-%{release}
Requires: yum >= 3.2.23
-Requires: python-dateutil
+Provides: yum-aliases = %{version}-%{release}
+Conflicts: yum-aliases < 1.1.20-0
+Obsoletes: yum-aliases < 1.1.20-0
-%description -n yum-plugin-changelog
-This plugin adds a command line option to allow viewing package changelog
-deltas before or after updating packages.
+%description -n yum-plugin-aliases
+This plugin adds the command alias, and parses the aliases config. file to
+enable aliases.
-%package -n yum-plugin-fastestmirror
-Summary: Yum plugin which chooses fastest repository from a mirrorlist
+
+%package -n yum-plugin-security
+Summary: Yum plugin to enable security filters
Group: System/Base
-Provides: yum-fastestmirror = %{version}-%{release}
-Obsoletes: yum-fastestmirror < 1.1.20-0
-Conflicts: yum-fastestmirror < 1.1.20-0
-Requires: yum >= 3.0
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.18
+Provides: yum-security = %{version}-%{release}
+Conflicts: yum-security < 1.1.20-0
+Obsoletes: yum-security < 1.1.20-0
-%description -n yum-plugin-fastestmirror
-This plugin sorts each repository's mirrorlist by connection speed
-prior to downloading packages.
+%description -n yum-plugin-security
+This plugin adds the options --security, --cve, --bz and --advisory flags
+to yum and the list-security and info-security commands.
+The options make it possible to limit list/upgrade of packages to specific
+security relevant ones. The commands give you the security information.
-%package -n yum-plugin-protectbase
-Summary: Yum plugin to protect packages from certain repositories
+
+%package -n yum-plugin-fs-snapshot
+Summary: Yum plugin to automatically snapshot your filesystems during updates
Group: System/Base
-Provides: yum-protectbase = %{version}-%{release}
-Obsoletes: yum-protectbase < 1.1.20-0
-Conflicts: yum-protectbase < 1.1.20-0
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.22
+
+%description -n yum-plugin-fs-snapshot
+When this plugin is installed it will automatically snapshot any
+filesystem that is touched by the packages in a yum update or yum remove.
+
+
+%package -n yum-plugin-merge-conf
+Summary: Yum plugin to merge configuration changes when installing packages
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
Requires: yum >= 3.0
+Provides: yum-merge-conf = %{version}-%{release}
+Conflicts: yum-merge-conf < 1.1.20-0
+Obsoletes: yum-merge-conf < 1.1.20-0
+
+%description -n yum-plugin-merge-conf
+This yum plugin adds the "--merge-conf" command line option. With this option,
+Yum will ask you what to do with config files which have changed on updating a
+package.
-%description -n yum-plugin-protectbase
-This plugin allows certain repositories to be protected. Packages in the
-protected repositories can't be overridden by packages in non-protected
-repositories even if the non-protected repo has a later version.
%package -n yum-plugin-versionlock
Summary: Yum plugin to lock specified packages from being updated
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.24
Provides: yum-versionlock = %{version}-%{release}
-Obsoletes: yum-versionlock < 1.1.20-0
Conflicts: yum-versionlock < 1.1.20-0
-Requires: yum >= 3.2.24
+Obsoletes: yum-versionlock < 1.1.20-0
%description -n yum-plugin-versionlock
This plugin takes a set of name/versions for packages and excludes all other
@@ -85,351 +101,464 @@
allows you to protect packages from being updated by newer versions,
for example.
+
+%package -n yum-plugin-protectbase
+Summary: Yum plugin to protect packages from certain repositories
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
+Provides: yum-protectbase = %{version}-%{release}
+Conflicts: yum-protectbase < 1.1.20-0
+Obsoletes: yum-protectbase < 1.1.20-0
+
+%description -n yum-plugin-protectbase
+This plugin allows certain repositories to be protected. Packages in the
+protected repositories can't be overridden by packages in non-protected
+repositories even if the non-protected repo has a later version.
+
+
+%package -n yum-plugin-tmprepo
+Summary: Yum plugin to add temporary repositories
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.11
+Requires: createrepo
+Provides: yum-tmprepo = %{version}-%{release}
+Conflicts: yum-tmprepo < 1.1.20-0
+Obsoletes: yum-tmprepo < 1.1.20-0
+
+%description -n yum-plugin-tmprepo
+This plugin adds the option --tmprepo which takes a url to a .repo file
+downloads it and enables it for a single run. This plugin tries to ensure
+that temporary repositories are safe to use, by default, by not allowing
+gpg checking to be disabled.
+
+
+%package -n yum-plugin-remove-with-leaves
+Summary: Yum plugin to remove dependencies which are no longer used because of a removal
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.19
+Provides: yum-remove-with-leaves = %{version}-%{release}
+Conflicts: yum-remove-with-leaves < 1.1.20-0
+Obsoletes: yum-remove-with-leaves < 1.1.20-0
+
+%description -n yum-plugin-remove-with-leaves
+This plugin removes any unused dependencies that were brought in by an install
+but would not normally be removed. It helps to keep a system clean of unused
+libraries and packages.
+
+
%package -n yum-plugin-tsflags
Summary: Yum plugin to add tsflags by a commandline option
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
Provides: yum-tsflags = %{version}-%{release}
-Obsoletes: yum-tsflags < 1.1.20-0
Conflicts: yum-tsflags < 1.1.20-0
-Requires: yum >= 3.0
+Obsoletes: yum-tsflags < 1.1.20-0
%description -n yum-plugin-tsflags
This plugin allows you to specify optional transaction flags on the yum
command line
+
+%package -n yum-plugin-filter-data
+Summary: Yum plugin to list filter based on package data
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.17
+Provides: yum-filter-data = %{version}-%{release}
+Conflicts: yum-filter-data < 1.1.20-0
+Obsoletes: yum-filter-data < 1.1.20-0
+
+%description -n yum-plugin-filter-data
+This plugin adds the options --filter- vendors, groups, packagers, licenses,
+arches, committers, buildhosts, baseurls, package-sizes, archive-sizes and
+installed-sizes. Note that each package must match at least one pattern/range in
+each category, if any were specified.
+
+
+%package -n yum-plugin-keys
+Summary: Yum plugin to deal with signing keys
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.19
+Provides: yum-keys = %{version}-%{release}
+Conflicts: yum-keys < 1.1.20-0
+Obsoletes: yum-keys < 1.1.20-0
+
+%description -n yum-plugin-keys
+This plugin adds the commands keys, keys-info, keys-data and keys-remove. They
+allow you to query and remove signing keys.
+
+
+%package -n yum-plugin-rpm-warm-cache
+Summary: Yum plugin to access the rpmdb files early to warm up access to the db
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.19
+Provides: yum-rpm-warm-cache = %{version}-%{release}
+Conflicts: yum-rpm-warm-cache < 1.1.20-0
+Obsoletes: yum-rpm-warm-cache < 1.1.20-0
+
+%description -n yum-plugin-rpm-warm-cache
+This plugin reads the rpmdb files into the system cache before accessing the
+rpmdb directly. In some cases this should speed up access to rpmdb information
+
+
%package -n yum-plugin-downloadonly
Summary: Yum plugin to add downloadonly command option
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
Provides: yum-downloadonly = %{version}-%{release}
-Obsoletes: yum-downloadonly < 1.1.20-0
Conflicts: yum-downloadonly < 1.1.20-0
-Requires: yum >= 3.0
+Obsoletes: yum-downloadonly < 1.1.20-0
%description -n yum-plugin-downloadonly
This plugin adds a --downloadonly flag to yum so that yum will only download
the packages and not install/update them.
+
+%package -n yum-updateonboot
+Summary: Run yum update on system boot
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: python
+Requires: yum >= 2.4
+Requires(pre): chkconfig
+Requires(post): chkconfig
+
+%description -n yum-updateonboot
+Runs yum update on system boot. This allows machines that have been turned
+off for an extended amount of time to become secure immediately, instead of
+waiting until the next early morning cron job.
+
+
%package -n yum-plugin-priorities
Summary: Plugin to give priorities to packages from different repos
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
Provides: yum-priorities = %{version}-%{release}
-Obsoletes: yum-priorities < 1.1.20-0
Conflicts: yum-priorities < 1.1.20-0
-Requires: yum >= 3.0
+Obsoletes: yum-priorities < 1.1.20-0
%description -n yum-plugin-priorities
This plugin allows repositories to have different priorities.
Packages in a repository with a lower priority can't be overridden by packages
from a repository with a higher priority even if repo has a later version.
-%package -n yum-plugin-refresh-updatesd
-Summary: Tell yum-updatesd to check for updates when yum exits
-Group: System/Base
-Provides: yum-refresh-updatesd = %{version}-%{release}
-Obsoletes: yum-refresh-updatesd < 1.1.20-0
-Conflicts: yum-refresh-updatesd < 1.1.20-0
-Requires: yum >= 3.0
-Requires: yum-updatesd
-
-%description -n yum-plugin-refresh-updatesd
-yum-refresh-updatesd tells yum-updatesd to check for updates when yum exits.
-This way, if you run 'yum update' and install all available updates, puplet
-will almost instantly update itself to reflect this.
-%package -n yum-plugin-merge-conf
-Summary: Yum plugin to merge configuration changes when installing packages
+%package -n yum-plugin-changelog
+Summary: Yum plugin for viewing package changelogs before/after updating
Group: System/Base
-Provides: yum-merge-conf = %{version}-%{release}
-Obsoletes: yum-merge-conf < 1.1.20-0
-Conflicts: yum-merge-conf < 1.1.20-0
-Requires: yum >= 3.0
-
-%description -n yum-plugin-merge-conf
-This yum plugin adds the "--merge-conf" command line option. With this option,
-Yum will ask you what to do with config files which have changed on updating a
-package.
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.23
+Requires: python-dateutil
+Provides: yum-changelog = %{version}-%{release}
+Conflicts: yum-changelog < 1.1.20-0
+Obsoletes: yum-changelog < 1.1.20-0
-%package -n yum-plugin-security
-Summary: Yum plugin to enable security filters
-Group: System/Base
-Provides: yum-security = %{version}-%{release}
-Obsoletes: yum-security < 1.1.20-0
-Conflicts: yum-security < 1.1.20-0
-Requires: yum >= 3.2.18
+%description -n yum-plugin-changelog
+This plugin adds a command line option to allow viewing package changelog
+deltas before or after updating packages.
-%description -n yum-plugin-security
-This plugin adds the options --security, --cve, --bz and --advisory flags
-to yum and the list-security and info-security commands.
-The options make it possible to limit list/upgrade of packages to specific
-security relevant ones. The commands give you the security information.
-%package -n yum-plugin-protect-packages
-Summary: Yum plugin to prevents Yum from removing itself and other protected packages
+%package -n yum-plugin-fastestmirror
+Summary: Yum plugin which chooses fastest repository from a mirrorlist
Group: System/Base
-Provides: yum-protect-packages = %{version}-%{release}
-Obsoletes: yum-protect-packages < 1.1.20-0
-Conflicts: yum-protect-packages < 1.1.20-0
+Requires: %{name} = %{version}-%{release}
Requires: yum >= 3.0
+Provides: yum-fastestmirror = %{version}-%{release}
+Conflicts: yum-fastestmirror < 1.1.20-0
+Obsoletes: yum-fastestmirror < 1.1.20-0
+
+%description -n yum-plugin-fastestmirror
+This plugin sorts each repository's mirrorlist by connection speed
+prior to downloading packages.
-%description -n yum-plugin-protect-packages
-this plugin prevents Yum from removing itself and other protected packages.
-By default, yum is the only package protected, but by extension this
-automatically protects everything on which yum depends (rpm, python, glibc,
-and so on).Therefore, the plugin functions well even without
-compiling careful lists of all important packages.
%package -n yum-plugin-upgrade-helper
Summary: Yum plugin to help upgrades to the next distribution version
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
Provides: yum-upgrade-helper = %{version}-%{release}
-Obsoletes: yum-upgrade-helper < 1.1.20-0
Conflicts: yum-upgrade-helper < 1.1.20-0
-Requires: yum >= 3.0
+Obsoletes: yum-upgrade-helper < 1.1.20-0
%description -n yum-plugin-upgrade-helper
this plugin allows yum to erase specific packages on install/update based on an additional
metadata file in repositories. It is used to simplify distribution upgrade hangups.
-%package -n yum-plugin-aliases
-Summary: Yum plugin to enable aliases filters
+
+%package -n yum-plugin-verify
+Summary: Yum plugin to add verify command, and options
Group: System/Base
-Provides: yum-aliases = %{version}-%{release}
-Obsoletes: yum-aliases < 1.1.20-0
-Conflicts: yum-aliases < 1.1.20-0
-# Requires args_hook
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.12
+Provides: yum-verify = %{version}-%{release}
+Conflicts: yum-verify < 1.1.20-0
+Obsoletes: yum-verify < 1.1.20-0
+
+%description -n yum-plugin-verify
+This plugin adds the commands verify, verify-all and verify-rpm. There are
+also a couple of options. This command works like rpm -V, to verify your
+installation.
+
+
+%package -n yum-plugin-auto-update-debug-info
+Summary: Yum plugin to enable automatic updates to installed debuginfo packages
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.19
+Provides: yum-plugin-auto-update-debuginfo = %{version}-%{release}
+Conflicts: yum-plugin-auto-update-debuginfo < 1.1.21-0
+Obsoletes: yum-plugin-auto-update-debuginfo < 1.1.21-0
+
+%description -n yum-plugin-auto-update-debug-info
+This plugin looks to see if any debuginfo packages are installed, and if there
+are it enables all debuginfo repositories that are "children" of enabled
+repositories.
+
+
+%package -n yum-plugin-local
+Summary: Yum plugin to automatically manage a local repo. of downloaded packages
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.22
+Requires: createrepo
+
+%description -n yum-plugin-local
+When this plugin is installed it will automatically copy all downloaded packages
+to a repository on the local filesystem, and (re)build that repository. This
+means that anything you've downloaded will always exist, even if the original
+repo. removes it (and can thus. be reinstalled/downgraded/etc.).
+
+
+%package -n yum-plugin-show-leaves
+Summary: Yum plugin which shows newly installed leaf packages
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
Requires: yum >= 3.2.23
-%description -n yum-plugin-aliases
-This plugin adds the command alias, and parses the aliases config. file to
-enable aliases.
+%description -n yum-plugin-show-leaves
+Yum plugin which shows newly installed leaf packages
+and packages that became leaves after a transaction
+
+
+%package -n yum-plugin-refresh-updatesd
+Summary: Tell yum-updatesd to check for updates when yum exits
+Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0
+Requires: yum-updatesd
+Provides: yum-refresh-updatesd = %{version}-%{release}
+Conflicts: yum-refresh-updatesd < 1.1.20-0
+Obsoletes: yum-refresh-updatesd < 1.1.20-0
+
+%description -n yum-plugin-refresh-updatesd
+yum-refresh-updatesd tells yum-updatesd to check for updates when yum exits.
+This way, if you run 'yum update' and install all available updates, puplet
+will almost instantly update itself to reflect this.
+
%package -n yum-plugin-list-data
Summary: Yum plugin to list aggregate package data
Group: System/Base
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.0.5
Provides: yum-list-data = %{version}-%{release}
-Obsoletes: yum-list-data < 1.1.20-0
Conflicts: yum-list-data < 1.1.20-0
-Requires: yum >= 3.0.5
+Obsoletes: yum-list-data < 1.1.20-0
%description -n yum-plugin-list-data
This plugin adds the commands list- vendors, groups, packagers, licenses,
arches, committers, buildhosts, baseurls, package-sizes, archive-sizes and
installed-sizes.
-%package -n yum-plugin-filter-data
-Summary: Yum plugin to list filter based on package data
+
+%package -n yum-plugin-post-transaction-actions
+Summary: Yum plugin to run arbitrary commands when certain pkgs are acted on
Group: System/Base
-Provides: yum-filter-data = %{version}-%{release}
-Obsoletes: yum-filter-data < 1.1.20-0
-Conflicts: yum-filter-data < 1.1.20-0
-Requires: yum >= 3.2.17
+Requires: %{name} = %{version}-%{release}
+Requires: yum >= 3.2.19
+Provides: yum-post-transaction-actions = %{version}-%{release}
+Conflicts: yum-post-transaction-actions < 1.1.20-0
+Obsoletes: yum-post-transaction-actions < 1.1.20-0
+
+%description -n yum-plugin-post-transaction-actions
+This plugin allows the user to run arbitrary actions immediately following a
+transaction when specified packages are changed.
+
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+# >> setup
+# << setup
+
+%build
+# >> build pre
+# << build pre
+
+
+make %{?jobs:-j%jobs}
+
+# >> build post
+# << build post
+%install
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
+%make_install
+
+# >> install post
+make -C updateonboot DESTDIR=%{buildroot} install
+
+# Plugins to install
+plugins="\
+changelog \
+fastestmirror \
+protectbase \
+versionlock \
+tsflags \
+downloadonly \
+priorities \
+refresh-updatesd \
+merge-conf \
+security \
+upgrade-helper \
+aliases \
+list-data \
+filter-data \
+tmprepo \
+verify \
+keys \
+remove-with-leaves \
+post-transaction-actions \
+rpm-warm-cache \
+auto-update-debuginfo \
+show-leaves \
+local \
+fs-snapshot \
+"
+
+mkdir -p %{buildroot}/%{_sysconfdir}/yum/pluginconf.d/ %{buildroot}/usr/lib/yum-plugins/
+mkdir -p %{buildroot}/%{_sysconfdir}/yum/post-actions
+
+cd plugins
+for plug in $plugins; do
+install -m 644 $plug/*.conf %{buildroot}/%{_sysconfdir}/yum/pluginconf.d/
+install -m 644 $plug/*.py %{buildroot}/usr/lib/yum-plugins/
+%{__python} -c "import compileall; compileall.compile_dir('%{buildroot}/usr/lib/yum-plugins', 1)"
+done
+install -m 644 aliases/aliases %{buildroot}/%{_sysconfdir}/yum/aliases.conf
+install -m 644 versionlock/versionlock.list %{buildroot}/%{_sysconfdir}/yum/pluginconf.d/
+# need for for the ghost in files section of yum-plugin-local
+mkdir -p %{buildroot}/%{_sysconfdir}/yum.repos.d
+touch %{buildroot}%{_sysconfdir}/yum.repos.d/_local.repo
+rm -rf %{buildroot}/etc/NetworkManager
+
+# << install post
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+%preun -n yum-updateonboot
+# >> preun yum-updateonboot
+if [ $1 = 0 ]; then
+/sbin/service yum-updateonboot stop >/dev/null 2>&1 || :;
+/sbin/chkconfig --del yum-updateonboot >/dev/null 2>&1 || :;
+fi
+# << preun yum-updateonboot
+
+%post -n yum-updateonboot
+# >> post yum-updateonboot
+/sbin/chkconfig --add yum-updateonboot >/dev/null 2>&1 || :;
+# << post yum-updateonboot
+
+
+
-%description -n yum-plugin-filter-data
-This plugin adds the options --filter- vendors, groups, packagers, licenses,
-arches, committers, buildhosts, baseurls, package-sizes, archive-sizes and
-installed-sizes. Note that each package must match at least one pattern/range in
-each category, if any were specified.
-%package -n yum-plugin-tmprepo
-Summary: Yum plugin to add temporary repositories
-Group: System/Base
-Provides: yum-tmprepo = %{version}-%{release}
-Obsoletes: yum-tmprepo < 1.1.20-0
-Conflicts: yum-tmprepo < 1.1.20-0
-Requires: yum >= 3.2.11
-Requires: createrepo
-%description -n yum-plugin-tmprepo
-This plugin adds the option --tmprepo which takes a url to a .repo file
-downloads it and enables it for a single run. This plugin tries to ensure
-that temporary repositories are safe to use, by default, by not allowing
-gpg checking to be disabled.
-%package -n yum-plugin-verify
-Summary: Yum plugin to add verify command, and options
-Group: System/Base
-Provides: yum-verify = %{version}-%{release}
-Obsoletes: yum-verify < 1.1.20-0
-Conflicts: yum-verify < 1.1.20-0
-Requires: yum >= 3.2.12
-%description -n yum-plugin-verify
-This plugin adds the commands verify, verify-all and verify-rpm. There are
-also a couple of options. This command works like rpm -V, to verify your
-installation.
-%package -n yum-plugin-keys
-Summary: Yum plugin to deal with signing keys
-Group: System/Base
-Provides: yum-keys = %{version}-%{release}
-Obsoletes: yum-keys < 1.1.20-0
-Conflicts: yum-keys < 1.1.20-0
-Requires: yum >= 3.2.19
-%description -n yum-plugin-keys
-This plugin adds the commands keys, keys-info, keys-data and keys-remove. They
-allow you to query and remove signing keys.
-%package -n yum-plugin-remove-with-leaves
-Summary: Yum plugin to remove dependencies which are no longer used because of a removal
-Group: System/Base
-Provides: yum-remove-with-leaves = %{version}-%{release}
-Obsoletes: yum-remove-with-leaves < 1.1.20-0
-Conflicts: yum-remove-with-leaves < 1.1.20-0
-Requires: yum >= 3.2.19
-%description -n yum-plugin-remove-with-leaves
-This plugin removes any unused dependencies that were brought in by an install
-but would not normally be removed. It helps to keep a system clean of unused
-libraries and packages.
-%package -n yum-plugin-post-transaction-actions
-Summary: Yum plugin to run arbitrary commands when certain pkgs are acted on
-Group: System/Base
-Provides: yum-post-transaction-actions = %{version}-%{release}
-Obsoletes: yum-post-transaction-actions < 1.1.20-0
-Conflicts: yum-post-transaction-actions < 1.1.20-0
-Requires: yum >= 3.2.19
-%description -n yum-plugin-post-transaction-actions
-This plugin allows the user to run arbitrary actions immediately following a
-transaction when specified packages are changed.
-%package -n yum-NetworkManager-dispatcher
-Summary: NetworkManager script which tells yum to check it's cache on network change
-Group: System/Base
-Requires: yum >= 3.2.17
-%description -n yum-NetworkManager-dispatcher
-This NetworkManager "dispatch script" forces yum to check its cache if/when a
-new network connection happens in NetworkManager. Note that currently there is
-no checking of previous data, so if your WiFi keeps going up and down (or you
-suspend/resume a lot) yum will recheck its cached data a lot.
-%package -n yum-plugin-rpm-warm-cache
-Summary: Yum plugin to access the rpmdb files early to warm up access to the db
-Group: System/Base
-Provides: yum-rpm-warm-cache = %{version}-%{release}
-Obsoletes: yum-rpm-warm-cache < 1.1.20-0
-Conflicts: yum-rpm-warm-cache < 1.1.20-0
-Requires: yum >= 3.2.19
-%description -n yum-plugin-rpm-warm-cache
-This plugin reads the rpmdb files into the system cache before accessing the
-rpmdb directly. In some cases this should speed up access to rpmdb information
-%package -n yum-plugin-auto-update-debug-info
-# Works by searching for *-debuginfo ... so it shouldn't trigger on itself.
-Summary: Yum plugin to enable automatic updates to installed debuginfo packages
-Group: System/Base
-Obsoletes: yum-plugin-auto-update-debuginfo < 1.1.21-0
-Conflicts: yum-plugin-auto-update-debuginfo < 1.1.21-0
-Provides: yum-plugin-auto-update-debuginfo = %{version}-%{release}
-Requires: yum >= 3.2.19
-%description -n yum-plugin-auto-update-debug-info
-This plugin looks to see if any debuginfo packages are installed, and if there
-are it enables all debuginfo repositories that are "children" of enabled
-repositories.
-%package -n yum-plugin-show-leaves
-Summary: Yum plugin which shows newly installed leaf packages
-Group: System/Base
-Requires: yum >= 3.2.23
-%description -n yum-plugin-show-leaves
-Yum plugin which shows newly installed leaf packages
-and packages that became leaves after a transaction
-%package -n yum-plugin-local
-Summary: Yum plugin to automatically manage a local repo. of downloaded packages
-Group: System/Base
-# Who the hell knows what version :)
-Requires: yum >= 3.2.22
-Requires: createrepo
-%description -n yum-plugin-local
-When this plugin is installed it will automatically copy all downloaded packages
-to a repository on the local filesystem, and (re)build that repository. This
-means that anything you've downloaded will always exist, even if the original
-repo. removes it (and can thus. be reinstalled/downgraded/etc.).
-%package -n yum-plugin-fs-snapshot
-Summary: Yum plugin to automatically snapshot your filesystems during updates
-Group: System/Base
-Requires: yum >= 3.2.22
-%description -n yum-plugin-fs-snapshot
-When this plugin is installed it will automatically snapshot any
-filesystem that is touched by the packages in a yum update or yum remove.
-%prep
-%setup -q
-%patch100 -p1
-%install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
-make -C updateonboot DESTDIR=$RPM_BUILD_ROOT install
-# Plugins to install
-plugins="\
- changelog \
- fastestmirror \
- protectbase \
- versionlock \
- tsflags \
- downloadonly \
- priorities \
- refresh-updatesd \
- merge-conf \
- security \
- protect-packages \
- upgrade-helper \
- aliases \
- list-data \
- filter-data \
- tmprepo \
- verify \
- keys \
- remove-with-leaves \
- post-transaction-actions \
- rpm-warm-cache \
- auto-update-debuginfo \
- show-leaves \
- local \
- fs-snapshot \
-"
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/post-actions
-cd plugins
-for plug in $plugins; do
- install -m 644 $plug/*.conf $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/
- install -m 644 $plug/*.py $RPM_BUILD_ROOT/usr/lib/yum-plugins/
- %{__python} -c "import compileall; compileall.compile_dir('$(RPM_BUILD_ROOT)/usr/lib/yum-plugins', 1)"
-done
-install -m 644 aliases/aliases $RPM_BUILD_ROOT/%{_sysconfdir}/yum/aliases.conf
-install -m 644 versionlock/versionlock.list $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/
-# need for for the ghost in files section of yum-plugin-local
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d
-touch $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/_local.repo
-rm -rf %{buildroot}/etc/NetworkManager
-%clean
-rm -rf $RPM_BUILD_ROOT
-%post -n yum-updateonboot
-/sbin/chkconfig --add yum-updateonboot >/dev/null 2>&1 || :;
-%preun -n yum-updateonboot
-if [ $1 = 0 ]; then
- /sbin/service yum-updateonboot stop >/dev/null 2>&1 || :;
- /sbin/chkconfig --del yum-updateonboot >/dev/null 2>&1 || :;
-fi
%files
+%defattr(-,root,root,-)
+# >> files
%defattr(-, root, root)
%doc README yum-util-cli-template
%doc COPYING
@@ -450,171 +579,244 @@
%{_bindir}/verifytree
%{_bindir}/yumdownloader
%{_bindir}/yum-builddep
+%{_bindir}/yum-config-manager
%{_bindir}/yum-debug-dump
%{_bindir}/yum-groups-manager
%{_bindir}/yum-debug-restore
%{_sbindir}/yum-complete-transaction
%{_sbindir}/yumdb
-%{_mandir}/man1/yum-utils.1.*
-%{_mandir}/man1/debuginfo-install.1.*
-%{_mandir}/man1/package-cleanup.1.*
-%{_mandir}/man1/repo-rss.1.*
-%{_mandir}/man1/repoquery.1.*
-%{_mandir}/man1/repodiff.1.*
-%{_mandir}/man1/reposync.1.*
-%{_mandir}/man1/yum-builddep.1.*
-%{_mandir}/man1/yum-debug-dump.1.*
-%{_mandir}/man8/yum-complete-transaction.8.*
-%{_mandir}/man1/yum-groups-manager.1.*
-%{_mandir}/man1/yumdownloader.1.*
+%doc %{_mandir}/man1/yum-utils.1.*
+%doc %{_mandir}/man1/debuginfo-install.1.*
+%doc %{_mandir}/man1/package-cleanup.1.*
+%doc %{_mandir}/man1/repo-rss.1.*
+%doc %{_mandir}/man1/repoquery.1.*
+%doc %{_mandir}/man1/repodiff.1.*
+%doc %{_mandir}/man1/reposync.1.*
+%doc %{_mandir}/man1/yum-builddep.1.*
+%doc %{_mandir}/man1/yum-debug-dump.1.*
+%doc %{_mandir}/man8/yum-complete-transaction.8.*
+%doc %{_mandir}/man1/yum-groups-manager.1.*
+%doc %{_mandir}/man1/yumdownloader.1.*
+%doc %{_mandir}/man8/yumdb.8.*
+# << files
-%files -n yum-updateonboot
+
+%files -n yum-plugin-aliases
+%defattr(-,root,root,-)
+# >> files yum-plugin-aliases
%defattr(-, root, root)
-%doc updateonboot/README
-%config(noreplace) %{_sysconfdir}/sysconfig/yum-updateonboot
-%{_initrddir}/yum-updateonboot
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf
+%config(noreplace) %{_sysconfdir}/yum/aliases.conf
+/usr/lib/yum-plugins/aliases.*
+%doc %{_mandir}/man1/yum-aliases.1.*
+# << files yum-plugin-aliases
-%files -n yum-plugin-changelog
+%files -n yum-plugin-security
+%defattr(-,root,root,-)
+# >> files yum-plugin-security
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/changelog.conf
-/usr/lib/yum-plugins/changelog.*
-%{_mandir}/man1/yum-changelog.1.*
-%{_mandir}/man5/yum-changelog.conf.5.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/security.conf
+/usr/lib/yum-plugins/security.*
+%doc %{_mandir}/man8/yum-security.8.*
+# << files yum-plugin-security
-%files -n yum-plugin-fastestmirror
+%files -n yum-plugin-fs-snapshot
+%defattr(-,root,root,-)
+# >> files yum-plugin-fs-snapshot
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fastestmirror.conf
-/usr/lib/yum-plugins/fastestmirror*.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fs-snapshot.conf
+/usr/lib/yum-plugins/fs-snapshot.*
+%doc %{_mandir}/man1/yum-fs-snapshot.1.*
+%doc %{_mandir}/man5/yum-fs-snapshot.conf.5.*
+# << files yum-plugin-fs-snapshot
-%files -n yum-plugin-protectbase
+%files -n yum-plugin-merge-conf
+%defattr(-,root,root,-)
+# >> files yum-plugin-merge-conf
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protectbase.conf
-/usr/lib/yum-plugins/protectbase.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/merge-conf.conf
+/usr/lib/yum-plugins/merge-conf.*
+# << files yum-plugin-merge-conf
%files -n yum-plugin-versionlock
+%defattr(-,root,root,-)
+# >> files yum-plugin-versionlock
%defattr(-, root, root)
%doc plugins/versionlock/README
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.conf
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.list
/usr/lib/yum-plugins/versionlock.*
-%{_mandir}/man1/yum-versionlock.1.*
-%{_mandir}/man5/yum-versionlock.conf.5.*
+%doc %{_mandir}/man1/yum-versionlock.1.*
+%doc %{_mandir}/man5/yum-versionlock.conf.5.*
+# << files yum-plugin-versionlock
+
+%files -n yum-plugin-protectbase
+%defattr(-,root,root,-)
+# >> files yum-plugin-protectbase
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protectbase.conf
+/usr/lib/yum-plugins/protectbase.*
+# << files yum-plugin-protectbase
+
+%files -n yum-plugin-tmprepo
+%defattr(-,root,root,-)
+# >> files yum-plugin-tmprepo
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf
+/usr/lib/yum-plugins/tmprepo.*
+# << files yum-plugin-tmprepo
+
+%files -n yum-plugin-remove-with-leaves
+%defattr(-,root,root,-)
+# >> files yum-plugin-remove-with-leaves
+%defattr(-, root, root)
+/usr/lib/yum-plugins/remove-with-leaves.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/remove-with-leaves.conf
+# << files yum-plugin-remove-with-leaves
%files -n yum-plugin-tsflags
+%defattr(-,root,root,-)
+# >> files yum-plugin-tsflags
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tsflags.conf
/usr/lib/yum-plugins/tsflags.*
+# << files yum-plugin-tsflags
+
+%files -n yum-plugin-filter-data
+%defattr(-,root,root,-)
+# >> files yum-plugin-filter-data
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf
+/usr/lib/yum-plugins/filter-data.*
+%doc %{_mandir}/man1/yum-filter-data.1.*
+# << files yum-plugin-filter-data
+
+%files -n yum-plugin-keys
+%defattr(-,root,root,-)
+# >> files yum-plugin-keys
+%defattr(-, root, root)
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/keys.conf
+/usr/lib/yum-plugins/keys.*
+# << files yum-plugin-keys
+
+%files -n yum-plugin-rpm-warm-cache
+%defattr(-,root,root,-)
+# >> files yum-plugin-rpm-warm-cache
+%defattr(-, root, root)
+/usr/lib/yum-plugins/rpm-warm-cache.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/rpm-warm-cache.conf
+# << files yum-plugin-rpm-warm-cache
%files -n yum-plugin-downloadonly
+%defattr(-,root,root,-)
+# >> files yum-plugin-downloadonly
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/downloadonly.conf
/usr/lib/yum-plugins/downloadonly.*
+# << files yum-plugin-downloadonly
+
+%files -n yum-updateonboot
+%defattr(-,root,root,-)
+# >> files yum-updateonboot
+%defattr(-, root, root)
+%doc updateonboot/README
+%config(noreplace) %{_sysconfdir}/sysconfig/yum-updateonboot
+%{_initrddir}/yum-updateonboot
+# << files yum-updateonboot
%files -n yum-plugin-priorities
+%defattr(-,root,root,-)
+# >> files yum-plugin-priorities
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/priorities.conf
/usr/lib/yum-plugins/priorities.*
+# << files yum-plugin-priorities
-%files -n yum-plugin-refresh-updatesd
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-updatesd.conf
-/usr/lib/yum-plugins/refresh-updatesd.*
-
-%files -n yum-plugin-merge-conf
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/merge-conf.conf
-/usr/lib/yum-plugins/merge-conf.*
-
-%files -n yum-plugin-security
+%files -n yum-plugin-changelog
+%defattr(-,root,root,-)
+# >> files yum-plugin-changelog
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/security.conf
-/usr/lib/yum-plugins/security.*
-%{_mandir}/man8/yum-security.8.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/changelog.conf
+/usr/lib/yum-plugins/changelog.*
+%doc %{_mandir}/man1/yum-changelog.1.*
+%doc %{_mandir}/man5/yum-changelog.conf.5.*
+# << files yum-plugin-changelog
-%files -n yum-plugin-protect-packages
+%files -n yum-plugin-fastestmirror
+%defattr(-,root,root,-)
+# >> files yum-plugin-fastestmirror
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf
-/usr/lib/yum-plugins/protect-packages.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fastestmirror.conf
+/usr/lib/yum-plugins/fastestmirror*.*
+# << files yum-plugin-fastestmirror
%files -n yum-plugin-upgrade-helper
+%defattr(-,root,root,-)
+# >> files yum-plugin-upgrade-helper
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf
/usr/lib/yum-plugins/upgrade-helper.*
+# << files yum-plugin-upgrade-helper
-%files -n yum-plugin-aliases
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf
-%config(noreplace) %{_sysconfdir}/yum/aliases.conf
-/usr/lib/yum-plugins/aliases.*
-%{_mandir}/man1/yum-aliases.1.*
-
-%files -n yum-plugin-list-data
+%files -n yum-plugin-verify
+%defattr(-,root,root,-)
+# >> files yum-plugin-verify
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf
-/usr/lib/yum-plugins/list-data.*
-%{_mandir}/man1/yum-list-data.1.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/verify.conf
+/usr/lib/yum-plugins/verify.*
+%doc %{_mandir}/man1/yum-verify.1.*
+# << files yum-plugin-verify
-%files -n yum-plugin-filter-data
+%files -n yum-plugin-auto-update-debug-info
+%defattr(-,root,root,-)
+# >> files yum-plugin-auto-update-debug-info
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf
-/usr/lib/yum-plugins/filter-data.*
-%{_mandir}/man1/yum-filter-data.1.*
+/usr/lib/yum-plugins/auto-update-debuginfo.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/auto-update-debuginfo.conf
+# << files yum-plugin-auto-update-debug-info
-%files -n yum-plugin-tmprepo
+%files -n yum-plugin-local
+%defattr(-,root,root,-)
+# >> files yum-plugin-local
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf
-/usr/lib/yum-plugins/tmprepo.*
+%ghost %{_sysconfdir}/yum.repos.d/_local.repo
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/local.conf
+/usr/lib/yum-plugins/local.*
+# << files yum-plugin-local
-%files -n yum-plugin-verify
+%files -n yum-plugin-show-leaves
+%defattr(-,root,root,-)
+# >> files yum-plugin-show-leaves
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/verify.conf
-/usr/lib/yum-plugins/verify.*
-%{_mandir}/man1/yum-verify.1.*
+/usr/lib/yum-plugins/show-leaves.*
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/show-leaves.conf
+# << files yum-plugin-show-leaves
-%files -n yum-plugin-keys
+%files -n yum-plugin-refresh-updatesd
+%defattr(-,root,root,-)
+# >> files yum-plugin-refresh-updatesd
%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/keys.conf
-/usr/lib/yum-plugins/keys.*
-
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-updatesd.conf
+/usr/lib/yum-plugins/refresh-updatesd.*
+# << files yum-plugin-refresh-updatesd
-%files -n yum-plugin-remove-with-leaves
+%files -n yum-plugin-list-data
+%defattr(-,root,root,-)
+# >> files yum-plugin-list-data
%defattr(-, root, root)
-/usr/lib/yum-plugins/remove-with-leaves.*
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/remove-with-leaves.conf
+%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf
+/usr/lib/yum-plugins/list-data.*
+%doc %{_mandir}/man1/yum-list-data.1.*
+# << files yum-plugin-list-data
%files -n yum-plugin-post-transaction-actions
+%defattr(-,root,root,-)
+# >> files yum-plugin-post-transaction-actions
%defattr(-, root, root)
/usr/lib/yum-plugins/post-transaction-actions.*
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/post-transaction-actions.conf
%doc plugins/post-transaction-actions/sample.action
# Default *.action file dropping dir.
%dir %{_sysconfdir}/yum/post-actions
-
-%files -n yum-plugin-rpm-warm-cache
-%defattr(-, root, root)
-/usr/lib/yum-plugins/rpm-warm-cache.*
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/rpm-warm-cache.conf
-
-%files -n yum-plugin-auto-update-debug-info
-%defattr(-, root, root)
-/usr/lib/yum-plugins/auto-update-debuginfo.*
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/auto-update-debuginfo.conf
-
-%files -n yum-plugin-show-leaves
-%defattr(-, root, root)
-/usr/lib/yum-plugins/show-leaves.*
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/show-leaves.conf
-
-%files -n yum-plugin-local
-%defattr(-, root, root)
-%ghost %{_sysconfdir}/yum.repos.d/_local.repo
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/local.conf
-/usr/lib/yum-plugins/local.*
-
-%files -n yum-plugin-fs-snapshot
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fs-snapshot.conf
-/usr/lib/yum-plugins/fs-snapshot.*
-%{_mandir}/man1/yum-fs-snapshot.1.*
-%{_mandir}/man5/yum-fs-snapshot.conf.5.*
+# << files yum-plugin-post-transaction-actions
other changes:
--------------
++++++ Makefile (new)
--- Makefile
+++ Makefile
+PKG_NAME := yum-utils
+SPECFILE = $(addsuffix .spec, $(PKG_NAME))
+YAMLFILE = $(addsuffix .yaml, $(PKG_NAME))
+
+include /usr/share/packaging-tools/Makefile.common
+
++++++ yum-utils-1.1.25.tar.gz -> yum-utils-1.1.27.tar.gz
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,535 @@
+2010-06-06 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.27
+
+2010-06-05 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * debuginfo-install.py, plugins/keys/keys.py,
+ yum-complete-transaction.py, yum-debug-dump.py, yumdownloader.py:
+ Fix pylint errors ************* Module debuginfo-install W0611: 26:
+ Unused import to_unicode ************* Module
+ yum-complete-transaction E0602:238:YumCompleteTransaction.main:
+ Undefined variable 'YumBaseError' ************* Module
+ yum-debug-dump E1103:100:YumDebugDump.dump_yum_config_info: Instance
+ of 'DummyYumPlugins' has no '_plugins' member (but some types could
+ not be inferred) ************* Module yumdownloader W0611: 22:
+ Unused import getCacheDir ************* Module keys
+ E9905:229:KeysInfoCommand.show_key: Too many arguments for format
+ string
+
+2010-06-04 Seth Vidal <skvidal at fedoraproject.org>
+
+ * repodiff.py: to_unicode() summary for repodiff, too closes
+ https://bugzilla.redhat.com/show_bug.cgi?id=600501
+
+2010-06-04 James Antill <james at and.org>
+
+ * repoquery.py: Overridding .qf happens in doQuery, so we have to
+ cache multiple translations
+
+2010-06-04 James Antill <james at and.org>
+
+ * repoquery.py: Do the right thing for: --nevra --qf "blah"
+
+2010-06-03 James Antill <james at and.org>
+
+ * yumdownloader.py: Have yumdownloader use yb.setCacheDir() so it
+ goes the same location. BZ 599726
+
+2010-06-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ * yum-complete-transaction.py: handle corrupt transaction journals
+ - catch the misc exception when the transaction file is corrupt -
+ tell the user to file a bug b/c whatever made their file corrupt is
+ probably not good for their fs - deals with
+ https://bugzilla.redhat.com/show_bug.cgi?id=599574
+
+2010-06-03 James Antill <james at and.org>
+
+ * repoquery.py: Sort the packages, when we have plain pkgs,
+ basically free!
+
+2010-06-03 James Antill <james at and.org>
+
+ * repoquery.py: Don't match '*' against each pkg. for all, just get
+ all of them
+
+2010-06-03 James Antill <james at and.org>
+
+ * repoquery.py: Don't convert the user qf for each package, when we
+ can now do it once.
+
+2010-06-03 James Antill <james at and.org>
+
+ * repoquery.py: Don't create N PkgQuery objects, when we can reuse
+ them.
+
+2010-06-02 James Antill <james at and.org>
+
+ * repoquery.py: Don't explicitly call doRepoSetup()
+
+2010-06-02 James Antill <james at and.org>
+
+ * repoquery.py: Use .arch.archlist if available, also don't call
+ .doTsSetup
+
+2010-06-02 James Antill <james at and.org>
+
+ * repoquery.py: Use prerepoconf, if available
+
+2010-06-02 James Antill <james at and.org>
+
+ * repoquery.py: Don't auto needfiles, when we are just looking at
+ installed
+
+2010-05-25 James Antill <james at and.org>
+
+ * repodiff.py: Fix comment typo
+
+2010-05-24 James Antill <james at and.org>
+
+ * yum-config-manager.py: Don't save anything we don't have to, mainly enable/disable hack
+ (should fix config. objects to not change unchanged things).
+
+2010-05-21 James Antill <james at and.org>
+
+ * yum-builddep.py: Have yum-builddep just call .install(), deals
+ with updates and multilib.
+
+2010-05-21 James Antill <james at and.org>
+
+ * Makefile, yum-config-manager.py, yum-show-config.py,
+ yum-utils.spec: Change show-config to config-manager, let people set
+ stuff too.
+
+2010-05-21 James Antill <james at and.org>
+
+ * Makefile, yum-show-config.py, yum-utils.spec: Add yum-show-config
+ command, to let people see the config. as yum sees it.
+
+2010-05-21 James Antill <james at and.org>
+
+ * repoquery.py: Fix the description of quiet (and tell people it's
+ on by default).
+
+2010-05-21 James Antill <james at and.org>
+
+ * repoquery.py: Add errormsg for bad repofrompath argument, make
+ repoid not found an error
+
+2010-05-20 James Antill <james at and.org>
+
+ * repomanage.py: Remove exception from getFileList() and return an
+ empty list, BZ 587288.
+
+2010-05-20 James Antill <james at and.org>
+
+ * repoquery.py: Tell the user about bad --repoid args, but only in
+ non-quiet BZ 593786
+
+2010-05-17 Ville Skyttä <ville.skytta at iki.fi>
+
+ * docs/debuginfo-install.1, docs/yum-changelog.1,
+ docs/yum-list-data.1, docs/yum-security.8: Man page formatting
+ fixes.
+
+2010-05-12 James Antill <james at and.org>
+
+ * repoquery.py: Sort package lists, in repoquery --whatrequires
+ output.
+
+2010-05-06 Ville Skyttä <ville.skytta at iki.fi>
+
+ * yum-utils.bash: Include --installed in repoquery completions.
+
+2010-05-05 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * plugins/fastestmirror/fastestmirror.py: fastestmirror: make it
+ work as non-root user (Don't setup cache dir to early) (rhbz
+ #537829)
+
+2010-05-05 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * yum-complete-transaction.py: yum-complete-transaction : catch
+ YumBaseError in transaction (rhbz #538748)
+
+2010-05-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ * repoquery.py: - allow querytags like yumdb_info.from_repo - make ValueErrors if
+ you hit a bad rpmtag a lot nicer - stop the traceback - allow '.'s
+ in fmt querys
+
+2010-05-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ 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: add missing
+ import catch yum exception in --orphans (rhbz #582039) The
+ protect-packages feature has been merged into core yum, removing it
+ make package-cleanup handle custom kernel with an '-' in the kernel
+ release (rhbz #539651) [fastestmirror] Bump version and update our
+ changelog [fastestmirror] Patch from Kris Ven to add a
+ 'include_only' option
+
+2010-05-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ * docs/repoquery.1, repoquery.py: add --installed option - adds
+ pkgnarrow='installed' and disables all repos
+
+2010-05-02 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * package-cleanup.py: add missing import
+
+2010-05-02 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * package-cleanup.py: catch yum exception in --orphans (rhbz
+ #582039)
+
+2010-04-29 James Antill <james at and.org>
+
+ * plugins/protect-packages/protect-packages.conf,
+ plugins/protect-packages/protect-packages.py, yum-utils.spec: The
+ protect-packages feature has been merged into core yum, removing it
+
+
+2010-04-29 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * package-cleanup.py: make package-cleanup handle custom kernel with
+ an '-' in the kernel release (rhbz #539651)
+
+2010-04-24 Luke Macken <lmacken at redhat.com>
+
+ * plugins/fastestmirror/ChangeLog,
+ plugins/fastestmirror/fastestmirror.py: [fastestmirror] Bump version
+ and update our changelog
+
+2010-04-24 Luke Macken <lmacken at redhat.com>
+
+ * plugins/fastestmirror/fastestmirror.conf,
+ plugins/fastestmirror/fastestmirror.py: [fastestmirror] Patch from
+ Kris Ven to add a 'include_only' option
+
+2010-04-20 Maxim Burgerhout <maxim at wzzrd.com>
+
+ * plugins/fs-snapshot/fs-snapshot.py: Don't require /sbin in the
+ path for fs-snapshot to work
+
+2010-04-20 James Antill <james at and.org>
+
+ * debuginfo-install.py,
+ plugins/auto-update-debuginfo/auto-update-debuginfo.py: Add the repo
+ setopts to auto-update-debuginfo
+
+2010-04-20 Matt McCutchen <matt at mattmccutchen.net>
+
+ * plugins/auto-update-debuginfo/auto-update-debuginfo.py: Stop
+ calling doRepoSetup many times, in auto-update-debuginfo
+
+2010-04-20 James Antill <james at and.org>
+
+ * debuginfo-install.py: Fixup setopt inheritence
+
+2010-04-20 Matt McCutchen <matt at mattmccutchen.net>
+
+ * debuginfo-install.py: Stop calling doRepoSetup many times, in
+ debuginfo-install
+
+2010-04-20 James Antill <james at and.org>
+
+ * debuginfo-install.py: Let debuginfo-install work without
+ getOptionGroup
+
+2010-04-20 James Antill <james at and.org>
+
+ * yum-groups-manager.py: Remove dead code block
+
+2010-04-19 Ville Skyttä <ville.skytta at iki.fi>
+
+ * plugins/verify/verify.py: Fix --verify-configuration-files CLI
+ option.
+
+2010-04-19 Ville Skyttä <ville.skytta at iki.fi>
+
+ * repoquery.py: Don't bother grabbing changelog names and texts if
+ we don't have times.
+
+2010-04-19 Ville Skyttä <ville.skytta at iki.fi>
+
+ * debuginfo-install.py,
+ plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore
+ .py, plugins/tmprepo/tmprepo.py, repo-rss.py, repodiff.py,
+ repoquery.py, repotrack.py, yum-groups-manager.py: Clean up some
+ unused variables and imports.
+
+2010-04-19 Ville Skyttä <ville.skytta at iki.fi>
+
+ * Makefile: Run pylint on plugins/*/*/*.py too.
+
+2010-04-18 James Antill <james at and.org>
+
+ * repodiff.py: Fix the actual bug in repodiff, comparison
+
+2010-04-18 James Antill <james at and.org>
+
+ * repodiff.py: Yes, looking at code at 2am strikes again ... this was total crack.
+ Revert "One more fix for the changelog time comparison" This
+ reverts commit 3d9cf740ee9c9c2fbf8e408fe0eb2d46c1a88a00.
+
+2010-04-18 James Antill <james at and.org>
+
+ * repodiff.py: One more fix for the changelog time comparison
+
+2010-04-16 James Antill <james at and.org>
+
+ * repodiff.py: Use the newest old changelog entry, not the oldest
+ ... *sigh*
+
+2010-04-15 James Antill <james at and.org>
+
+ * repodiff.py: Fix typo on obsoletes check, in repodiff
+
+2010-04-13 James Antill <james at and.org>
+
+ * docs/repodiff.1, repodiff.py: Add message about archlist usage, to
+ stop people being confused.
+
+2010-04-13 James Antill <james at and.org>
+
+ * repodiff.py: Fix obsoletes processing in repodiff, also giant speedup. Compared
+ output both before and after and it was identical: 1. Original
+ with 3.2.27: 8 minutes 27 seconds 2. Original with
+ returnNewestByName() speedup: 1 minute 50 seconds. 3. New repodiff
+ with 3.2.27: 11 seconds. ...tested with Updates/11 vs. Updates/12
+ on 2010-04-13.
+
+2010-04-13 James Antill <james at and.org>
+
+ * repodiff.py: Stupid typo fix
+
+2010-04-13 Michael Schwendt <mschwendt at gmail.com>
+
+ * repodiff.py: Get the newer "same day" changelog entries in
+ repodiff. Tided by by James.
+
+2010-04-10 Ville Skyttä <ville.skytta at iki.fi>
+
+ * yum-utils.bash: Add copy to yumdb completions.
+
+2010-04-09 Seth Vidal <skvidal at fedoraproject.org>
+
+ * reposync.py: fixes
+ https://bugzilla.redhat.com/show_bug.cgi?id=580343 when we are
+ dealing with compressed comps files just fetch the group not
+ group_gz
+
+2010-04-08 James Antill <james at and.org>
+
+ * plugins/fastestmirror/fastestmirror.conf,
+ plugins/fastestmirror/fastestmirror.py: Use the yum configured
+ cachedir value, in fastestmirror
+
+2010-04-08 James Antill <james at and.org>
+
+ * docs/Makefile, docs/yumdb.8, yum-utils.spec, yumdb.py: Add yumdb
+ man page, and yumdb copy command
+
+2010-04-02 Ville Skyttä <ville.skytta at iki.fi>
+
+ * plugins/fastestmirror/fastestmirror.py: Fix always_print_best_host
+ conf setting.
+
+2010-04-01 Ville Skyttä <ville.skytta at iki.fi>
+
+ * yum-utils.bash: Add repoclosure --group completion.
+
+2010-03-31 Dennis Gregorovic <dgregor at redhat.com>
+
+ * repoclosure.py: Add a --group flag to filter packages by comps
+ group
+
+2010-03-31 Dennis Gregorovic <dgregor at redhat.com>
+
+ * repoclosure.py: Include all packages listed in the pkgonly arg
+
+2010-03-30 Ville Skyttä <ville.skytta at iki.fi>
+
+ * package-cleanup.py, plugins/changelog/changelog.py,
+ plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore
+ .py, plugins/fedorakmod/fedorakmod.py,
+ plugins/fs-snapshot/fs-snapshot.py,
+ plugins/post-transaction-actions/post-transaction-actions.py,
+ plugins/priorities/priorities.py,
+ plugins/protectbase/protectbase.py,
+ plugins/remove-with-leaves/remove-with-leaves.py,
+ plugins/upgrade-helper/upgrade-helper.py, repo-graph.py,
+ repo-rss.py, repoclosure.py, repodiff.py, repomanage.py,
+ repoquery.py, reposync.py, repotrack.py, yum-debug-dump.py: Use "in"
+ instead of has_key.
+
+2010-03-26 Ville Skyttä <ville.skytta at iki.fi>
+
+ * yum-utils.bash: Complete on repomanage.py, package-cleanup.py, and
+ verifytree.py.
+
+2010-03-10 Ville Skyttä <ville.skytta at iki.fi>
+
+ * yum-utils.bash: Add bash completion for yumdb.
+
+2010-03-02 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * repoclosure.py: Make repoclosure work with relative paths, like
+ ./myrepo or just .
+
+2010-03-01 James Antill <james at and.org>
+
+ * package-cleanup.py: Add yum-utils to the run_with_packages when
+ running pkg-cleanup
+
+2010-03-01 James Antill <james at and.org>
+
+ * yum-complete-transaction.py: Add yum-utils to the
+ run_with_packages when running y-c-t
+
+2010-03-01 Seth Vidal <skvidal at fedoraproject.org>
+
+ * debuginfo-install.py: setup some repo features that make sense for
+ the debug repos to inherit from the non-debug repos when we add them
+
+
+2010-03-01 Seth Vidal <skvidal at fedoraproject.org>
+
+ * repoclosure.py: catch all yum errors and valueError (which is
+ coming from yum.config.py :() generally this just means we'll get
+ less ABRT errors and more reports from users (I hope)
+
+2010-02-27 Ville Skyttä <ville.skytta at iki.fi>
+
+ * repoquery.py: Fix --releasever.
+
+2010-02-25 Seth Vidal <skvidal at fedoraproject.org>
+
+ * repoquery.py: move around where we query for pkgs from
+ sackops/prcos and what happens if no special output format is
+ specified in repoquery. makes: repoquery -qfi /bin/bash output -qi
+ output rather than -q output.
+
+2010-02-15 Seth Vidal <skvidal at fedoraproject.org>
+
+ 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: Make
+ --alldeps the default in repoquery.
+
+2010-02-15 Seth Vidal <skvidal at fedoraproject.org>
+
+ * repoquery.py: make repoquery pass in the whole string not just
+ split for names
+
+2010-02-10 Ville Skyttä <ville.skytta at iki.fi>
+
+ Merge branch 'master' of
+ ssh://yum.baseurl.org/srv/projects/yum/git/yum-utils
+
+2010-02-10 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * ChangeLog: updated ChangeLog
+
+2010-02-10 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.26
+
+2010-02-10 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * ChangeLog: updated ChangeLog
+
+2010-02-10 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * yum-utils.spec: bumped yum-utils version to 1.1.26
+
+2010-02-09 Ville Skyttä <ville.skytta at iki.fi>
+
+ * docs/repoquery.1, repoquery.py, yum-utils.bash: Make --alldeps the
+ default in repoquery. --alldeps is what people really almost always
+ want, but fail to specify for some reason. --exactdeps can be used
+ to get the previous default of exact matching.
+
+2010-02-09 Ville Skyttä <ville.skytta at iki.fi>
+
+ * docs/repoquery.1, repoquery.py, yum-utils.bash: Add --config
+ option as the long variant of -c.
+
+2010-02-03 Mike Snitzer <msnitzer at fedoraproject.org>
+
+ * plugins/fs-snapshot/fs-snapshot.py: commit final fs-snapshot patch
+ for mike
+
+2010-02-03 Mike Snitzer <msnitzer at fedoraproject.org>
+
+ * docs/yum-fs-snapshot.1, docs/yum-fs-snapshot.conf.5,
+ plugins/fs-snapshot/fs-snapshot.conf,
+ plugins/fs-snapshot/fs-snapshot.py: add lvm support for fs-snapshot
+ plugin
+
+2010-02-03 James Antill <james at and.org>
+
+ * yum-builddep.py: Minor builddep speedup, for srcnames lookup don't
+ load all pkgs
+
+2010-02-03 James Antill <james at and.org>
+
+ * yum-builddep.py: yum-builddep should do something useful for local
+ .src.rpm files, BZ 561341
+
+2010-02-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ 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: Fix
+ copy&paste from Makefile => .spec, $(var) => $var
+
+2010-02-03 Seth Vidal <skvidal at fedoraproject.org>
+
+ * yum-builddep.py: move toActOn initialization up to avoid rh bug:
+ https://bugzilla.redhat.com/show_bug.cgi?id=561341
+
+2010-02-02 James Antill <james at and.org>
+
+ * yum-utils.spec: Fix copy&paste from Makefile => .spec, $(var) =>
+ $var
+
+2010-02-02 Seth Vidal <skvidal at fedoraproject.org>
+
+ * needs-restarting.py: disable plugins on needs-restarting for rh
+ bug: #561023
+
+2010-02-01 James Antill <james at and.org>
+
+ * yum-util-cli-template: Change cli template: print_help => print
+ format_help() al la. BZ 560369
+
+2010-02-01 James Antill <james at and.org>
+
+ * repomanage.py, repoquery.py: Remove the rest of the print_help
+ calls, unicide al la. BZ 560369
+
+2010-02-01 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * package-cleanup.py: fix UnicodeDecode Error in package-cleanup for
+ some locales like de_DE.utf8 (rhbz #560369)
+
+2010-01-29 James Antill <james at and.org>
+
+ * yum-builddep.py: Don't refer to opts.source in yum-builddep
+
+2010-01-28 James Antill <james at and.org>
+
+ * plugins/local/local.py: Fix the done message in the "local" plugin
+
+
+2010-01-27 Tim Lauridsen <timlau at fedoraproject.org>
+
+ * ChangeLog: updated ChangeLog
+
2010-01-27 Tim Lauridsen <timlau at fedoraproject.org>
* yum-utils.spec: bumped yum-utils version to 1.1.25
--- Makefile
+++ Makefile
@@ -1,6 +1,6 @@
SUBDIRS = docs
PKGNAME = yum-utils
-UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync repodiff yum-debug-dump yum-debug-restore verifytree yum-groups-manager find-repos-of-install needs-restarting
+UTILS = package-cleanup debuginfo-install repoclosure repomanage repoquery repo-graph repo-rss yumdownloader yum-builddep repotrack reposync repodiff yum-debug-dump yum-debug-restore verifytree yum-groups-manager find-repos-of-install needs-restarting yum-config-manager
UTILSROOT = yum-complete-transaction yumdb
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
RELEASE=$(shell awk -F%: '/Release:/ { print $$2 }' ${PKGNAME}.spec ')
@@ -8,7 +8,7 @@
SRPM_FILE = ${PKGNAME}-${VERSION}-${SRPM_RELEASE}.src.rpm
WEBHOST = yum.baseurl.org
WEBPATH = /srv/projects/yum/web/download/yum-utils/
-PY_FILES = $(wildcard *.py) $(wildcard plugins/*/*.py)
+PY_FILES = $(wildcard *.py) $(wildcard plugins/*/*.py) $(wildcard plugins/*/*/*.py)
NMPROG=yum-NetworkManager-dispatcher
NMPATH=$(DESTDIR)/etc/NetworkManager/dispatcher.d
--- debuginfo-install.py
+++ debuginfo-install.py
@@ -23,7 +23,6 @@
from utils import YumUtilBase
from yum import _
-from yum.i18n import to_unicode
import logging
import rpmUtils
@@ -45,7 +44,7 @@
DebugInfoInstall.USAGE)
self.logger = logging.getLogger("yum.verbose.cli.debuginfoinstall")
self.optparser = self.getOptionParser()
- opt = self.optparser
+ opts = self.optparser
# Add util commandline options to the yum-cli ones
if hasattr(self, 'getOptionGroup'):
opts = self.getOptionGroup()
@@ -77,25 +76,27 @@
self.logger.critical("Another application is holding the yum lock, cannot continue")
sys.exit(1)
-
- # Setup yum (Ts, RPM db, Repo & Sack)
- self.doUtilYumSetup()
-
# enable the -debuginfo repos for enabled primary repos
+ repos = {}
for repo in self.repos.listEnabled():
- di = '%s-debuginfo' % repo.id
+ repos[repo.id] = repo
+ for repoid in repos:
+ di = '%s-debuginfo' % repoid
+ if di in repos:
+ continue
+ repo = repos[repoid]
for r in self.repos.findRepos(di):
self.logger.log(yum.logginglevels.INFO_2,
_('enabling %s') % r.id)
r.enable()
- try:
- self.doRepoSetup(thisrepo=r.id)
- except yum.Errors.RepoError, e:
- self.logger.critical("Could not access repo %s error was: %s" %
- (r.id, to_unicode(str(e))))
- sys.exit(1)
-
- #r.setup(self.conf.cache, self.mediagrabber)
+ # Note: This is shared with auto-update-debuginfo
+ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost',
+ 'skip_if_unavailable']:
+ if hasattr(r, opt):
+ setattr(r, opt, getattr(repo, opt))
+
+ # Setup yum (Ts, RPM db, Repo & Sack)
+ self.doUtilYumSetup()
self.debugInfo_main()
self.buildTransaction()
--- docs/Makefile
+++ docs/Makefile
@@ -2,7 +2,7 @@
yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \
yum-groups-manager debuginfo-install repodiff yum-fs-snapshot
DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf
-DOCS8 = yum-security yum-complete-transaction
+DOCS8 = yum-security yum-complete-transaction yumdb
all:
echo "Nothing to do"
--- docs/debuginfo-install.1
+++ docs/debuginfo-install.1
@@ -16,7 +16,8 @@
\fBdebuginfo-install\fP kernel
.PP
.SH "WARNING MESSAGES"
-.IP "Could not find debuginfo for:" You may sometimes see warning messages about certain packages not being found
+.IP "Could not find debuginfo for:"
+You may sometimes see warning messages about certain packages not being found
if you run debuginfo-install for a wildcard or glob. Debuginfo packages are not
necessary for "noarch" RPMs; these will generate a warning message.
Additionally, On 64-bit systems, no multilib debuginfo packages are
--- docs/repodiff.1
+++ docs/repodiff.1
@@ -16,6 +16,8 @@
Add a repo. as an new repo.
.IP "\fB\-\-archlist, -a\fP"
Add architectures to change the default from just comparing source packages.
+Note that if you want the same as a native
+"x86_64" architecture machine you need: x86_64,athlon,i686,i586,i486,i386,noarch
.IP "\fB\-\-size, -s\fP"
Ouput additional data about the size of the changes.
.SH "EXAMPLES"
--- docs/repoquery.1
+++ docs/repoquery.1
@@ -48,7 +48,7 @@
.IP "\fB\-\-tempcache\fP"
Create and use a private cache instead of the main YUM cache. This is used
by default when run as non-root user.
-.IP "\fB\-c <config file>\fP"
+.IP "\fB\-c <config file>, \-\-config=<config file>\fP"
Use alternative config file (default is /etc/yum.conf).
.PP
@@ -107,8 +107,12 @@
.IP "\fB\-\-whatrequires CAPABILITY\fP"
Query all packages that require CAPABILITY.
.IP "\fB\-\-alldeps\fP"
-When used with --whatrequires, use both automatic and manual dependencies
-for the query.
+When used with --whatrequires, look for non-explicit dependencies in
+addition to explicit ones (e.g. files and Provides in addition to
+package names). This is the default.
+.IP "\fB\-\-exactdeps\fP"
+When used with --whatrequires, search for dependencies only exactly as given.
+This is effectively the opposite of --alldeps.
.IP "\fB\-\-recursive\fP"
When used with --whatrequires, query packages recursively.
.IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP"
@@ -118,6 +122,8 @@
.IP "\fB\-\-pkgnarrow=WHAT\fP"
Limit what packages are considered for the query. Valid values for WHAT are:
installed, available, recent, updates, extras, all and repository (default).
+.IP "\fB\-\-installed\fP"
+Restrict query ONLY to installed pkgs - disables all repos and only acts on rpmdb.
.IP "\fB\-\-show-dupes, \-\-show\-duplicates\fP"
Query all versions of package. By default only newest packages are
considered.
@@ -147,7 +153,7 @@
.IP "List all packages whose name contains 'perl':"
\fBrepoquery '*perl*'\fP
.IP "List all packages depending on openssl:"
-\fBrepoquery --whatrequires --alldeps openssl\fP
+\fBrepoquery --whatrequires openssl\fP
.IP "List all package names and the repository they come from, nicely formatted:"
\fBrepoquery -a --qf "%-20{repoid} %{name}"\fP
.IP "List name and summary of all available updates (if any), nicely formatted:"
--- docs/yum-changelog.1
+++ docs/yum-changelog.1
@@ -37,7 +37,7 @@
.SH EXAMPLES
# yum
.B changelog
-2008-Jan yum\*
+2008-Jan yum\\*
.br
Listing changelogs since: 2008-01-18
.br
--- docs/yum-fs-snapshot.1
+++ docs/yum-fs-snapshot.1
@@ -1,5 +1,5 @@
.\" yum-fs-snapshot
-.TH YUM-FS-SNAPSHOT 1 "14 December 2009" "" "User Manuals"
+.TH YUM-FS-SNAPSHOT 1 "3 February 2010" "" "User Manuals"
.SH NAME
.B yum-fs-snapshot
.SH SYNOPSIS
@@ -10,7 +10,11 @@
.BR yum-fs-snapshot(1)
is a Yum plugin for taking snapshots of your filesystems before running a yum
transaction. By default it will take a snapshot of any filesystem that can be
-snapshotted, which currently is limited to BTRFS filesystems.
+snapshotted, which currently is limited to BTRFS filesystems. However,
+all filesystems built on LVM logical volumes may be snapshotted at the
+block level using LVM snapshots. LVM snapshot support is provided for
+the purpose of system rollback. As such LVM snapshots will only be
+created if the kernel supports the "snapshot-merge" DM target.
.SH FILES
.B yum-fs-snapshot
uses a configuration file for its specific actions:
@@ -24,6 +28,8 @@
.SH AUTHORS
.nf
Josef Bacik <josef at toxicpanda.com>
+.br
+Mike Snitzer <msnitzer at fedoraproject.org>
.fi
.SH "SEE ALSO"
.BR yum (1)
--- docs/yum-fs-snapshot.conf.5
+++ docs/yum-fs-snapshot.conf.5
@@ -1,5 +1,5 @@
.\" yum-fs-snapshot.conf.5
-.TH YUM-FS-SNAPSHOT.CONF 5 "14 December 2009" "" "File Formats"
+.TH YUM-FS-SNAPSHOT.CONF 5 "3 February 2010" "" "File Formats"
.SH NAME
.B yum-fs-snapshot.conf(5)
@@ -9,7 +9,7 @@
.B yum-fs-snapshot(1)
Yum plugin for snapshotting your filesystems before running a yum transaction.
By default, this plugin will snapshot all filesystems that it is capable of
-snapshotting.
+snapshotting. This includes block-level snapshots using LVM snapshots.
.SH FILES
.I /etc/yum/pluginconf.d/fs-snapshot.conf
.SH FILE FORMAT
@@ -20,9 +20,20 @@
.IP exclude
This is a space delimited list of the mount points you do not wish to have
snapshotted by this plugin.
+.SH OPTION - [lvm] section
+.IP enabled
+This is a boolean value used to control whether LVM snapshots will be
+created for filesystems built on LVM logical volumes.
+.SH OPTION - [lvm] section
+.IP lvcreate_size_args
+This is the space delimited lvcreate argument list that is used to
+specify the size of the snapshot LV. Valid lvcreate size options are -l
+or -L. If not specified then LVM snapshots will not be created.
.SH AUTHOR
.RS
Josef Bacik <josef at toxicpanda.com>
+.br
+Mike Snitzer <msnitzer at fedoraproject.org>
.RS
.SH SEE ALSO
.BR yum-fs-snapshot(1)
--- docs/yum-list-data.1
+++ docs/yum-list-data.1
@@ -66,52 +66,52 @@
.br
.br
.PP
-.IP "\fBlist-vendors\fP" "\fBinfo-vendors\fP"
+.IP "\fBlist-vendors\fP, \fBinfo-vendors\fP"
Is used to list the aggregate of the vendor attribute on the packages, examples
are "Fedora Project" and "Red Hat, Inc.".
.IP
-.IP "\fBlist-rpm-groups\fP" "\fBinfo-rpm-groups\fP"
+.IP "\fBlist-rpm-groups\fP, \fBinfo-rpm-groups\fP"
Is used to list the aggregate of the group attribute on the packages, examples
are "Applications/System", "Development/Tools" and "System Environment/Base"
.IP
-.IP "\fBlist-packagers\fP" "\fBinfo-packagers\fP"
+.IP "\fBlist-packagers\fP, \fBinfo-packagers\fP"
Is used to list the aggregate of the packager attribute on the packages,
examples are "Fedora Project" and "Red Hat, Inc.".
.IP
-.IP "\fBlist-licenses\fP" "\fBinfo-licenses\fP"
+.IP "\fBlist-licenses\fP, \fBinfo-licenses\fP"
Is used to list the aggregate of the license attribute on the packages,
examples are "GPL" and "MIT"
.IP
-.IP "\fBlist-arches\fP" "\fBinfo-arches\fP"
+.IP "\fBlist-arches\fP, \fBinfo-arches\fP"
Is used to list the aggregate of the arch attribute on the packages,
examples are "i386" and "x86_64"
.IP
-.IP "\fBlist-committers\fP" "\fBinfo-committers\fP"
+.IP "\fBlist-committers\fP, \fBinfo-committers\fP"
Is used to list the aggregate of the committer attribute on the packages, this
is taken from the most recent changelog entry of the package.
.IP
-.IP "\fBlist-buildhosts\fP" "\fBinfo-buildhosts\fP"
+.IP "\fBlist-buildhosts\fP, \fBinfo-buildhosts\fP"
Is used to list the aggregate of the buildhost attribute on the packages,
examples are "mybuilder.example.com" and "xenbuilder1.fedora.redhat.com"
.IP
-.IP "\fBlist-baseurls\fP" "\fBinfo-baseurls\fP"
+.IP "\fBlist-baseurls\fP, \fBinfo-baseurls\fP"
Is used to list the aggregate of the url attribute on the packages after
discarding the path of the URL, examples are "http://yum.baseurl.org/" and
"http://www.and.org/"
.IP
-.IP "\fBlist-package-sizes\fP" "\fBinfo-package-sizes\fP"
+.IP "\fBlist-package-sizes\fP, \fBinfo-package-sizes\fP"
Is used to list the aggregate of specified ranges the packagesize attribute on
the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
.IP
-.IP "\fBlist-archive-sizes\fP" "\fBinfo-archive-sizes\fP"
+.IP "\fBlist-archive-sizes\fP, \fBinfo-archive-sizes\fP"
Is used to list the aggregate of specified ranges the archivesize attribute on
the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
.IP
-.IP "\fBlist-installed-sizes\fP" "\fBinfo-installed-sizes\fP"
+.IP "\fBlist-installed-sizes\fP, \fBinfo-installed-sizes\fP"
Is used to list the aggregate of specified ranges the installedsize attribute on
the packages, examples are "[ 1B - 10KB ]" and "[ 750KB - 1MB ]".
.IP
-.IP "\fBlist-groups\fP" "\fBinfo-groups\fP"
+.IP "\fBlist-groups\fP, \fBinfo-groups\fP"
Is used to list the aggregate of the yum groups that the packages are in,
examples are in "yum grouplist". Note that in yum groups a package can be in
more than one group at a time.
--- docs/yum-security.8
+++ docs/yum-security.8
@@ -20,7 +20,7 @@
.br
.I \fR * list-updateinfo
.PP
-both of the last two take these \fIsub-commands\fPs:
+both of the last two take these \fIsub-command\fPs:
.br
.I \fR * * <advisory> [advisory...]
.br
@@ -37,7 +37,7 @@
.IP "\fB<advisory> [advisory...]\fP"
Is used to display information about one or more advisories.
.PP
-.IP "\fBlist-updateinfo\fP" "\fBinfo-updateinfo\fP" "\fBsummary-updateinfo\fP"
+.IP "\fBlist-updateinfo\fP, \fBinfo-updateinfo\fP, \fBsummary-updateinfo\fP"
Is used to list all of the relevant errata notice information, from the
updateinfo.xml data in yum. This includes bugzillas, CVEs, security updates and
new.
--- docs/yumdb.8
+++ docs/yumdb.8
+.\" yumdb command
+.TH "yumdb" "8" "8 April 2010" "James Antill" ""
+.SH "NAME"
+yumdb command
+.SH "SYNOPSIS"
+\fByumdb\fP [command] [packages ...]
+.SH "DESCRIPTION"
+.PP
+This command is used to query and alter the yum database, which is a simple
+key value store used in conjunction with the rpm database. Any installed package
+can have arbitrary data in the yum database, however the main use case is to
+store extra data about packages as they are installed.
+.PP
+yumdb \fIcommand\fPs are:
+.br
+.IP "\fByumdb get <key> [pkg-wildcard]...\fP"
+.PP
+This command will get the value for the given key, limiting to any specified
+packages.
+.br
+.IP "\fByumdb set <key> <value> [pkg-wildcard]..."
+.PP
+This command will set the value for the given key, to the given value, limiting
+to any specified packages.
+.br
+.IP "\fByumdb del <key> [pkg-wildcard]...
+.PP
+This command will delete the given key, limiting to any specified packages.
+.br
+.IP "\fByumdb rename <old-key> <new-key> [pkg-wildcard]...
+.PP
+This command will rename the given old-key, to the given new-key, limiting to
+any specified packages. If the old-key does not exist, nothing happens.
+.br
+.IP "\fByumdb rename-force <old-key> <new-key> [pkg-wildcard]...
+.PP
+This command will rename the given old-key, to the given new-key, limiting to
+any specified packages. If the old-key does not exist, new-key is deleted.
+.br
+.IP "\fByumdb copy <old-key> <new-key> [pkg-wildcard]...
+.PP
+This command will copy the given old-key, to the given new-key, limiting to
+any specified packages. If the old-key does not exist, nothing happens.
+.br
+.IP "\fByumdb search <key> <wildcard>...
+.PP
+This command will search all packages for the given key, against any of the
+given wildcard values.
+.br
+.IP "\fByumdb exist <key> [pkg-wildcard]...
+.PP
+This command will print any packages which have the given key, limiting to any
+specified packages.
+.br
+.IP "\fByumdb unset <key> [pkg-wildcard]...
+.PP
+This command will print any packages which do not have the given key, limiting
+to any specified packages.
+.br
+.IP "\fByumdb info [pkg-wildcard]...
+.PP
+This command will all the data stored in the yumdb, limiting to any specified
+packages.
+
+.SH "EXAMPLES"
+.PP
+List all the packages which don't have a from_repo key/value:
+.IP
+yumdb unset from_repo
+.PP
+List all the packages which were installed as dependencies:
+.IP
+yumdb search reason dep
+
+.SH "WELL KNOWN KEYS"
+.PP
+Note that there is no limit to the number of keys that can be created or what
+they may contain (for installed packages only). However this is a list of well
+known keys, and what they store.
+.nf
+.br
+.IP "\fBchecksum_data
+.IP "\fBchecksum_type
+.PP
+These keys store the createrepo checksum, and it's type, of the available
+package yum installed. Note that these are used by "yum version" to calculate
+the rpmdb version.
+.br
+.IP "\fBcommand_line
+.PP
+This key stores the entire command line, of the yum command (if it was called).
+.br
+.IP "\fBfrom_repo
+.IP "\fBfrom_repo_revision
+.IP "\fBfrom_repo_timestamp
+.PP
+These keys take values from the available package yum installed, and store the
+repo id, it's revision and timestamp.
+.br
+.IP "\fBreason
+.PP
+This key stores either "user" or "dep", currently. To mark if the user requested
+the package to be installed, or if it was brought in automatically as a
+dependency. Note that this is kept over updates.
+.br
+.IP "\fBreleasever
+.PP
+This key stores the value of releasever, when the package was installed.
+.br
+.IP "\fBinstallonly
+.PP
+If this attribute has the value "keep" then this package will not be
+removed automatically by the installonly process (and does not count towards
+the installonly_limit).
+
+.SH "SEE ALSO"
+.nf
+.I yum (8)
+.I rpm (8)
+.fi
+
+.SH "AUTHORS"
+.nf
+James Antill <james.antill at redhat.com>.
+.fi
+
--- needs-restarting.py
+++ needs-restarting.py
@@ -95,8 +95,9 @@
def main(args):
(opts, args) = parseargs(args)
-
+
my = yum.YumBase()
+ my.preconf.init_plugins=False
if hasattr(my, 'setCacheDir'):
my.setCacheDir()
my.conf.cache = True
--- package-cleanup.py
+++ package-cleanup.py
@@ -31,6 +31,7 @@
import re
import yum.depsolve # For flags
+from yum.Errors import YumBaseError
from rpmUtils import miscutils, arch
from optparse import OptionGroup
@@ -129,7 +130,7 @@
for (req,flags,ver) in po.requires:
if req.startswith('rpmlib'): continue # ignore rpmlib deps
- if not providers.has_key((req,flags,ver)):
+ if (req,flags,ver) not in providers:
resolve_sack = self.rpmdb.whatProvides(req,flags,ver)
else:
resolve_sack = providers[(req,flags,ver)]
@@ -270,7 +271,12 @@
runningkernel = os.uname()[2]
# Vanilla kernels dont have a release, only a version
if '-' in runningkernel:
- (kver,krel) = runningkernel.split('-')
+ splt = runningkernel.split('-')
+ if len(splt) == 2:
+ (kver,krel) = splt
+ else: # Handle cases where a custom build kernel has an extra '-' in the release
+ kver=splt[1]
+ krel="-".join(splt[1:])
if krel.split('.')[-1] == os.uname()[-1]:
krel = ".".join(krel.split('.')[:-1])
else:
@@ -301,7 +307,7 @@
opts = self.doUtilConfigSetup()
if not exactlyOne([opts.problems, opts.dupes, opts.leaves, opts.kernels,
opts.orphans, opts.cleandupes]):
- self.optparser.print_help()
+ print self.optparser.format_help()
sys.exit(1)
if self.conf.uid != 0:
@@ -335,6 +341,7 @@
sys.exit(100)
self._remove_old_kernels(opts.kernelcount, opts.keepdevel)
+ self.run_with_package_names.add('yum-utils')
self.buildTransaction()
if len(self.tsInfo) < 1:
print 'No old kernels to remove'
@@ -358,9 +365,12 @@
if not self.setCacheDir():
self.logger.error("Error: Could not make cachedir, exiting")
sys.exit(50)
-
- for po in sorted(self.doPackageLists(pkgnarrow='extras').extras):
- print po.hdr.sprintf(opts.qf)
+ try:
+ for po in sorted(self.doPackageLists(pkgnarrow='extras').extras):
+ print po.hdr.sprintf(opts.qf)
+ except YumBaseError,e:
+ self.logger.error("Error: %s" % str(e))
+ sys.exit(1)
sys.exit(0)
@@ -371,6 +381,7 @@
if opts.noscripts:
self.conf.tsflags.append('noscripts')
self._remove_old_dupes()
+ self.run_with_package_names.add('yum-utils')
self.buildTransaction()
if len(self.tsInfo) < 1:
print 'No duplicates to remove'
--- plugins/auto-update-debuginfo/auto-update-debuginfo.py
+++ plugins/auto-update-debuginfo/auto-update-debuginfo.py
@@ -25,28 +25,24 @@
plugin_type = (TYPE_CORE,)
def enable_debuginfo_repos(yb, conduit):
- # We need to make sure the normal repos. are setup, before we add some...
- yb.pkgSack
-
- repos = set()
+ repos = {}
for repo in yb.repos.listEnabled():
- repos.add(repo.id)
+ repos[repo.id] = repo
for repoid in repos:
di = '%s-debuginfo' % repoid
if di in repos:
continue
+ repo = repos[repoid]
for r in yb.repos.findRepos(di):
conduit.info(2, 'Enabling %s: %s' % (r.id, r.name))
r.enable()
- yb.doRepoSetup(thisrepo=r.id)
-
-_done_plugin = False
-def postreposetup_hook(conduit):
- global _done_plugin
- if _done_plugin:
- return
- _done_plugin = True
+ # Note: This is shared with debuginfo-install
+ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost',
+ 'skip_if_unavailable']:
+ if hasattr(r, opt):
+ setattr(r, opt, getattr(repo, opt))
+def prereposetup_hook(conduit):
yb = conduit._base
num = len(yb.rpmdb.returnPackages(patterns=['*-debuginfo']))
if num:
--- plugins/changelog/changelog.py
+++ plugins/changelog/changelog.py
@@ -58,7 +58,7 @@
def _show_changes_changelog(conduit, srpms):
for name in sorted(srpms.keys()):
rpms = []
- if origpkgs.has_key(name):
+ if name in origpkgs:
for rpm in srpms[name]:
rpms.append("%s" % rpm)
done = False
@@ -85,7 +85,7 @@
if not tsmem.updates:
continue
name = srpmname(tsmem.po)
- if srpms.has_key(name):
+ if name in srpms:
srpms[name].append(tsmem.po)
else:
srpms[name] = [tsmem.po]
--- plugins/fastestmirror/ChangeLog
+++ plugins/fastestmirror/ChangeLog
@@ -1,3 +1,6 @@
+* Sat Apr 24 2010 Luke Macken <lmacken at redhat.com> - 0.3.3
+- Patch from Kris Ven to add a 'include_only' option
+
* Dec 17 2007 Luke Macken <lmacken at redhat.com> - 0.3.2
- Only display our mirrors if we have any
- Strip any username:passwords from our mirrors hostname before we display it
--- plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py
+++ plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py
@@ -41,7 +41,6 @@
import sys
import time
import socket
-import string
import urlparse
import datetime
import asyncore
@@ -135,7 +134,7 @@
repomirrors = {}
repos = conduit.getRepos()
for repo in repos.listEnabled():
- if not repomirrors.has_key(str(repo)):
+ if str(repo) not in repomirrors:
repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist()
if exclude:
for mirror in repomirrors[str(repo)]:
--- plugins/fastestmirror/fastestmirror.conf
+++ plugins/fastestmirror/fastestmirror.conf
@@ -3,7 +3,10 @@
verbose=0
always_print_best_host = true
socket_timeout=3
-hostfilepath=/var/cache/yum/timedhosts.txt
+# Relative paths are relative to the cachedir (and so works for users as well
+# as root).
+hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
+#include_only=.nl,.de,.uk,.ie
--- plugins/fastestmirror/fastestmirror.py
+++ plugins/fastestmirror/fastestmirror.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Version: 0.3.2
+# Version: 0.3.3
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
# mirrorlist by connection speed prior to download.
@@ -14,10 +14,11 @@
# enabled=1
# verbose=1
# socket_timeout=3
-# hostfilepath=/var/cache/yum/timedhosts
+# hostfilepath=timedhosts
# maxhostfileage=10
# maxthreads=15
# #exclude=.gov, facebook
+# #include_only=.nl,.de,.uk,.ie
# #prefer=your.favourite.mirror
#
# This program is free software; you can redistribute it and/or modify
@@ -46,6 +47,7 @@
import urlparse
import datetime
import threading
+import re
from yum.plugins import TYPE_CORE
@@ -61,6 +63,7 @@
loadcache = False
maxthreads = 15
exclude = None
+include_only = None
prefer = None
downgrade_ftp = True
done_sock_timeout = False
@@ -90,7 +93,7 @@
"""
global verbose, socket_timeout, hostfilepath, maxhostfileage, loadcache
- global maxthreads, exclude, prefer, downgrade_ftp
+ global maxthreads, exclude, include_only, prefer, downgrade_ftp, always_print_best_host
if hasattr(conduit, 'registerPackageName'):
conduit.registerPackageName("yum-plugin-fastestmirror")
verbose = conduit.confBool('main', 'verbose', default=False)
@@ -98,22 +101,22 @@
default=True)
socket_timeout = conduit.confInt('main', 'socket_timeout', default=3)
hostfilepath = conduit.confString('main', 'hostfilepath',
- default='/var/cache/yum/timedhosts')
+ default='timedhosts')
maxhostfileage = conduit.confInt('main', 'maxhostfileage', default=10)
maxthreads = conduit.confInt('main', 'maxthreads', default=10)
exclude = conduit.confString('main', 'exclude', default=None)
+ include_only = conduit.confString('main', 'include_only', default=None)
prefer = conduit.confString('main', 'prefer', default='no.prefer.mirror')
downgrade_ftp = conduit.confBool('main', 'downgrade_ftp', default=True)
- # If the file hostfilepath exists and is newer than the maxhostfileage,
- # then load the cache.
- if os.path.exists(hostfilepath) and get_hostfile_age() < maxhostfileage:
- loadcache = True
def clean_hook(conduit):
"""
This function cleans the plugin cache file if exists. The function is called
when C{yum [options] clean [plugins | all ]} is executed.
"""
+ global hostfilepath
+ if hostfilepath and hostfilepath[0] != '/':
+ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath
if os.path.exists(hostfilepath):
conduit.info(2, "Cleaning up list of fastest mirrors")
os.unlink(hostfilepath)
@@ -159,7 +162,14 @@
@param loadcache : Fastest Mirrors to be loaded from plugin's cache file or not.
@type loadcache : Boolean
"""
- global loadcache, exclude, prefer
+ global loadcache, exclude, include_only, prefer, hostfilepath
+
+ if hostfilepath and hostfilepath[0] != '/':
+ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath
+ # If the file hostfilepath exists and is newer than the maxhostfileage,
+ # then load the cache.
+ if os.path.exists(hostfilepath) and get_hostfile_age() < maxhostfileage:
+ loadcache = True
opts, commands = conduit.getCmdLine()
if conduit._base.conf.cache or not _can_write_results(hostfilepath):
@@ -199,14 +209,23 @@
continue
if str(repo) not in repomirrors:
repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist()
- if exclude:
- def excludeCheck(mirror):
- if filter(lambda exp: exp in host(mirror),
- exclude.replace(',', ' ').split()):
- conduit.info(2, "Excluding mirror: %s" % host(mirror))
- return False
- return True
- repomirrors[str(repo)] = filter(excludeCheck,repomirrors[str(repo)])
+ if include_only:
+ def includeCheck(mirror):
+ if filter(lambda exp: re.search(exp, host(mirror)),
+ include_only.replace(',', ' ').split()):
+ conduit.info(2, "Including mirror: %s" % host(mirror))
+ return True
+ return False
+ repomirrors[str(repo)] = filter(includeCheck,repomirrors[str(repo)])
+ else:
+ if exclude:
+ def excludeCheck(mirror):
+ if filter(lambda exp: re.search(exp, host(mirror)),
+ exclude.replace(',', ' ').split()):
+ conduit.info(2, "Excluding mirror: %s" % host(mirror))
+ return False
+ return True
+ repomirrors[str(repo)] = filter(excludeCheck,repomirrors[str(repo)])
repo.urls = repomirrors[str(repo)]
if len(repo.urls):
lvl = 3
--- plugins/fedorakmod/fedorakmod.py
+++ plugins/fedorakmod/fedorakmod.py
@@ -140,7 +140,7 @@
continue
po.kmodName = name[0]
- if not pdict.has_key(kernel):
+ if kernel not in pdict:
pdict[kernel] = [po]
else:
sameName = None
@@ -208,7 +208,7 @@
str(runningKernel))
table = resolveVersions(modules)
- if not table.has_key(runningKernel):
+ if runningKernel not in table:
c.info(2, "Trying to mimic %s which has no kernel modules installed" \
% str(runningKernel))
return
@@ -217,7 +217,7 @@
c.info(2, "kmods in %s: %s" % (str(runningKernel), str(names)))
for kpo in newKernels:
prov = getKernelProvides(kpo)[0]
- if table.has_key(prov):
+ if prov in table:
kmods = [ po.kmodName for po in table[prov] ]
else:
kmods = []
@@ -255,7 +255,8 @@
table = resolveVersions(interesting + modules)
for kernel in [ getKernelProvides(k)[0] for k in kernels ]:
- if not table.has_key(kernel): continue
+ if kernel not in table:
+ continue
for po in table[kernel]:
if po not in modules:
c.getTsInfo().addTrueInstall(po)
--- plugins/fs-snapshot/fs-snapshot.conf
+++ plugins/fs-snapshot/fs-snapshot.conf
@@ -1,2 +1,7 @@
[main]
enabled = 1
+
+[lvm]
+enabled = 0
+# 'lvcreate_size_args' option must specify the snapshot LV size using -L or -l
+#lvcreate_size_args = -l 15%ORIGIN
--- plugins/fs-snapshot/fs-snapshot.py
+++ plugins/fs-snapshot/fs-snapshot.py
@@ -12,8 +12,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Copyright 2009 Red Hat, Inc
+# Copyright 2009-2010 Red Hat, Inc
# written by Josef Bacik <josef at toxicpanda.com>
+# Mike Snitzer <msnitzer at fedoraproject.org>
"""
This plugin creates a snapshot before any yum update or yum remove operation on
@@ -35,83 +36,251 @@
requires_api_version = '2.4'
plugin_type = (TYPE_CORE,)
-def pretrans_hook(conduit):
+# Globals
+lvm_key = "create_lvm_snapshot"
+# avoid multiple snapshot-merge checks via inspect_volume_lvm()
+dm_snapshot_merge_checked = 0
+dm_snapshot_merge_support = 0
+
+def kernel_supports_dm_snapshot_merge():
+ # verify the kernel provides the 'snapshot-merge' DM target
+ # - modprobe dm-snapshot; dmsetup targets | grep -q snapshot-merge
+ global dm_snapshot_merge_checked, dm_snapshot_merge_support
+ if dm_snapshot_merge_checked:
+ return dm_snapshot_merge_support
+ os.system("modprobe dm-snapshot")
+ p = Popen(["/sbin/dmsetup", "targets"], stdout=PIPE, stderr=PIPE)
+ err = p.wait()
+ if not err:
+ output = p.communicate()[0]
+ if not output.find("snapshot-merge") == -1:
+ dm_snapshot_merge_support = 1
+ dm_snapshot_merge_checked = 1
+ return dm_snapshot_merge_support
+
+def inspect_volume_lvm(conduit, volume):
"""
- This runs before the transaction starts. Try to snapshot anything and
- everything that is snapshottable, since we do not know what an RPM will
- modify (thank you scriptlets).
+ If volume is an LVM logical volume:
+ - translate /dev/mapper name for LVM command use
+ - conditionally establish lvm_key in volume
"""
- if not os.path.exists("/etc/mtab"):
- conduit.info(1, "fs-snapshot: could not open /etc/mtab")
- return
+ lvm_support = conduit.confBool('lvm', 'enabled', default=0)
+ if not lvm_support:
+ return 1
+ device = volume["device"]
+ # Inspect DM and LVM devices
+ if device.startswith("/dev/dm-"):
+ conduit.info(2, "fs-snapshot: unable to snapshot DM device: " + device)
+ return 0
+ if device.startswith("/dev/mapper/"):
+ # convert /dev/mapper name to /dev/vg/lv for use with LVM2 tools
+ # - 'dmsetup splitname' will collapse any escaped characters
+ p = Popen(["/sbin/dmsetup", "splitname", "--separator", "/",
+ "--noheadings",
+ "-o", "vg_name,lv_name", device], stdout=PIPE, stderr=PIPE)
+ err = p.wait()
+ if err:
+ return 0
+ output = p.communicate()[0]
+ device = output.strip().replace("/dev/mapper/", "/dev/")
+ volume["device"] = device
+
+ # Check if device is managed by lvm
+ # - FIXME filter out snapshot (and other) LVs; for now just rely
+ # on 'lvcreate' to prevent snapshots of unsupported LV types
+ p = Popen(["/sbin/lvs", device], stdout=PIPE, stderr=PIPE)
+ err = p.wait()
+ if not err:
+ # FIXME allow creating snapshot LVs even if kernel doesn't
+ # support snapshot-merge based system rollback? make configurable?
+ if not kernel_supports_dm_snapshot_merge():
+ conduit.error(1, "fs-snapshot: skipping volume: %s, "
+ "kernel doesn't support snapshot-merge" % device)
+ return 0
+ volume[lvm_key] = 1
+ return 1
- excludeList = conduit.confString('main', 'exclude', default="").split()
+def inspect_volume(conduit, volume):
+ """
+ Hook to check/filter volume for special characteristics.
+ Returns 0 if volume failed inspection, otherwise 1.
+ All inspect_volume_* methods act as filters; if they
+ return 0 that means this volume failed inspection.
+ """
+ if not inspect_volume_lvm(conduit, volume):
+ return 0
+ # Additional inspect_volume_* methods may prove unnecessary but the
+ # filtering nature of these methods would make them unavoidable; e.g.
+ # just because a volume is LVM doesn't mean other filters should
+ # be short-circuited
+ return 1
+def get_volumes(conduit):
+ """
+ Return all volumes that may be snapshotted.
+ Each volume is a dictionary that contains descriptive key=value
+ pairs. All volumes will have 'device', 'mntpnt', and 'fstype'
+ keys. Extra keys may be established as a side-effect of
+ inspect_volume().
+ """
+ # FIXME may look to return dictionary of volume dictionaries to
+ # allow a volume to be looked up using its path (as the key).
+ # - when a kernel package is being installed: could prove useful to check
+ # if "/" is an LVM volume and "/boot" is not able to be snapshotted; if
+ # so warn user that "/boot" changes (e.g. grub's menu.lst) will need to
+ # be manually rolled back.
+ volumes = []
+
+ excluded_mntpnts = conduit.confString('main', 'exclude', default="").split()
try:
mtabfile = open('/etc/mtab', 'r')
for line in mtabfile.readlines():
- device, mntpnt, type, rest = line.split(' ', 3)
+ device, mntpnt, fstype, rest = line.split(' ', 3)
+ volume = { "device" : device,
+ "mntpnt" : mntpnt,
+ "fstype" : fstype }
+
+ if mntpnt in excluded_mntpnts:
+ continue
# skip bind mounts
if not rest.find("bind") == -1:
continue
- skip = False
- for pnt in excludeList:
- if pnt == mntpnt:
- skip = True
- break
+ # skip any mounts whose device doesn't have a leading /
+ # - avoids proc, sysfs, devpts, sunrpc, none, etc.
+ if not device.find("/") == 0:
+ continue
- if skip:
+ # skip volume if it doesn't pass inspection
+ # - inspect_volume may create additional keys in this volume
+ if not inspect_volume(conduit, volume):
continue
- rc = _create_snapshot(device, mntpnt, type, conduit)
- if rc == 1:
- conduit.info(1, "fs-snapshot: error snapshotting " + mntpnt)
+ volumes.append(volume)
+
mtabfile.close()
- except Exception as (errno, strerror):
- conduit.info(1, "fs-snapshot: error reading /etc/mtab")
-def _create_snapshot(device, mntpnt, type, conduit):
+ except Exception, e:
+ msg = "fs-snapshot: error processing mounted volumes: %s" % e
+ conduit.error(1, msg)
+
+ return volumes
+
+
+def _create_snapshot(conduit, snapshot_tag, volume):
"""
Determines if the device is capable of being snapshotted and then calls the
appropriate snapshotting function. The idea is you could add something for
- lvm snapshots, nilfs2 or whatever else here.
- """
+ nilfs2 or whatever else here.
- # at some point it would be nice to add filtering here, so users can specify
- # which filesystems they don't want snapshotted and we'd automatically match
- # them here and just return.
+ Returns 0 if no snapshot was created, 1 if an error occurred,
+ and 2 if a snapshot was created.
+ """
+ if volume["fstype"] == "btrfs":
+ return _create_btrfs_snapshot(conduit, snapshot_tag, volume)
+ elif lvm_key in volume:
+ return _create_lvm_snapshot(conduit, snapshot_tag, volume)
- if type == "btrfs":
- return _create_btrfs_snapshot(mntpnt, conduit)
-
return 0
-def _create_btrfs_snapshot(dir, conduit):
+def _create_btrfs_snapshot(conduit, snapshot_tag, volume):
"""
Runs the commands necessary for a snapshot. Basically its just
btrfsctl -c /dir/to/snapshot #this syncs the fs
- btrfsctl -s /dir/to/snapshot/yum-month-date-year-hour:minute
+ btrfsctl -s /dir/to/snapshot/${snapshot_tag}
/dir/to/snapshot
and then we're done.
"""
-
+ mntpnt = volume["mntpnt"]
#/etc/mtab doesn't have /'s at the end of the mount point, unless of course
#the mountpoint is /
- if not dir.endswith("/"):
- dir = dir + "/"
+ if not mntpnt.endswith("/"):
+ mntpnt = mntpnt + "/"
- snapname = dir + "yum-" + time.strftime("%m-%d-%y-%H:%M")
- conduit.info(1, "fs-snapshot: snapshotting " + dir + ": " + snapname)
- p = Popen(["btrfsctl", "-c", dir], stdout=PIPE, stderr=PIPE)
+ snapname = mntpnt + snapshot_tag
+ conduit.info(1, "fs-snapshot: snapshotting " + mntpnt + ": " + snapname)
+ p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE)
err = p.wait()
if err:
return 1
- p = Popen(["btrfsctl", "-s", snapname, dir], stdout=PIPE, stderr=PIPE)
+ p = Popen(["/sbin/btrfsctl", "-s", snapname, mntpnt], stdout=PIPE, stderr=PIPE)
err = p.wait()
if err:
return 1
- return 0
+ return 2
+
+def _create_lvm_snapshot(conduit, snapshot_tag, volume):
+ """
+ Create LVM snapshot LV and tag it with $snapshot_tag.
+ - This assumes that the volume is an origin LV whose VG
+ has enough free space to accommodate a snapshot LV.
+ - Also assumes user has configured 'lvcreate_size_args'.
+ """
+ lvcreate_size_args = conduit.confString('lvm', 'lvcreate_size_args',
+ default=None)
+ if not lvcreate_size_args:
+ conduit.error(1, "fs-snapshot: 'lvcreate_size_args' was not provided "
+ "in the '[lvm]' section of the config file")
+ return 1
+
+ if not lvcreate_size_args.startswith("-L") and not lvcreate_size_args.startswith("-l"):
+ conduit.error(1, "fs-snapshot: 'lvcreate_size_args' did not use -L or -l")
+ return 1
+
+ device = volume["device"]
+ if device.count('/') != 3:
+ return 1
+
+ mntpnt = volume["mntpnt"]
+ if mntpnt == "/":
+ # FIXME only print a variant of this warning if a kernel
+ # will be installed by the current yum transaction
+ conduit.info(1, "fs-snapshot: WARNING: creating LVM snapshot of root LV. If a kernel is\n"
+ " being installed /boot may need to be manually restored\n"
+ " in the event that a system rollback proves necessary.")
+
+ snap_device = device + "_" + snapshot_tag
+ snap_lvname = snap_device.split('/')[3]
+ conduit.info(1, "fs-snapshot: snapshotting %s (%s): %s" %
+ (mntpnt, device, snap_lvname))
+ # Create snapshot LV
+ lvcreate_cmd = ["/sbin/lvcreate", "-s", "-n", snap_lvname]
+ lvcreate_cmd.extend(lvcreate_size_args.split())
+ lvcreate_cmd.append(device)
+ p = Popen(lvcreate_cmd, stdout=PIPE, stderr=PIPE)
+ err = p.wait()
+ if err:
+ conduit.error(1, "fs-snapshot: failed command: %s\n%s" %
+ (" ".join(lvcreate_cmd), p.communicate()[1]))
+ return 1
+ # Add tag ($snapshot_tag) to snapshot LV
+ # - should help facilitate merge of all snapshot LVs created
+ # by a yum transaction, e.g.: lvconvert --merge @snapshot_tag
+ p = Popen(["/sbin/lvchange", "--addtag", snapshot_tag, snap_device],
+ stdout=PIPE, stderr=PIPE)
+ err = p.wait()
+ if err:
+ conduit.error(1, "fs-snapshot: couldn't add tag to snapshot: %s" %
+ snap_device)
+ return 2
+
+def pretrans_hook(conduit):
+ """
+ This runs before the transaction starts. Try to snapshot anything and
+ everything that is snapshottable, since we do not know what an RPM will
+ modify (thank you scriptlets).
+ """
+ # common snapshot tag format: yum_${year}${month}${day}${hour}${minute}${sec}
+ snapshot_tag = "yum_" + time.strftime("%Y%m%d%H%M%S")
+
+ volumes = get_volumes(conduit)
+ for volume in volumes:
+ rc = _create_snapshot(conduit, snapshot_tag, volume)
+ if rc == 1:
+ conduit.error(1, "fs-snapshot: error snapshotting " + volume["mntpnt"])
+ elif rc == 2 and hasattr(conduit, 'registerPackageName'):
+ # A snapshot was successfully created
+ conduit.registerPackageName("yum-plugin-fs-snapshot")
--- plugins/keys/keys.py
+++ plugins/keys/keys.py
@@ -226,7 +226,7 @@
Key email : %s
Repo : installed
Created : %s
-""" % (key.sum_type, rpmkeyid,
+""" % (rpmkeyid,
key.sum_auth_name, key.sum_auth_email, time.ctime(key.createts))
else:
gpg_cert = yum.pgpmsg.decode_msg(key.data)
--- plugins/local/local.py
+++ plugins/local/local.py
@@ -76,10 +76,10 @@
if not done:
return
- _rebuild(conduit)
+ _rebuild(conduit, done)
_reposetup(conduit)
-def _rebuild(conduit):
+def _rebuild(conduit, done=None):
cache_dir = conduit.confString('createrepo', 'cachedir', default=None)
checksum = conduit.confString('createrepo', 'checksum', default=None)
@@ -115,10 +115,11 @@
args.append(cache_dir)
args.append(local_repo_dir)
if not quiet:
-# FIXME: Something is rotten here, where does done come from
-# conduit.info(2, "== Rebuilding _local repo. with %u new packages ==" %
-# done)
- conduit.info(2, "== Rebuilding _local repo. ==")
+ if done is None:
+ conduit.info(2, "== Rebuilding _local repo. ==")
+ else:
+ msg = "== Rebuilding _local repo. with %u new packages ==" % done
+ conduit.info(2, msg)
os.spawnvp(os.P_WAIT, "createrepo", args)
# For the prerepo. check
os.utime("%s/repodata/repomd.xml" % local_repo_dir, None)
--- plugins/post-transaction-actions/post-transaction-actions.py
+++ plugins/post-transaction-actions/post-transaction-actions.py
@@ -62,7 +62,7 @@
def _get_installed_po(rpmdb, pkgtup):
(n,a,e,v,r) = pkgtup
- if _just_installed.has_key(pkgtup):
+ if pkgtup in _just_installed:
return _just_installed[pkgtup]
return rpmdb.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)[0]
--- plugins/priorities/priorities.py
+++ plugins/priorities/priorities.py
@@ -134,11 +134,11 @@
if only_samearch:
key = "%s.%s" % (po.name,po.arch)
- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority:
+ if key in pkg_priorities and pkg_priorities[key] < repo.priority:
delPackage = True
else:
key = "%s" % po.name
- if pkg_priorities_archless.has_key(key) and pkg_priorities_archless[key] < repo.priority:
+ if key in pkg_priorities_archless and pkg_priorities_archless[key] < repo.priority:
delPackage = True
if delPackage:
@@ -150,11 +150,11 @@
# one of the obsoleted packages is not available through
# a repo with a higher priority. If so, remove this package.
if check_obsoletes:
- if obsoletes.has_key(po.pkgtup):
+ if po.pkgtup in obsoletes:
obsolete_pkgs = obsoletes[po.pkgtup]
for obsolete_pkg in obsolete_pkgs:
pkg_name = obsolete_pkg[0]
- if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority:
+ if pkg_name in pkg_priorities_archless and pkg_priorities_archless[pkg_name] < repo.priority:
conduit.delPackage(po)
cnt += 1
conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid))
@@ -173,5 +173,5 @@
def _mergeprioritydicts(dict1, dict2):
for package in dict2.keys():
- if not dict1.has_key(package) or dict2[package] < dict1[package]:
+ if package not in dict1 or dict2[package] < dict1[package]:
dict1[package] = dict2[package]
--- plugins/protect-packages
+++ plugins/protect-packages
-(directory)
--- plugins/protect-packages/protect-packages.conf
+++ plugins/protect-packages/protect-packages.conf
-[main]
-enabled = 1
-confdir = /etc/sysconfig
--- plugins/protect-packages/protect-packages.py
+++ plugins/protect-packages/protect-packages.py
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-# Copyright 2007 Boston University
-# written by Svetlana Anissimova <svetanis at gmail.com> and
-# Matthew Miller <mattdm at mattdm.org>
-
-"""
-This plugin prevents Yum from removing itself and other protected packages.
-
-By default, yum is the only package protected, but by extension this
-automatically protects everything on which yum depends (rpm, python, glibc,
-and so on).Therefore, the plugin functions well even without
-compiling careful lists of all important packages.
-
-Additional packages to protect may be listed one per line in the file
-/etc/sysconfig/protected-packages and in *.list files placed in
-/etc/sysconfig/protected-packages.d/.
-
-If you wish to temporarily exclude certain packages from protection, you can
-use the --override-protection command-line option.
-"""
-
-
-from yum.plugins import TYPE_CORE, TYPE_INTERACTIVE, PluginYumExit
-import os
-import string
-import glob
-
-requires_api_version = '2.4'
-plugin_type = (TYPE_CORE, TYPE_INTERACTIVE)
-
-def config_hook(conduit):
- parser = conduit.getOptParser()
- if hasattr(parser, 'plugin_option_group'):
- parser = parser.plugin_option_group
- parser.add_option("", "--override-protection", dest='override',
- action="append", default=[], metavar='[package]',
- help="remove package from the list of protected packages")
-
-def postresolve_hook(conduit):
- protectedpkgs = ['yum']
- protectedlist = []
- opts, args = conduit.getCmdLine()
-
- confdir = conduit.confString('main','confdir','/etc/sysconfig')
-
- if os.access(confdir + "/protected-packages", os.R_OK) :
- protectedlist.append(confdir + "/protected-packages")
-
- if os.access(confdir + "/protected-packages.d", os.R_OK):
- protectedlist.extend(glob.glob(confdir + "/protected-packages.d/*.list"))
-
- if protectedlist:
- for f in protectedlist:
- for line in open(f).readlines():
- line = string.strip(line)
- if (line and line[0] != "#" and line not in opts.override
- and line not in protectedpkgs):
- protectedpkgs.append(line)
-
- for tsmem in conduit.getTsInfo().getMembers():
- if tsmem.name in protectedpkgs and tsmem.ts_state == 'e':
- raise PluginYumExit("This transaction would cause %s to be removed."
- " This package is vital for the basic operation of your system."
- " If you really want to remove it, edit the list of protected"
- " packages in the file %s or in the directory %s or use the"
- " --override-protection command-line option."
- %(tsmem.name, confdir + "/protected-packages",
- confdir + "/protected-packages.d"))
-
-
-
-
-
-
--- plugins/protectbase/protectbase.py
+++ plugins/protectbase/protectbase.py
@@ -55,7 +55,7 @@
continue
for po in conduit.getPackages(repo2):
- if repo1pkgs.has_key(po.name):
+ if po.name in repo1pkgs:
conduit.delPackage(po)
cnt += 1
--- plugins/remove-with-leaves/remove-with-leaves.py
+++ plugins/remove-with-leaves/remove-with-leaves.py
@@ -42,7 +42,7 @@
def _requires_this_package(rpmdb, pkg):
- if _requires_cache.has_key(pkg):
+ if pkg in _requires_cache:
return _requires_cache[pkg]
requirers = {}
--- plugins/tmprepo/tmprepo.py
+++ plugins/tmprepo/tmprepo.py
@@ -193,7 +193,6 @@
fname = add_mirrorlist_repo(base, trepo)
base.getReposFromConfigFile(fname, validate=validate)
- added = True
# Just do it all again...
base.setupProgressCallbacks()
--- plugins/upgrade-helper/upgrade-helper.py
+++ plugins/upgrade-helper/upgrade-helper.py
@@ -68,11 +68,11 @@
child_name = ns_cleanup(child.tag)
thisarch = myarch
if child_name == 'removespec':
- if child.attrib.has_key('on_arch'):
+ if 'on_arch' in child.attrib:
thisarch = child.attrib.get('on_arch')
- if child.attrib.has_key('pkgmatch'):
+ if 'pkgmatch' in child.attrib:
thismatch = child.attrib.get('pkgmatch')
- if results.has_key(thisarch):
+ if thisarch in results:
if thismatch not in results[thisarch]:
results[thisarch].append(thismatch)
else:
@@ -89,7 +89,7 @@
# return them as the toremove list
for repo in repos.listEnabled():
- if repo.repoXML.repoData.has_key('cleanup'):
+ if 'cleanup' in repo.repoXML.repoData:
trf = repo.retrieveMD('cleanup')
tr_dict = parse_xml(trf)
# prune out things like *, ?, *.*, *.*.*.*.*
--- plugins/verify/verify.py
+++ plugins/verify/verify.py
@@ -315,6 +315,8 @@
done_prob = True
def doCommand(self, base, basecmd, extcmds):
+ global _verify_configs
+
logger = logging.getLogger("yum.verbose.main")
def msg(x):
logger.log(logginglevels.INFO_2, x)
--- repo-graph.py
+++ repo-graph.py
@@ -69,7 +69,7 @@
for r in pkg.returnPrco('requires'):
reqname = r[0]
if reqname.startswith('rpmlib'): continue
- if prov.has_key(reqname):
+ if reqname in prov:
provider = prov[reqname]
cached += 1
else:
@@ -83,7 +83,7 @@
prov[reqname] = provider
if provider == pkg.name:
xx[provider] = None
- if xx.has_key(provider) or provider in skip:
+ if provider in xx or provider in skip:
continue
else:
xx[provider] = None
--- repo-rss.py
+++ repo-rss.py
@@ -45,7 +45,7 @@
for po in avail:
ftime = int(po.returnSimple('filetime'))
if ftime > recentlimit:
- if not ftimehash.has_key(ftime):
+ if ftime not in ftimehash:
ftimehash[ftime] = [po]
else:
ftimehash[ftime].append(po)
@@ -116,7 +116,6 @@
rfc822_format = "%a, %d %b %Y %X GMT"
clog_format = "%a, %d %b %Y GMT"
- xhtml_ns = "http://www.w3.org/1999/xhtml"
escape = self.xmlescape
item = self.rssnode.newChild(None, 'item', None)
--- repoclosure.py
+++ repoclosure.py
@@ -60,9 +60,11 @@
parser.add_option("-n", "--newest", default=0, action="store_true",
help="check only the newest packages in the repos")
parser.add_option("--repofrompath", action="append",
- help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo")
+ help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo")
parser.add_option("-p", "--pkg", action="append",
help="check closure for this package only")
+ parser.add_option("-g", "--group", action="append",
+ help="check closure for packages in this group only")
(opts, args) = parser.parse_args()
return (opts, args)
@@ -70,13 +72,14 @@
# so we have to do at least some API guarantee stuff.
class RepoClosure(yum.YumBase):
def __init__(self, arch=[], config="/etc/yum.conf", builddeps=False, pkgonly=None,
- basearch=None):
+ basearch=None, grouponly=None):
yum.YumBase.__init__(self)
if basearch:
self.preconf.arch = basearch
self.logger = logging.getLogger("yum.verbose.repoclosure")
self.builddeps = builddeps
self.pkgonly = pkgonly
+ self.grouponly = grouponly
self.doConfigSetup(fn = config,init_plugins=False)
self._rc_arches = arch
@@ -145,15 +148,25 @@
if self.builddeps:
pkgs = filter(lambda x: x.arch == 'src', pkgs)
- if self.pkgonly:
- pkgs = filter(lambda x: x.name == self.pkgonly[0], pkgs)
+ pkglist = self.pkgonly
+ if self.grouponly:
+ if not pkglist:
+ pkglist = []
+ for group in self.grouponly:
+ groupobj = self.comps.return_group(group)
+ if not groupobj:
+ continue
+ pkglist.extend(groupobj.packages)
+
+ if pkglist:
+ pkgs = filter(lambda x: x.name in pkglist, pkgs)
for pkg in pkgs:
for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'):
if req.startswith('rpmlib'): continue # ignore rpmlib deps
ver = self.evrTupletoVer((reqe, reqv, reqr))
- if resolved.has_key((req,flags,ver)):
+ if (req,flags,ver) in resolved:
continue
try:
resolve_sack = self.whatProvides(req, flags, ver)
@@ -161,7 +174,7 @@
pass
if len(resolve_sack) < 1:
- if not unresolved.has_key(pkg):
+ if pkg not in unresolved:
unresolved[pkg] = []
unresolved[pkg].append((req, flags, ver))
continue
@@ -176,7 +189,7 @@
if resolved_by_newest:
resolved[(req,flags,ver)] = 1
else:
- if not unresolved.has_key(pkg):
+ if pkg not in unresolved:
unresolved[pkg] = []
unresolved[pkg].append((req, flags, ver))
@@ -189,18 +202,19 @@
config=opts.config,
builddeps=opts.builddeps,
pkgonly=opts.pkg,
+ grouponly=opts.group,
basearch=opts.basearch)
if opts.repofrompath:
# setup the fake repos
for repo in opts.repofrompath:
repoid,repopath = tuple(repo.split(','))
+ repopath = os.path.abspath(repopath)
if repopath[0] == '/':
baseurl = 'file://' + repopath
else:
baseurl = repopath
- repopath = os.path.normpath(repopath)
newrepo = yum.yumRepo.YumRepository(repoid)
newrepo.name = repopath
newrepo.baseurl = baseurl
@@ -273,5 +287,10 @@
my.logger.info(' %s' % req)
if __name__ == "__main__":
- main()
+ try:
+ main()
+ except (yum.Errors.YumBaseError, ValueError), e:
+ print >> sys.stderr, str(e)
+ sys.exit(1)
+
--- repodiff.py
+++ repodiff.py
@@ -59,42 +59,59 @@
remove = []
modified = []
obsoleted = {} # obsoleted = by
- newsack = yum.packageSack.ListPackageSack()
- for repoid in self.dy_repos['new']:
- newsack.addList(self.pkgSack.returnPackages(repoid=repoid))
-
- oldsack = yum.packageSack.ListPackageSack()
- for repoid in self.dy_repos['old']:
- oldsack.addList(self.pkgSack.returnPackages(repoid=repoid))
-
- for pkg in newsack.returnNewestByName():
- tot = self.pkgSack.searchNevra(name=pkg.name)
- if len(tot) == 1: # it's only in new
- add.append(pkg)
- if len(tot) > 1:
- if oldsack.contains(name=pkg.name):
- newest_old = oldsack.returnNewestByName(name=pkg.name)[0]
- if newest_old.EVR != pkg.EVR:
- modified.append((pkg, newest_old))
- else:
- add.append(pkg)
-
- for pkg in oldsack.returnNewestByName():
- if len(newsack.searchNevra(name=pkg.name)) == 0:
- remove.append(pkg)
+ # Originally we did this by setting up old and new repos. ... but as
+ # a faster way, we can just go through all the pkgs once getting the
+ # newest pkg with a repoid prefix of "old", dito. "new", and then
+ # compare those directly.
+ def _next_old_new(pkgs):
+ """ Returns latest pair of (oldpkg, newpkg) for each package
+ name. If that name doesn't exist, then it returns None for
+ that package. """
+ lastname = None
+ npkg = opkg = None
+ for pkg in sorted(pkgs):
+ if lastname is None:
+ lastname = pkg.name
+ if lastname != pkg.name:
+ yield opkg, npkg
+ opkg = npkg = None
+ lastname = pkg.name
+ if pkg.repo.id.startswith('old'):
+ opkg = pkg
+ else:
+ assert pkg.repo.id.startswith('new')
+ npkg = pkg
+ if opkg is not None or npkg is not None:
+ yield opkg, npkg
+
+ for opkg, npkg in _next_old_new(self.pkgSack.returnPackages()):
+ if opkg is None:
+ add.append(npkg)
+ elif npkg is None:
+ remove.append(opkg)
+ elif not npkg.verEQ(opkg):
+ modified.append((npkg, opkg))
+
+ ao = []
+ for pkg in add:
+ if not pkg.obsoletes:
+ continue
+ ao.append(pkg)
+
+ # Note that this _only_ shows something when you have an additional
+ # package obsoleting a removed package. If the obsoleted package is
+ # still there (somewhat "common") or the obsoleter is an update (dito)
+ # you _don't_ get hits here.
for po in remove:
- for newpo in add:
- foundit = 0
- for obs in newpo.obsoletes:
- if po.inPrcoRange('provides', obs):
- foundit = 1
- obsoleted[po] = newpo
- break
- if foundit:
+ # Remember: Obsoletes are for package names only.
+ poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release))
+ for newpo in ao:
+ if newpo.inPrcoRange('obsoletes', poprovtup):
+ obsoleted[po] = newpo
break
-
+
ygh = yum.misc.GenericHolder()
ygh.add = add
ygh.remove = remove
@@ -178,13 +195,13 @@
if ygh.add:
for pkg in sorted(ygh.add):
print 'New package %s' % pkg.name
- print ' %s' % pkg.summary
+ print ' %s' % to_unicode(pkg.summary)
add_sizechange += int(pkg.size)
if ygh.remove:
for pkg in sorted(ygh.remove):
print 'Removed package %s' % pkg.name
- if ygh.obsoleted.has_key(pkg):
+ if pkg in ygh.obsoleted:
print 'Obsoleted by %s' % ygh.obsoleted[pkg]
remove_sizechange += (int(pkg.size))
@@ -198,15 +215,22 @@
# for any newer clog in pkg
# print it
oldlogs = oldpkg.changelog
- oldlogs.sort()
- oldlogs.reverse()
if len(oldlogs):
- oldtime = oldlogs[0][0]
- clogdelta = []
+ # Don't sort as that can screw the order up when time is the
+ # same.
+ oldtime = oldlogs[0][0]
+ oldauth = oldlogs[0][1]
+ oldcontent = oldlogs[0][2]
for (t, author, content) in pkg.changelog:
- if t > oldtime:
- msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"),
- to_unicode(author), to_unicode(content))
+ if t < oldtime:
+ break
+ if ((t == oldtime) and (author == oldauth) and
+ (content == oldcontent)):
+ break
+ tm = datetime.date.fromtimestamp(int(t))
+ tm = tm.strftime("%a %b %d %Y")
+ msg += "* %s %s\n%s\n\n" % (tm, to_unicode(author),
+ to_unicode(content))
if opts.size:
sizechange = int(pkg.size) - int(oldpkg.size)
total_sizechange += sizechange
@@ -214,6 +238,10 @@
print msg
+ if (not ygh.add and not ygh.remove and not ygh.modified and
+ not my.pkgSack.searchNevra(arch='src')):
+ print "** No 'src' pkgs in any repo. maybe see docs. on --archlist?"
+
print 'Summary:'
print 'Added Packages: %s' % len(ygh.add)
print 'Removed Packages: %s' % len(ygh.remove)
--- repomanage.py
+++ repomanage.py
@@ -50,7 +50,7 @@
dir_list = os.listdir(path)
except OSError, e:
errorprint('Error accessing directory %s, %s' % (path, e.message))
- raise Error, 'Error accessing directory %s, %s' % (path, e.message)
+ return []
for d in dir_list:
if os.path.isdir(path + '/' + d):
@@ -107,17 +107,17 @@
if opts.new and opts.old:
errorprint('\nPass either --old or --new, not both!\n')
- parser.print_help()
+ print parser.format_help()
sys.exit(1)
if len(args) > 1:
errorprint('Error: Only one directory allowed per run.')
- parser.print_help()
+ print parser.format_help()
sys.exit(1)
if len(args) < 1:
errorprint('Error: Must specify a directory to index.')
- parser.print_help()
+ print parser.format_help()
sys.exit(1)
return (opts, args)
@@ -158,11 +158,11 @@
(n,a,e,v,r) = pkgtuple
del hdr
- if not pkgdict.has_key((n,a)):
+ if (n,a) not in pkgdict:
pkgdict[(n,a)] = []
pkgdict[(n,a)].append((e,v,r))
- if not verfile.has_key(pkgtuple):
+ if pkgtuple not in verfile:
verfile[pkgtuple] = []
verfile[pkgtuple].append(pkg)
--- repoquery.py
+++ repoquery.py
@@ -134,11 +134,15 @@
self.qf = qf
self.name = pkg.name
self.classname = None
+ self._translated_qf = {}
def __getitem__(self, item):
item = item.lower()
if hasattr(self, "fmt_%s" % item):
return getattr(self, "fmt_%s" % item)()
+ if hasattr(self.pkg, item):
+ return getattr(self.pkg, item)
+
res = None
convert = None
@@ -146,7 +150,7 @@
if len(tmp) > 1:
item = tmp[0]
conv = tmp[1]
- if convertmap.has_key(conv):
+ if conv in convertmap:
convert = convertmap[conv]
else:
raise queryError("Invalid conversion: %s" % conv)
@@ -155,11 +159,12 @@
# populated before calling pkg.returnSimple() ?!
try:
res = self.pkg.returnSimple(item)
- except KeyError:
+ except (KeyError, ValueError):
if item == "license":
res = ", ".join(self.pkg.licenses)
else:
- raise queryError("Invalid querytag '%s' for %s" % (item, self.classname))
+ raise queryError("Invalid querytag '%s' for %s: %s" % (item, self.classname, self.pkg))
+
if convert:
res = convert(res)
return res
@@ -168,7 +173,7 @@
return self.fmt_queryformat()
def doQuery(self, method, *args, **kw):
- if std_qf.has_key(method):
+ if method in std_qf:
self.qf = std_qf[method]
return self.fmt_queryformat()
elif hasattr(self, "fmt_%s" % method):
@@ -194,15 +199,18 @@
def fmt_queryformat(self):
if not self.qf:
- qf = std_qf["nevra"]
- else:
+ return self.fmt_nevra()
+
+ # Override .qf for fun and profit...
+ if self.qf not in self._translated_qf:
qf = self.qf
- qf = qf.replace("\\n", "\n")
- qf = qf.replace("\\t", "\t")
- pattern = re.compile('%([-\d]*?){([:\w]*?)}')
- fmt = re.sub(pattern, r'%(\2)\1s', qf)
- return fmt % self
+ qf = qf.replace("\\n", "\n")
+ qf = qf.replace("\\t", "\t")
+ pattern = re.compile('%([-\d]*?){([:\.\w]*?)}')
+ fmt = re.sub(pattern, r'%(\2)\1s', qf)
+ self._translated_qf[self.qf] = fmt
+ return self._translated_qf[self.qf] % self
def fmt_requires(self, **kw):
return "\n".join(self.prco('requires'))
@@ -295,8 +303,14 @@
self.classname = 'installed pkg'
def __getitem__(self, item):
- if self.tagmap.has_key(item):
+ if item in self.tagmap:
return self.pkg.tagByName(self.tagmap[item])
+ elif item.startswith('yumdb_info.'):
+ yumdb_item = item.split('.')[1]
+ try:
+ return getattr(self.pkg.yumdb_info, yumdb_item)
+ except AttributeError,e:
+ raise queryError("Invalid yumdb querytag '%s' for %s: %s" % (yumdb_item, self.classname, self.pkg))
else:
return pkgQuery.__getitem__(self, item)
@@ -326,11 +340,9 @@
def fmt_changelog(self, **kw):
changelog = []
times = self.pkg.tagByName('changelogtime')
- names = self.pkg.tagByName('changelogname')
- texts = self.pkg.tagByName('changelogtext')
if times is not None:
- tmplst = zip(times, names, texts)
-
+ names = self.pkg.tagByName('changelogname')
+ texts = self.pkg.tagByName('changelogtext')
for date, author, message in zip(times, names, texts):
changelog.append("* %s %s\n%s\n" % (sec2day(date), author, message))
return "\n".join(changelog)
@@ -395,7 +407,7 @@
self.pkgops = pkgops
self.sackops = sackops
- def queryPkgFactory(self, pkgs):
+ def queryPkgFactory(self, pkgs, plain_pkgs=False):
"""
For each given package, create a query.
@@ -409,6 +421,12 @@
if isinstance(pkg, yum.packages.YumInstalledPackage):
if self.options.pkgnarrow not in ('all', 'installed', 'extras'):
continue
+
+ if plain_pkgs:
+ qpkgs.append(pkg)
+ continue
+
+ if isinstance(pkg, yum.packages.YumInstalledPackage):
qpkg = instPkgQuery(pkg, qf)
else:
qpkg = repoPkgQuery(pkg, qf)
@@ -432,6 +450,10 @@
def returnPkgList(self, **kwargs):
pkgs = []
+ if 'patterns' in kwargs:
+ if len(kwargs['patterns']) == 1 and kwargs['patterns'][0] == '*':
+ kwargs['patterns'] = None
+
if self.options.pkgnarrow == "repos":
# self.pkgSack is a yum.packageSack.MetaSack
if self.conf.showdupesfromrepos:
@@ -484,9 +506,9 @@
grps.append(grp)
return grps
- def matchPkgs(self, items):
+ def matchPkgs(self, items, plain_pkgs=False):
pkgs = self.returnPkgList(patterns=items)
- return self.queryPkgFactory(pkgs)
+ return self.queryPkgFactory(pkgs, plain_pkgs)
def matchSrcPkgs(self, items):
srpms = []
@@ -499,15 +521,47 @@
return srpms
def runQuery(self, items):
+ plain_pkgs = False
if self.options.group:
pkgs = self.matchGroups(items)
else:
if self.options.srpm:
pkgs = self.matchSrcPkgs(items)
- else:
- pkgs = self.matchPkgs(items)
+ else:
+ if not self.sackops:
+ plain_pkgs = True
+ pkgs = self.matchPkgs(items, plain_pkgs=plain_pkgs)
+ for prco in items:
+ for oper in self.sackops:
+ try:
+ for p in self.doQuery(oper, prco):
+ if p:
+ pkgs.append(p)
+ except queryError, e:
+ self.logger.error( e.msg)
+
+ if plain_pkgs:
+ iq = None
+ rq = None
+ qf = self.options.queryformat or std_qf["nevra"]
+ pkgs = sorted(pkgs)
for pkg in pkgs:
+ if plain_pkgs:
+ if isinstance(pkg, yum.packages.YumInstalledPackage):
+ if iq is None:
+ iq = instPkgQuery(pkg, qf)
+ iq.pkg = pkg
+ iq.name = pkg.name
+ pkg = iq
+ else:
+ if rq is None:
+ rq = instPkgQuery(pkg, qf)
+ rq.pkg = pkg
+ rq.name = pkg.name
+ pkg = rq
+ if not self.pkgops:
+ print to_unicode(pkg)
for oper in self.pkgops:
try:
out = pkg.doQuery(oper)
@@ -515,14 +569,6 @@
print to_unicode(out)
except queryError, e:
self.logger.error( e.msg)
- for prco in items:
- for oper in self.sackops:
- try:
- for p in self.doQuery(oper, prco):
- if p:
- print p
- except queryError, e:
- self.logger.error( e.msg)
def doQuery(self, method, *args, **kw):
return getattr(self, "fmt_%s" % method)(*args, **kw)
@@ -554,16 +600,13 @@
provs.extend(pkg.files())
for prov in provs:
- # Only look at the providing name, not the whole version. This
- # might occasionally give some false positives but that's
- # better than missing ones which it had previously
- for pkg in self.pkgSack.searchRequires(prov.split()[0]):
+ for pkg in self.pkgSack.searchRequires(prov):
pkgs[pkg.pkgtup] = pkg
if self.options.recursive:
require_recursive(pkg.name)
require_recursive(name)
- return self.queryPkgFactory(pkgs.values())
+ return self.queryPkgFactory(sorted(pkgs.values()))
def fmt_whatobsoletes(self, name, **kw):
pkgs = []
@@ -647,8 +690,10 @@
help="operate on corresponding source RPM")
parser.add_option("--resolve", action="store_true",
help="resolve capabilities to originating package(s)")
- parser.add_option("--alldeps", action="store_true",
- help="check non-explicit dependencies (files and Provides:) as well")
+ parser.add_option("--alldeps", action="store_true", default=True,
+ help="check non-explicit dependencies (files and Provides:) as well, defaults to on")
+ parser.add_option("--exactdeps", dest="alldeps", action="store_false",
+ help="check dependencies exactly as given, opposite of --alldeps")
parser.add_option("--recursive", action="store_true",
help="recursively query for packages (for whatrequires)")
parser.add_option("--whatprovides", action="store_true",
@@ -671,6 +716,8 @@
help="set value of $releasever in yum config and repo files")
parser.add_option("--pkgnarrow", default="repos",
help="limit query to installed / available / recent / updates / extras / available + installed / repository (default) packages")
+ parser.add_option("--installed", action="store_true", default=False,
+ help="limit query to installed pkgs only")
parser.add_option("--show-duplicates", action="store_true",
dest="show_dupes",
help="show all versions of packages")
@@ -687,16 +734,17 @@
parser.add_option("--plugins", action="store_true", default=False,
help="enable yum plugin support")
parser.add_option("--quiet", action="store_true",
- help="quiet (no output to stderr)", default=True)
+ help="quiet output, only error output to stderr (default enabled)", default=True)
parser.add_option("--verbose", action="store_false",
- help="verbose output", dest="quiet")
+ help="verbose output (opposite of quiet)", dest="quiet")
parser.add_option("-C", "--cache", action="store_true",
help="run from cache only")
parser.add_option("--tempcache", action="store_true",
help="use private cache (default when used as non-root)")
parser.add_option("--querytags", action="store_true",
help="list available tags in queryformat queries")
- parser.add_option("-c", dest="conffile", help="config file location")
+ parser.add_option("-c", "--config", dest="conffile",
+ help="config file location")
(opts, regexs) = parser.parse_args()
@@ -710,7 +758,7 @@
if opts.all:
regexs = ['*']
else:
- parser.print_help()
+ print parser.format_help()
sys.exit(1)
pkgops = []
@@ -736,7 +784,7 @@
if not opts.group:
needfiles = 1
pkgops.append("list")
- if opts.alldeps:
+ if opts.alldeps and not (opts.installed or opts.pkgnarrow == 'installed'):
needfiles = 1
if opts.envra:
pkgops.append("envra")
@@ -763,15 +811,20 @@
needgroup = 1
if opts.group:
needgroup = 1
-
- if opts.nevra or (len(pkgops) == 0 and len(sackops) == 0):
+ if opts.installed:
+ opts.pkgnarrow = 'installed'
+ opts.disablerepos = ['*']
+
+ if opts.nevra:
+ pkgops.append("nevra")
+ elif len(pkgops) == 0 and len(sackops) == 0:
pkgops.append("queryformat")
repoq = YumBaseQuery(pkgops, sackops, opts)
# silence initialisation junk from modules etc unless verbose mode
initnoise = (not opts.quiet) * 2
- repoq.releasever = opts.releasever
+ repoq.preconf.releasever = opts.releasever
if opts.conffile:
repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise, init_plugins=opts.plugins)
else:
@@ -780,7 +833,11 @@
if opts.repofrompath:
# setup the fake repos
for repo in opts.repofrompath:
- repoid,repopath = tuple(repo.split(','))
+ tmp = tuple(repo.split(','))
+ if len(tmp) != 2:
+ repoq.logger.error("Error: Bad repofrompath argument: %s" %repo)
+ continue
+ repoid,repopath = tmp
if repopath[0] == '/':
baseurl = 'file://' + repopath
else:
@@ -794,11 +851,16 @@
# Show what is going on, if --quiet is not set.
if not opts.quiet and sys.stdout.isatty():
- repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
- repoq.repos.callback = output.CacheProgressCallback()
yumout = output.YumOutput()
freport = ( yumout.failureReport, (), {} )
- repoq.repos.setFailureCallback( freport )
+ if hasattr(repoq, 'prerepoconf'):
+ repoq.prerepoconf.progressbar = TextMeter(fo=sys.stdout)
+ repoq.prerepoconf.callback = output.CacheProgressCallback()
+ repoq.prerepoconf.failure_callback = freport
+ else:
+ repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
+ repoq.repos.callback = output.CacheProgressCallback()
+ repoq.repos.setFailureCallback(freport)
if not repoq.setCacheDir(opts.tempcache):
repoq.logger.error("Error: Could not make cachedir, exiting")
@@ -814,11 +876,16 @@
repoq.conf.showdupesfromrepos = True
if opts.repoid:
+ found_repos = set()
for repo in repoq.repos.findRepos('*'):
if repo.id not in opts.repoid:
repo.disable()
else:
+ found_repos.add(repo.id)
repo.enable()
+ for not_found in set(opts.repoid).difference(found_repos):
+ repoq.logger.error('Repoid %s was not found.' % not_found)
+
if opts.disablerepos:
for repo_match in opts.disablerepos:
for repo in repoq.repos.findRepos(repo_match):
@@ -829,12 +896,6 @@
for repo in repoq.repos.findRepos(repo_match):
repo.enable()
- try:
- repoq.doRepoSetup()
- except yum.Errors.RepoError, e:
- repoq.logger.error("Could not setup repo: %s" % (e))
- sys.exit(50)
-
for exp in regexs:
if exp.endswith('.src'):
needsource = 1
@@ -847,8 +908,11 @@
archlist.append('src')
try:
- repoq.doSackSetup(archlist=archlist)
- repoq.doTsSetup()
+ if not hasattr(repoq, 'arch'):
+ repoq.doSackSetup(archlist=archlist)
+ elif archlist is not None:
+ repoq.arch.archlist = archlist
+
if needfiles:
repoq.repos.populateSack(mdtype='filelists')
if needother:
--- reposync.py
+++ reposync.py
@@ -110,7 +110,7 @@
parser.add_option("-p", "--download_path", dest='destdir',
default=os.getcwd(), help="Path to download packages to: defaults to current dir")
parser.add_option("--norepopath", dest='norepopath', default=False, action="store_true",
- help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)")
+ help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)")
parser.add_option("-g", "--gpgcheck", default=False, action="store_true",
help="Remove packages that fail GPG signature checking after downloading")
parser.add_option("-u", "--urls", default=False, action="store_true",
@@ -176,7 +176,7 @@
# enable the ones we like
for repo in myrepos:
repo.enable()
-
+
# --norepopath can only be sensibly used with a single repository:
if len(my.repos.listEnabled()) > 1 and opts.norepopath:
print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories"
@@ -222,7 +222,7 @@
download_set[rpmname] = 1
for pkg in current_pkgs:
- if download_set.has_key(pkg):
+ if pkg in download_set:
continue
if not opts.quiet:
@@ -238,29 +238,30 @@
my.logger.error("Could not make repo subdir: %s" % e)
my.closeRpmDB()
sys.exit(1)
- try: # download random other metadata
- if opts.downloadcomps:
- compsfile = repo.getGroups()
- shutil.copyfile(compsfile,"%s/%s" % (local_repo_path,'comps.xml'))
- except yum.Errors.RepoMDError,e :
- if not opts.quiet:
- my.logger.error("Unable to fetch metadata: %s" % e)
+ if opts.downloadcomps:
+ wanted_types = ['group']
+
if opts.downloadmd:
- for ftype in repo.repoXML.fileTypes():
- if ftype in ['primary', 'primary_db', 'filelists',
- 'filelists_db', 'other', 'other_db']:
- continue
- if opts.downloadcomps and ftype == 'group':
- continue
- try:
- resultfile = repo.retrieveMD(ftype)
- basename = os.path.basename(resultfile)
- shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename))
- except yum.Errors.RepoMDError,e :
- if not opts.quiet:
- my.logger.error("Unable to fetch metadata: %s" % e)
+ wanted_types = repo.repoXML.fileTypes.keys()
+ for ftype in repo.repoXML.fileTypes():
+ if ftype in ['primary', 'primary_db', 'filelists',
+ 'filelists_db', 'other', 'other_db']:
+ continue
+ if ftype not in wanted_types:
+ continue
+
+ try:
+ resultfile = repo.retrieveMD(ftype)
+ basename = os.path.basename(resultfile)
+ if ftype == 'group' and opts.downloadcomps: # for compat with how --downloadcomps saved the comps file always as comps.xml
+ basename = 'comps.xml'
+ shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename))
+ except yum.Errors.RepoMDError,e :
+ if not opts.quiet:
+ my.logger.error("Unable to fetch metadata: %s" % e)
+
remote_size = 0
local_size = 0
if not opts.urls:
--- repotrack.py
+++ repotrack.py
@@ -172,7 +172,6 @@
unprocessed_pkgs = {}
final_pkgs = {}
- user_po_list = []
pkg_list = []
avail = my.pkgSack.returnPackages()
@@ -214,9 +213,8 @@
del this_sack
for res in pkg_list:
- if res is not None:
- if not unprocessed_pkgs.has_key(res.pkgtup):
- unprocessed_pkgs[res.pkgtup] = res
+ if res is not None and res.pkgtup not in unprocessed_pkgs:
+ unprocessed_pkgs[res.pkgtup] = res
--- yum-builddep.py
+++ yum-builddep.py
@@ -37,7 +37,7 @@
# if pkg.version not in pkg.sourcerpm:
# print pkg, pkg.sourcerpm
def _best_convert_pkg2srcpkgs(self, opts, pkg):
- if not opts.source or pkg.arch == 'src':
+ if pkg.arch == 'src':
return [pkg]
(n,v,r,e,a) = rpmUtils.miscutils.splitFilename(pkg.sourcerpm)
@@ -152,23 +152,26 @@
else:
srcnames.append(arg)
+ toActOn = []
if srcnames:
self.setupSourceRepos()
- exact, match, unmatch = yum.packages.parsePackages(self.pkgSack.returnPackages(), srcnames, casematch=1)
+ pkgs = self.pkgSack.returnPackages(patterns=srcnames)
+ exact, match, unmatch = yum.packages.parsePackages(pkgs, srcnames, casematch=1)
srpms += exact + match
if len(unmatch):
- exact, match, unmatch = yum.packages.parsePackages(self.rpmdb.returnPackages(), unmatch, casematch=1)
+ pkgs = self.rpmdb.returnPackages(patterns=unmatch)
+ exact, match, unmatch = yum.packages.parsePackages(pkgs, unmatch, casematch=1)
if len(unmatch):
self.logger.error("No such package(s): %s" %
", ".join(unmatch))
sys.exit(1)
- toActOn = []
- for newpkg in srpms:
- toActOn.extend(_best_convert_pkg2srcpkgs(self, opts, newpkg))
- # Get the best matching srpm
- toActOn = self.bestPackagesFromList(toActOn, 'src')
+ toActOn = []
+ for newpkg in srpms:
+ toActOn.extend(_best_convert_pkg2srcpkgs(self, opts, newpkg))
+ # Get the best matching srpm
+ toActOn = self.bestPackagesFromList(toActOn, 'src')
for srpm in toActOn:
self.logger.info('Getting requirements for %s' % srpm)
@@ -183,8 +186,7 @@
try:
pkg = self.returnPackageByDep(dep)
self.logger.info(' --> %s' % pkg)
- if not self.rpmdb.installed(name=pkg.name):
- self.tsInfo.addInstall(pkg)
+ self.install(pkg)
except yum.Errors.YumBaseError, e:
self.logger.error("Error: %s" % e)
--- yum-complete-transaction.py
+++ yum-complete-transaction.py
@@ -161,6 +161,7 @@
# populate the ts
# run it
+ self.run_with_package_names.add('yum-utils')
times = []
for thistime in find_unfinished_transactions(self.conf.persistdir):
if thistime.endswith('disabled'):
@@ -184,7 +185,13 @@
timestamp = times[-1]
print "There are %d outstanding transactions to complete. Finishing the most recent one" % len(times)
- remaining = find_ts_remaining(timestamp, yumlibpath=self.conf.persistdir)
+ try:
+ remaining = find_ts_remaining(timestamp, yumlibpath=self.conf.persistdir)
+ except yum.Errors.MiscError, e:
+ self.logger.error("Error: %s" % e)
+ self.logger.error("Please report this error to: %s" % self.conf.bugtracker_url)
+ sys.exit(1)
+
print "The remaining transaction had %d elements left to run" % len(remaining)
for (action, pkgspec) in remaining:
if action == 'install':
@@ -220,14 +227,17 @@
sys.exit()
else:
- if self.doUtilTransaction() == 0:
- print "Cleaning up completed transaction file"
- self.clean_up_ts_files(timestamp, self.conf.persistdir)
- sys.exit()
- else:
- print "Not removing old transaction files"
- sys.exit()
-
+ try:
+ if self.doUtilTransaction() == 0:
+ print "Cleaning up completed transaction file"
+ self.clean_up_ts_files(timestamp, self.conf.persistdir)
+ sys.exit()
+ else:
+ print "Not removing old transaction files"
+ sys.exit()
+ except yum.Errors.YumBaseError,e:
+ print "Error: %s" % str(e)
+ sys.exit(1)
--- yum-config-manager.py
+++ yum-config-manager.py
+#!/usr/bin/python -tt
+
+import os, os.path
+import sys
+import yum
+sys.path.insert(0,'/usr/share/yum-cli')
+from utils import YumUtilBase
+import logging
+
+from iniparse import INIConfig
+
+def writeRawConfigFile(filename, sectionname, cfgoptions, items, optionobj,
+ only=None):
+ """
+ From writeRawRepoFile, but so we can alter [main] too.
+ """
+ ini = INIConfig(open(filename))
+ # Updated the ConfigParser with the changed values
+ cfgOptions = cfgoptions(sectionname)
+ for name,value in items():
+ if value is None: # Proxy
+ continue
+ option = optionobj(name)
+ if option.default != value or name in cfgOptions :
+ if only is None or name in only:
+ ini[sectionname][name] = option.tostring(value)
+ fp =file(filename, "w")
+ fp.write(str(ini))
+ fp.close()
+
+NAME = 'yum-config-manager'
+VERSION = '1.0'
+USAGE = '"yum-config-manager [options] [section]'
+
+yb = YumUtilBase(NAME, VERSION, USAGE)
+logger = logging.getLogger("yum.verbose.cli.yum-config-manager")
+yb.preconf.debuglevel = 0
+yb.preconf.errorlevel = 0
+yb.optparser = yb.getOptionParser()
+if hasattr(yb, 'getOptionGroup'): # check if the group option API is available
+ group = yb.getOptionGroup()
+else:
+ group = yb.optparser
+group.add_option("--save", default=False, action="store_true",
+ help='save the current options (useful with --setopt)')
+group.add_option("--enable", default=False, action="store_true",
+ help='enable the specified repos (automatically saves)')
+group.add_option("--disable", default=False, action="store_true",
+ help='disable the specified repos (automatically saves)')
+
+try:
+ opts = yb.doUtilConfigSetup()
+except yum.Errors.RepoError, e:
+ logger.error(str(e))
+ sys.exit(50)
+
+args = set(yb.cmds)
+
+if opts.enable and opts.disable:
+ logger.error("Error: Trying to enable and disable repos.")
+ opts.enable = opts.disable = False
+if opts.enable and not args:
+ logger.error("Error: Trying to enable already enabled repos.")
+ opts.enable = False
+
+only = None
+
+if not args or 'main' in args:
+ print yb.fmtSection('main')
+ print yb.conf.dump()
+ if opts.save and hasattr(yb, 'main_setopts') and yb.main_setopts:
+ fn = '/etc/yum/yum.conf'
+ if not os.path.exists(fn):
+ # Try the old default
+ fn = '/etc/yum.conf'
+ ybc = yb.conf
+ writeRawConfigFile(fn, 'main',
+ ybc.cfg.options, ybc.iteritems, ybc.optionobj,
+ only)
+
+if opts.enable or opts.disable:
+ opts.save = True
+ if not hasattr(yb, 'repo_setopts') or not yb.repo_setopts:
+ only = ['enabled']
+
+if args:
+ repos = yb.repos.findRepos(','.join(args))
+else:
+ repos = yb.repos.listEnabled()
+
+for repo in sorted(repos):
+ print yb.fmtSection('repo: ' + repo.id)
+ if opts.enable and not repo.enabled:
+ repo.enable()
+ elif opts.disable and repo.enabled:
+ repo.disable()
+ print repo.dump()
+ if (opts.save and
+ (only or (hasattr(yb, 'repo_setopts') and repo.id in yb.repo_setopts))):
+ writeRawConfigFile(repo.repofile, repo.id,
+ repo.cfg.options, repo.iteritems, repo.optionobj,
+ only)
--- yum-debug-dump.py
+++ yum-debug-dump.py
@@ -91,6 +91,9 @@
msg += " python ver: %s\n" % sys.version.replace('\n', '')
return msg
+# remove pylint false positive
+# Instance of 'DummyYumPlugins' has no '_plugins' member (but some types could not be inferred)
+# pylint: disable-msg=E1103
def dump_yum_config_info(self):
msg = "%%%%YUM INFO\n"
msg += " arch: %s\n" % self.conf.yumvar['arch']
@@ -100,6 +103,7 @@
msg += " enabled plugins: %s\n" % ",".join(self.plugins._plugins.keys())
msg += " global excludes: %s\n" % ",".join(self.conf.exclude)
return msg
+# pylint: enable-msg=E1103
# FIXME: This should use rpmdb.check_*()
def dump_rpm_problems(self):
@@ -128,7 +132,7 @@
if req.startswith('rpmlib'):
continue # ignore rpmlib deps
- if not providers.has_key((req,rflags,ver)):
+ if (req,rflags,ver) not in providers:
resolve_sack = self.rpmdb.whatProvides(req,rflags,ver)
else:
resolve_sack = providers[(req,rflags,ver)]
--- yum-groups-manager.py
+++ yum-groups-manager.py
@@ -161,9 +161,6 @@
if not opts.quiet:
yb.logger.info('Running from cache, results might be incomplete.')
- if False and opts.show_duplicates:
- yb.conf.showdupesfromrepos = True
- __show_all_versions__ = True
if opts.disablerepos:
for repo_match in opts.disablerepos:
for repo in yb.repos.findRepos(repo_match):
--- yum-util-cli-template
+++ yum-util-cli-template
@@ -43,7 +43,7 @@
opts = self.doUtilConfigSetup()
# Check if there is anything to do.
if len(self.cmds) < 1:
- parser.print_help()
+ print parser.format_help() # Stupid .print_help() commits unicide
sys.exit(0)
# at this point you have the entire YumBaseCli object as 'self'
# you can do whatever you want
--- yum-utils.bash
+++ yum-utils.bash
@@ -23,7 +23,7 @@
COMPREPLY=( $( compgen -d -- "$2" ) )
} &&
-complete -F _yu_repomanage -o filenames repomanage
+complete -F _yu_repomanage -o filenames repomanage repomanage.py
# package-cleanup
_yu_package_cleanup()
@@ -49,7 +49,7 @@
--cleandupes --oldkernels --count --keepdevel -c --queryformat' \
-- "$2" ) )
} &&
-complete -F _yu_package_cleanup -o filenames package-cleanup
+complete -F _yu_package_cleanup -o filenames package-cleanup package-cleanup.py
# verifytree
_yu_verifytree()
@@ -70,7 +70,7 @@
COMPREPLY=( $( compgen -d -- "$2" ) )
} &&
-complete -F _yu_verifytree -o filenames verifytree
+complete -F _yu_verifytree -o filenames verifytree verifytree.py
# repo-graph
_yu_repo_graph()
@@ -142,10 +142,14 @@
type _yum_list &>/dev/null && _yum_list all "$2"
return 0
;;
+ -g|--group)
+ type _yum_grouplist &>/dev/null && _yum_grouplist "" "$2"
+ return 0
+ ;;
esac
COMPREPLY=( $( compgen -W '--help --config --arch --basearch --builddeps
- --repoid --tempcache --quiet --newest --repofrompath --pkg' \
+ --repoid --tempcache --quiet --newest --repofrompath --pkg --group' \
-- "$2" ) )
} &&
complete -F _yu_repoclosure -o filenames repoclosure repoclosure.py
@@ -210,14 +214,41 @@
COMPREPLY=( $( compgen -W '--version --help --list --info --file
--queryformat --groupmember --all --requires --provides --obsoletes
--conflicts --changelog --location --nevra --envra --nvr --source
- --srpm --resolve --alldeps --recursive --whatprovides --whatrequires
+ --srpm --resolve --exactdeps --recursive --whatprovides --whatrequires
--whatobsoletes --whatconflicts --group --grouppkgs --archlist
--pkgnarrow --show-duplicates --repoid --enablerepo --disablerepo
--repofrompath --plugins --quiet --verbose --cache --tempcache
- --querytags -c' -- "$2" ) )
+ --querytags --config --installed' -- "$2" ) )
} &&
complete -F _yu_repoquery -o filenames repoquery repoquery.py
+# yumdb
+_yu_yumdb()
+{
+ COMPREPLY=()
+
+ case "$3" in
+ -h|--help|-version)
+ return 0
+ ;;
+ -c|--config)
+ COMPREPLY=( $( compgen -f -o plusdirs -X '!*.conf' -- "$2" ) )
+ return 0
+ ;;
+ shell)
+ COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) )
+ return 0
+ ;;
+ esac
+
+ if [ $COMP_CWORD -le 1 ] ; then
+ COMPREPLY=( $( compgen -W 'get set del rename rename-force copy search
+ exist unset info shell --version --help --noplugins --config' \
+ -- "$2" ) )
+ fi
+} &&
+complete -F _yu_yumdb -o filenames yumdb yumdb.py
+
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
--- yum-utils.spec
+++ yum-utils.spec
@@ -1,6 +1,6 @@
Summary: Utilities based around the yum package manager
Name: yum-utils
-Version: 1.1.25
+Version: 1.1.27
Release: 1%{?dist}
License: GPLv2+
Group: Development/Tools
@@ -8,16 +8,17 @@
URL: http://yum.baseurl.org/download/yum-utils/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-Requires: python >= 2.4 , yum >= 3.2.24
+Requires: python >= 2.4 , yum >= 3.2.27
BuildRequires: python >= 2.4
%description
yum-utils is a collection of utilities and examples for the yum package
manager. It includes utilities by different authors that make yum easier and
-more powerful to use. These tools include: debuginfo-install, package-cleanup,
-repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync,
-repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader,
-yum-debug-dump, yum-debug-restore and yum-groups-manager.
+more powerful to use. These tools include: debuginfo-install,
+find-repos-of-install, needs-restarting, package-cleanup, repoclosure,
+repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync,
+repotrack, verifytree, yumdownloader, yum-builddep, yum-complete-transaction,
+yum-config-manager, yum-debug-dump, yum-debug-restore and yum-groups-manager.
%package -n yum-updateonboot
Summary: Run yum update on system boot
@@ -162,21 +163,6 @@
The options make it possible to limit list/upgrade of packages to specific
security relevant ones. The commands give you the security information.
-%package -n yum-plugin-protect-packages
-Summary: Yum plugin to prevents Yum from removing itself and other protected packages
-Group: System Environment/Base
-Provides: yum-protect-packages = %{version}-%{release}
-Obsoletes: yum-protect-packages < 1.1.20-0
-Conflicts: yum-protect-packages < 1.1.20-0
-Requires: yum >= 3.0
-
-%description -n yum-plugin-protect-packages
-this plugin prevents Yum from removing itself and other protected packages.
-By default, yum is the only package protected, but by extension this
-automatically protects everything on which yum depends (rpm, python, glibc,
-and so on).Therefore, the plugin functions well even without
-compiling careful lists of all important packages.
-
%package -n yum-plugin-upgrade-helper
Summary: Yum plugin to help upgrades to the next distribution version
Group: System Environment/Base
@@ -382,7 +368,6 @@
refresh-updatesd \
merge-conf \
security \
- protect-packages \
upgrade-helper \
aliases \
list-data \
@@ -406,7 +391,7 @@
for plug in $plugins; do
install -m 644 $plug/*.conf $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/
install -m 644 $plug/*.py $RPM_BUILD_ROOT/usr/lib/yum-plugins/
- %{__python} -c "import compileall; compileall.compile_dir('$(RPM_BUILD_ROOT)/usr/lib/yum-plugins', 1)"
+ %{__python} -c "import compileall; compileall.compile_dir('$RPM_BUILD_ROOT/usr/lib/yum-plugins', 1)"
done
install -m 644 aliases/aliases $RPM_BUILD_ROOT/%{_sysconfdir}/yum/aliases.conf
install -m 644 versionlock/versionlock.list $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/
@@ -447,6 +432,7 @@
%{_bindir}/verifytree
%{_bindir}/yumdownloader
%{_bindir}/yum-builddep
+%{_bindir}/yum-config-manager
%{_bindir}/yum-debug-dump
%{_bindir}/yum-groups-manager
%{_bindir}/yum-debug-restore
@@ -463,6 +449,7 @@
%{_mandir}/man1/yum-debug-dump.1.*
%{_mandir}/man8/yum-complete-transaction.8.*
%{_mandir}/man1/yum-groups-manager.1.*
+%{_mandir}/man8/yumdb.8.*
%{_mandir}/man1/yumdownloader.1.*
%files -n yum-updateonboot
@@ -528,11 +515,6 @@
/usr/lib/yum-plugins/security.*
%{_mandir}/man8/yum-security.8.*
-%files -n yum-plugin-protect-packages
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf
-/usr/lib/yum-plugins/protect-packages.*
-
%files -n yum-plugin-upgrade-helper
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf
@@ -619,6 +601,12 @@
%{_mandir}/man5/yum-fs-snapshot.conf.5.*
%changelog
+* Sun Jun 6 2010 Tim Lauridsen <timlau at fedoraproject.org>
+- mark as 1.1.27
+
+* Wed Feb 10 2010 Tim Lauridsen <timlau at fedoraproject.org>
+- mark as 1.1.26
+
* Wed Jan 27 2010 Tim Lauridsen <timlau at fedoraproject.org>
- mark as 1.1.25
- add touch /etc/yum.repos.d/_local.repo to install section
--- yumdb.py
+++ yumdb.py
@@ -19,6 +19,7 @@
del <key> [pkg-wildcard]...
rename <key> <key> [pkg-wildcard]...
rename-force <key> <key> [pkg-wildcard]...
+ copy <key> <key> [pkg-wildcard]...
search <key> <wildcard>...
exist? <key> [pkg-wildcard]...
unset? <key> [pkg-wildcard]...
@@ -66,6 +67,19 @@
print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey)
elif ynkey in pkg.yumdb_info:
print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey)
+ else:
+ print " " * 4, ynkey, '<unset>'
+ elif args[0] == 'copy' and len(args) > 2:
+ args.pop(0)
+ yokey = args.pop(0)
+ ynkey = args.pop(0)
+ for pkg in sorted(yb.rpmdb.returnPackages(patterns=args)):
+ print pkg
+ if yokey in pkg.yumdb_info:
+ setattr(pkg.yumdb_info, ynkey, getattr(pkg.yumdb_info, yokey))
+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey)
+ elif ynkey in pkg.yumdb_info:
+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey)
else:
print " " * 4, ynkey, '<unset>'
elif args[0] in ['rename-f', 'rename-force'] and len(args) > 2:
--- yumdownloader.py
+++ yumdownloader.py
@@ -19,7 +19,7 @@
sys.path.insert(0,'/usr/share/yum-cli')
import yum
-from yum.misc import getCacheDir, setup_locale
+from yum.misc import setup_locale
from yum.packages import parsePackages
from yum.Errors import RepoError
from utils import YumUtilBase
@@ -86,18 +86,9 @@
sys.exit(0)
# make yumdownloader work as non root user.
- if self.conf.uid != 0:
- cachedir = getCacheDir()
- self.logger.debug('Running as non-root, using %s as cachedir' % cachedir)
- if cachedir is None:
- self.logger.error("Error: Could not make cachedir, exiting")
- sys.exit(50)
- self.repos.setCacheDir(cachedir)
-
- # Turn off cache
- self.conf.cache = 0
- # make sure the repos know about it, too
- self.repos.setCache(0)
+ if not self.setCacheDir():
+ self.logger.error("Error: Could not make cachedir, exiting")
+ sys.exit(50)
# Setup yum (Ts, RPM db, Repo & Sack)
self.doUtilYumSetup(opts)
++++++ yum-utils.yaml (new)
--- yum-utils.yaml
+++ yum-utils.yaml
+Name: yum-utils
+Summary: Utilities based around the yum package manager
+Version: 1.1.27
+Release: 1
+Group: Development/Tools
+License: GPLv2+
+URL: http://yum.baseurl.org/download/yum-utils/
+Sources:
+ - http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz
+Description: |
+ yum-utils is a collection of utilities and examples for the yum package
+ manager. It includes utilities by different authors that make yum easier and
+ more powerful to use. These tools include: debuginfo-install, package-cleanup,
+ repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync,
+ repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader,
+ yum-debug-dump, yum-debug-restore and yum-groups-manager.
+
+Requires:
+ - python >= 2.4
+ - yum >= 3.2.24
+PkgBR:
+ - python >= 2.4
+BuildArch: noarch
+Configure: none
+SubPackages:
+ - Name: yum-plugin-aliases
+ AsWholeName: yes
+ Summary: Yum plugin to enable aliases filters
+ Group: System/Base
+ Description: |
+ This plugin adds the command alias, and parses the aliases config. file to
+ enable aliases.
+ Requires:
+ - yum >= 3.2.23
+ Provides:
+ - yum-aliases = %{version}-%{release}
+ Obsoletes:
+ - yum-aliases < 1.1.20-0
+ Conflicts:
+ - yum-aliases < 1.1.20-0
+
+ - Name: yum-plugin-security
+ AsWholeName: yes
+ Summary: Yum plugin to enable security filters
+ Group: System/Base
+ Description: |
+ This plugin adds the options --security, --cve, --bz and --advisory flags
+ to yum and the list-security and info-security commands.
+ The options make it possible to limit list/upgrade of packages to specific
+ security relevant ones. The commands give you the security information.
+ Requires:
+ - yum >= 3.2.18
+ Provides:
+ - yum-security = %{version}-%{release}
+ Obsoletes:
+ - yum-security < 1.1.20-0
+ Conflicts:
+ - yum-security < 1.1.20-0
+
+ - Name: yum-plugin-fs-snapshot
+ AsWholeName: yes
+ Summary: Yum plugin to automatically snapshot your filesystems during updates
+ Group: System/Base
+ Description: |
+ When this plugin is installed it will automatically snapshot any
+ filesystem that is touched by the packages in a yum update or yum remove.
+ Requires:
+ - yum >= 3.2.22
+
+ - Name: yum-plugin-merge-conf
+ AsWholeName: yes
+ Summary: Yum plugin to merge configuration changes when installing packages
+ Group: System/Base
+ Description: |
+ This yum plugin adds the "--merge-conf" command line option. With this option,
+ Yum will ask you what to do with config files which have changed on updating a
+ package.
+ Requires:
+ - yum >= 3.0
+ Provides:
+ - yum-merge-conf = %{version}-%{release}
+ Obsoletes:
+ - yum-merge-conf < 1.1.20-0
+ Conflicts:
+ - yum-merge-conf < 1.1.20-0
+
+ - Name: yum-plugin-versionlock
+ AsWholeName: yes
+ Summary: Yum plugin to lock specified packages from being updated
+ Group: System/Base
+ Description: |
+ This plugin takes a set of name/versions for packages and excludes all other
+ versions of those packages (including optionally following obsoletes). This
+ allows you to protect packages from being updated by newer versions,
+ for example.
+ Requires:
+ - yum >= 3.2.24
+ Provides:
+ - yum-versionlock = %{version}-%{release}
+ Obsoletes:
+ - yum-versionlock < 1.1.20-0
+ Conflicts:
+ - yum-versionlock < 1.1.20-0
+
+ - Name: yum-plugin-protectbase
+ AsWholeName: yes
+ Summary: Yum plugin to protect packages from certain repositories
+ Group: System/Base
+ Description: |
+ This plugin allows certain repositories to be protected. Packages in the
+ protected repositories can't be overridden by packages in non-protected
+ repositories even if the non-protected repo has a later version.
+ Requires:
+ - yum >= 3.0
+ Provides:
+ - yum-protectbase = %{version}-%{release}
+ Obsoletes:
+ - yum-protectbase < 1.1.20-0
+ Conflicts:
+ - yum-protectbase < 1.1.20-0
+
+ - Name: yum-plugin-tmprepo
+ AsWholeName: yes
+ Summary: Yum plugin to add temporary repositories
+ Group: System/Base
+ Description: |
+ This plugin adds the option --tmprepo which takes a url to a .repo file
+ downloads it and enables it for a single run. This plugin tries to ensure
+ that temporary repositories are safe to use, by default, by not allowing
+ gpg checking to be disabled.
+ Requires:
+ - yum >= 3.2.11
+ - createrepo
+ Provides:
+ - yum-tmprepo = %{version}-%{release}
+ Obsoletes:
+ - yum-tmprepo < 1.1.20-0
+ Conflicts:
+ - yum-tmprepo < 1.1.20-0
+
+ - Name: yum-plugin-remove-with-leaves
+ AsWholeName: yes
+ Summary: Yum plugin to remove dependencies which are no longer used because of a removal
+ Group: System/Base
+ Description: |
+ This plugin removes any unused dependencies that were brought in by an install
+ but would not normally be removed. It helps to keep a system clean of unused
+ libraries and packages.
+ Requires:
+ - yum >= 3.2.19
+ Provides:
+ - yum-remove-with-leaves = %{version}-%{release}
+ Obsoletes:
+ - yum-remove-with-leaves < 1.1.20-0
+ Conflicts:
+ - yum-remove-with-leaves < 1.1.20-0
+
+ - Name: yum-plugin-tsflags
+ AsWholeName: yes
+ Summary: Yum plugin to add tsflags by a commandline option
+ Group: System/Base
+ Description: |
+ This plugin allows you to specify optional transaction flags on the yum
+ command line
+ Requires:
+ - yum >= 3.0
+ Provides:
+ - yum-tsflags = %{version}-%{release}
+ Obsoletes:
+ - yum-tsflags < 1.1.20-0
+ Conflicts:
+ - yum-tsflags < 1.1.20-0
+
+ - Name: yum-plugin-filter-data
+ AsWholeName: yes
+ Summary: Yum plugin to list filter based on package data
+ Group: System/Base
+ Description: |
+ This plugin adds the options --filter- vendors, groups, packagers, licenses,
+ arches, committers, buildhosts, baseurls, package-sizes, archive-sizes and
+ installed-sizes. Note that each package must match at least one pattern/range in
+ each category, if any were specified.
+ Requires:
+ - yum >= 3.2.17
+ Provides:
+ - yum-filter-data = %{version}-%{release}
+ Obsoletes:
+ - yum-filter-data < 1.1.20-0
+ Conflicts:
+ - yum-filter-data < 1.1.20-0
+
+ - Name: yum-plugin-keys
+ AsWholeName: yes
+ Summary: Yum plugin to deal with signing keys
+ Group: System/Base
+ Description: |
+ This plugin adds the commands keys, keys-info, keys-data and keys-remove. They
+ allow you to query and remove signing keys.
(231 more lines skipped)
++++++ deleted files:
--- meegobug338-fix-yum-builddep-attributeerror.patch
More information about the MeeGo-commits
mailing list