t.run()
def localinstall(self, files):
- repo_name = "localinstall"
+ repo_name = repo_desc = "localinstall"
# Create a new repository that holds all packages we passed on
# the commandline.
- repo = self.solver.pool.create_repo(repo_name)
+ repo = repository.RepositoryDir(self, repo_name, repo_desc, ".")
- # Open all passed files and try to open them.
+ # Add all packages to the repository index.
for file in files:
- pkg = packages.open(self, None, file)
-
- if not isinstance(pkg, packages.BinaryPackage):
- logging.warning("Skipping package which is a wrong format: %s" % file)
- continue
-
- # Add the package information to the solver.
- self.solver.add_package(pkg, repo_name)
+ repo.collect_packages(file)
# Break if no packages were added at all.
- if not repo.size():
+ if not len(repo):
logging.critical("There are no packages to install.")
return
- # Create a new request which contains all solvabled from the CLI and
- # try to solve it.
- request = self.solver.create_request()
- for solvable in repo:
- request.install(solvable)
+ # Create a new request that installs all solvables from the
+ # repository.
+ request = self.create_request()
+ for solv in [p.solvable for p in repo]:
+ request.install(solv)
solver = self.create_solver()
t = solver.solve(request)
return
# Ask the user if this is okay.
- #if not t.cli_yesno():
- # return
+ if not t.cli_yesno():
+ return
# If okay, run the transcation.
t.run()
# Get a filelist of all files that could possibly be packages.
files = []
- for dir, subdirs, _files in os.walk(path):
- for file in sorted(_files):
- # Skip files that do not have the right extension
- if not file.endswith(".%s" % PACKAGE_EXTENSION):
- continue
- file = os.path.join(dir, file)
- files.append(file)
+ if os.path.isdir(path):
+ for dir, subdirs, _files in os.walk(path):
+ for file in sorted(_files):
+ # Skip files that do not have the right extension
+ if not file.endswith(".%s" % PACKAGE_EXTENSION):
+ continue
+
+ file = os.path.join(dir, file)
+ files.append(file)
+ elif os.path.isfile(path) and path.endswith(".%s" % PACKAGE_EXTENSION):
+ files.append(path)
if not files:
return pkgs
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-29 17:32+0200\n"
+"POT-Creation-Date: 2011-07-29 18:51+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 "Build the package for the given architecture."
msgstr ""
-#: ../pakfire/cli.py:318 ../pakfire/cli.py:344
+#: ../pakfire/cli.py:318 ../pakfire/cli.py:342
msgid "Path were the output files should be copied to."
msgstr ""
-#: ../pakfire/cli.py:320 ../pakfire/cli.py:333
+#: ../pakfire/cli.py:320
msgid "Mode to run in. Is either 'release' or 'development' (default)."
msgstr ""
msgid "Emulated architecture in the shell."
msgstr ""
-#: ../pakfire/cli.py:338
+#: ../pakfire/cli.py:336
msgid "Generate a source package."
msgstr ""
-#: ../pakfire/cli.py:340
+#: ../pakfire/cli.py:338
msgid "Give name(s) of a package(s)."
msgstr ""
-#: ../pakfire/cli.py:416
+#: ../pakfire/cli.py:413
msgid "Pakfire repo command line interface."
msgstr ""
-#: ../pakfire/cli.py:441
+#: ../pakfire/cli.py:438
msgid "Repository management commands."
msgstr ""
-#: ../pakfire/cli.py:449
+#: ../pakfire/cli.py:446
msgid "Create a new repository index."
msgstr ""
-#: ../pakfire/cli.py:450
+#: ../pakfire/cli.py:447
msgid "Path to the packages."
msgstr ""
-#: ../pakfire/cli.py:451
+#: ../pakfire/cli.py:448
msgid "Path to input packages."
msgstr ""
-#: ../pakfire/cli.py:463
+#: ../pakfire/cli.py:460
msgid "Pakfire master command line interface."
msgstr ""
-#: ../pakfire/cli.py:491
+#: ../pakfire/cli.py:488
msgid "Update the sources."
msgstr ""
-#: ../pakfire/cli.py:501
+#: ../pakfire/cli.py:498
msgid "Pakfire server command line interface."
msgstr ""
-#: ../pakfire/cli.py:533
+#: ../pakfire/cli.py:530
msgid "Request a build job from the server."
msgstr ""
-#: ../pakfire/cli.py:539
+#: ../pakfire/cli.py:536
msgid "Send a keepalive to the server."
msgstr ""
-#: ../pakfire/cli.py:546
+#: ../pakfire/cli.py:543
msgid "Update all repositories."
msgstr ""
msgstr ""
#. Create progress bar.
-#: ../pakfire/repository/index.py:311
+#: ../pakfire/repository/index.py:315
#, python-format
msgid "Loading from %s"
msgstr ""
#. Add all packages from the database to the index.
-#: ../pakfire/repository/index.py:364
+#: ../pakfire/repository/index.py:368
msgid "Loading installed packages"
msgstr ""
msgid "The solver returned one problem:"
msgstr ""
-#. Print information about the problem to the user.
-#: ../pakfire/satsolver.py:118
-#, python-format
-msgid " #%d: %s"
-msgstr ""
-
#. Ask the user if he or she want to modify the request. If not, just exit.
#: ../pakfire/satsolver.py:126
msgid "Do you want to manually alter the request?"