ts = transaction.Transaction(self, ds)
ts.run()
+ def update(self, pkgs):
+ ds = depsolve.DependencySet(pakfire=self)
+
+ for pkg in ds.packages:
+ # Skip unwanted packages (passed on command line)
+ if pkgs and not pkg.name in pkgs:
+ continue
+
+ updates = self.repos.get_by_name(pkg.name)
+ updates = packages.PackageListing(updates)
+
+ latest = updates.get_most_recent()
+
+ # If the current package is already the latest
+ # we skip it.
+ if latest == pkg:
+ continue
+
+ # Otherwise we want to update the package.
+ ds.add_package(latest)
+
+ ds.resolve()
+ ds.dump()
+
+ ret = cli.ask_user(_("Is this okay?"))
+ if not ret:
+ return
+
+ ts = transaction.Transaction(self, ds)
+ ts.run()
+
def provides(self, patterns):
pkgs = []
print pkg.dump(short=True)
def handle_update(self):
- pass
+ self.pakfire.update(self.args.package)
def handle_install(self, local=False):
if local:
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-03-06 11:49+0100\n"
+"POT-Creation-Date: 2011-03-06 12:48+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Total download size: %s"
msgstr ""
-#: ../pakfire/__init__.py:202
+#: ../pakfire/__init__.py:202 ../pakfire/__init__.py:234
msgid "Is this okay?"
msgstr ""