[yum-commits] 2 commits - docs/repoquery.1 plugins/changelog repoquery.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Wed Jul 31 14:31:17 UTC 2013
docs/repoquery.1 | 7 +++++++
plugins/changelog/changelog.py | 11 ++++++++++-
repoquery.py | 2 ++
3 files changed, 19 insertions(+), 1 deletion(-)
New commits:
commit dd0960c3e10528f429e70811d5027c30f8bde0de
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Thu Jul 25 10:32:18 2013 +0200
yum changelog: implicit since=all. BZ 961782
dateutil.parser.parse("junk", fuzzy=True) happily returns
the current date, so when users omit the "since" argument
we don't complain. Insert an implicit "all" arg instead.
diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py
index 16144c6..d09281a 100644
--- a/plugins/changelog/changelog.py
+++ b/plugins/changelog/changelog.py
@@ -102,7 +102,7 @@ class ChangeLogCommand:
return ['changelog', 'ChangeLog']
def getUsage(self):
- return "<date>|<number>|all [PACKAGE|all|installed|updates|extras|obsoletes|recent]"
+ return "[<date>|<number>|all] [PACKAGE|all|installed|updates|extras|obsoletes|recent]"
def getSummary(self):
return """\
@@ -212,6 +212,15 @@ Display changelog data, since a specified time, on a group of packages"""
msg = "Argument -- %s -- is not valid: %s" % (since, to_str(e))
raise PluginYumExit(msg)
+ if self._since_dto == dateutil_parser.parse('garbage', fuzzy=True):
+ # 'since' was a package name, not a date
+ extcmds.insert(0, since)
+
+ # assume since="all"
+ self._since_all = True
+ self._since_dto = None
+ self._since_tt = None
+
ypl = base.returnPkgLists(extcmds)
self.show_data(msg, ypl.installed, 'Installed Packages')
self.show_data(msg, ypl.available, 'Available Packages')
commit c2b30e14d9c622d1b49419b4df5b2ca5e6509641
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Jul 29 14:40:22 2013 +0200
repoquery: add --installroot option. BZ 988429
diff --git a/docs/repoquery.1 b/docs/repoquery.1
index 81601ac..30fda8a 100644
--- a/docs/repoquery.1
+++ b/docs/repoquery.1
@@ -57,6 +57,13 @@ the releasever information from outside the installroot.
Note that with the default upstream cachedir, of /var/cache/yum, using this
option will corrupt your cache (and you can use $releasever in your cachedir
configuration to stop this).
+.IP "\fB\-\-installroot=root\fP"
+Specifies an alternative installroot, relative to which all packages will be
+installed. Think of this like doing "chroot <root> yum" except using
+\-\-installroot allows yum to work before the chroot is created.
+Note: You may also want to use the option \-\-releasever=/ when creating the
+installroot as otherwise the $releasever value is taken from the rpmdb within
+the installroot (and thus. will be empty, before creation).
.IP "\fB\-\-setopt=option=value\fP"
Set any config option in yum config or repo files. For options in the global
config just use: \-\-setopt=option=value for repo options use: \-\-setopt=repoid.option=value
diff --git a/repoquery.py b/repoquery.py
index e68c44c..7436fc4 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -1284,6 +1284,7 @@ def main(args):
parser.add_option("--search-fields", action="append", dest="searchfields",
default=[],
help="search fields to search using --search")
+ parser.add_option("--installroot", default="/", help="set install root")
parser.add_option("", "--setopt", dest="setopts", default=[],
action="append",
help="set arbitrary config and repo options")
@@ -1408,6 +1409,7 @@ def main(args):
repoq.preconf.fn = opts.conffile
repoq.preconf.debuglevel = initnoise
repoq.preconf.init_plugins = opts.plugins
+ repoq.preconf.root = opts.installroot
repoq.conf
for item in bad_setopt_tm:
More information about the Yum-commits
mailing list