From 92948d7ff39bae797191c9e1f8e0876aad1efe9a Mon Sep 17 00:00:00 2001 From: kh1 Date: Wed, 13 Jun 2012 16:25:47 +0200 Subject: Add new commandline argument. In case we run an offline installer, --create-offline-repository will dump the whole installer content into the install directory and add an extra url to the repositories pointing to the mentioned local repository. This allows an offline user to add packages without the need of a new installation. Change-Id: I3e7eb0c56f632b74f5ea41b96bf3d9be83173f41 Reviewed-by: Tim Jenssen Reviewed-by: Niels Weber --- src/sdk/installerbase.cpp | 2 ++ src/sdk/installerbase_p.cpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'src/sdk') diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 0509f9cab..03b87bbb2 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -322,6 +322,8 @@ int main(int argc, char *argv[]) core.addUserRepositories(repoList); } else if (argument == QLatin1String("--no-force-installations")) { PackageManagerCore::setNoForceInstallation(true); + } else if (argument == QLatin1String("--create-offline-repository")) { + PackageManagerCore::setCreateLocalRepositoryFromBinary(true); } else { std::cerr << "Unknown option: " << argument << std::endl; } diff --git a/src/sdk/installerbase_p.cpp b/src/sdk/installerbase_p.cpp index 611e491bf..bf96a797a 100644 --- a/src/sdk/installerbase_p.cpp +++ b/src/sdk/installerbase_p.cpp @@ -303,6 +303,9 @@ void InstallerBase::showUsage() << "Set system proxy on Win and Mac. This option has no effect on Linux." << std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --verbose" << std::setw(40) << "Show debug output on the console" << std::endl; + std::cout << std::setw(55) << std::setiosflags(std::ios::left) << " --create-offline-repository" + << std::setw(40) << "Offline installer only: Create a local repository inside the installation " + "directory based on the offline installer's content" << std::endl; std::cout << "\nDeveloper:"<< std::endl; std::cout << std::setw(55) << std::setiosflags(std::ios::left) -- cgit v1.2.3