[yum-commits] 5 commits - docs/yum.8 yumcommands.py yum/config.py yum/misc.py yum/parser.py
James Antill
james at osuosl.org
Tue Mar 25 04:05:39 UTC 2014
docs/yum.8 | 41 +++++++++++++++++++++++++++++------------
yum/config.py | 4 ++--
yum/misc.py | 17 +++++++++++++++++
yum/parser.py | 1 +
yumcommands.py | 12 +++++++++++-
5 files changed, 60 insertions(+), 15 deletions(-)
New commits:
commit 02a2d73afe6ea19ae17cbab2192c1d7e12be5ec2
Author: James Antill <james at and.org>
Date: Mon Mar 24 16:17:19 2014 -0400
No error for refilter cleanup, rm dirs. and eat all errors. BZ 1062959.
diff --git a/yumcommands.py b/yumcommands.py
index 75b3ce2..c76e192 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -37,6 +37,7 @@ import tempfile
import shutil
import distutils.spawn
import glob
+import errno
import yum.config
from yum import updateinfo
@@ -4742,7 +4743,16 @@ class FSCommand(YumCommand):
for fname in sorted(pfr['not']):
print _('Removing:'), fname
- misc.unlink_f(fname)
+ try: # Ignore everything, unlink_f() doesn't.
+ os.unlink(fname)
+ except OSError, e:
+ if e.errno == errno.EISDIR:
+ try:
+ os.rmdir(fname)
+ except:
+ pass
+ except:
+ pass
def _fs_diff(self, base, extcmds):
def deal_with_file(fpath):
commit 2e983a83ecf7eec61373303b85123a00d795296a
Author: James Antill <james at and.org>
Date: Tue Mar 18 16:10:02 2014 -0400
Use get_uuid_obj() instead of get_uuid(), to help out ostree.
diff --git a/yum/config.py b/yum/config.py
index 69f8e2e..7bb56d0 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -41,7 +41,7 @@ import rpmUtils.transaction
import rpmUtils.miscutils
import Errors
import types
-from misc import get_uuid, read_in_items_from_dot_dir
+from misc import get_uuid_obj, read_in_items_from_dot_dir
# Alter/patch these to change the default checking...
__pkgs_gpgcheck_default__ = False
@@ -1060,7 +1060,7 @@ def readStartupConfig(configfile, root, releasever=None):
startupconf.releasever = releasever
uuidfile = '%s/%s/uuid' % (startupconf.installroot, startupconf.persistdir)
- startupconf.uuid = get_uuid(uuidfile)
+ startupconf.uuid = get_uuid_obj(uuidfile)
return startupconf
commit fdbdd3499f5d0cf63e545ec60af4ee5b135b1a75
Author: James Antill <james at and.org>
Date: Tue Mar 18 16:09:10 2014 -0400
Add get_uuid_obj() for dynamic uuid creation on use.
diff --git a/yum/misc.py b/yum/misc.py
index f551102..347a07a 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -1101,6 +1101,23 @@ def get_uuid(savepath):
pass
return myid
+
+class _Dynamic_UUID(object):
+ def __init__(self, filename):
+ self.filename = filename
+ self.uuid = None
+
+ def __str__(self):
+ if self.uuid is None:
+ self.uuid = get_uuid(self.filename)
+ return self.uuid
+
+ def __unicode__(self):
+ return to_unicode(self.__str__())
+
+def get_uuid_obj(savepath):
+ """ Like get_uuid() but doesn't create the uuid file until it's needed. """
+ return _Dynamic_UUID(savepath)
def decompress(filename, dest=None, fn_only=False, check_timestamps=False):
"""take a filename and decompress it into the same relative location.
commit 343d24abcb535bccc45cd5015b4f7ccda8c8aacb
Author: James Antill <james at and.org>
Date: Tue Mar 18 16:08:45 2014 -0400
Allow objects as well as pure strings, for var replacements.
diff --git a/yum/parser.py b/yum/parser.py
index f443ce7..b165ef2 100644
--- a/yum/parser.py
+++ b/yum/parser.py
@@ -33,6 +33,7 @@ def varReplace(raw, vars):
start, end = m.span()
done.append(raw[:start]) # Keep stuff leading up to token
+ replacement = str(replacement) # Allow objects now.
done.append(replacement) # Append replacement value
raw = raw[end:] # Continue with remainder of string
commit 9e41b95eef4a0fa4e5e7420cf6e7d8ed5ee06e82
Author: James Antill <james at and.org>
Date: Tue Mar 11 15:09:18 2014 -0400
Change man page text for RHEL-7 group_command=object feedback.
diff --git a/docs/yum.8 b/docs/yum.8
index 6794581..1ab8534 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -250,20 +250,34 @@ Is used to download and make usable all the metadata for the currently enabled
sure the repos. are current (much like "yum clean expire-cache").
.IP
.IP "\fBgroups\fP"
-A command, new in 3.4.2, that collects all the subcommands that act on groups together.
-
-"\fBgroup install\fP" is used to install all of the individual packages in a group, of the specified
-types (this works as if you'd taken each of those package names and put them on
-the command line for a "yum install" command).
+A command, new in 3.4.2, that collects all the subcommands that act on groups
+together. Note that recent yum using distributions (Fedora-19+, RHEL-7+) have
+configured group_command=objects which changes how group commands act in some
+important ways.
+
+"\fBgroup install\fP" is used to install all of the individual packages in a
+group, of the specified types (this works as if you'd taken each of those
+package names and put them on the command line for a "yum install" command).
The group_package_types configuration option specifies which types will
be installed.
-
-"\fBgroup update\fP" is just an alias for groupinstall, which will do the right thing because
-"yum install X" and "yum update X" do the same thing, when X is already
-installed.
-
-"\fBgroup list\fP" is used to list the available groups from all \fByum\fP repos. Groups are marked
-as "installed" if all mandatory packages are installed, or if a group doesn't
+ If you wish to "reinstall" a group so that you get a package that is currently
+blacklisted the easiest way to do that currently is to install the package
+manually and then run "groups mark packages-sync mygroup mypackagename" (or
+use yumdb to set the group_member of the package(s)).
+
+"\fBgroup update\fP" is just an alias for group install, when using
+group_command=compat. This will install packages in the group not already
+installed and upgrade existing packages. With group_command=simple it will just
+upgrade already installed packages. With group_command=objects it will try to
+upgrade the group object, installing any available packages not blacklisted
+(marked '-' in group info) and will upgrade the installed packages.
+
+"\fBgroup list\fP" is used to list the available groups from all \fByum\fP
+repos. When group_command=objects the group is installed if the user
+explicitly installed it (or used the group mark* commands to mark it installed).
+It does not need to have any packages installed.
+When not using group_command=objects groups are shown as "installed" if all
+mandatory packages are installed, or if a group doesn't
have any mandatory packages then it is installed if any of the optional or
default package are installed (when not in group_command=objects mode).
You can pass optional arguments to the list/summary commands: installed,
@@ -300,6 +314,9 @@ meaning of these markers is:
.br
"=" = Package is installed, and was installed via the group.
+you can move an installed package into an installed group using either
+"group mark package-sync/package-sync-forced" or "yumdb set group_member".
+
"\fBgroup summary\fP" is used to give a quick summary of how many groups
are installed and available.
More information about the Yum-commits
mailing list