From 61739262c7677056d05b2c07b2bc9f67713e5388 Mon Sep 17 00:00:00 2001 From: joost Date: Tue, 11 Apr 2017 16:42:37 +0000 Subject: [PATCH] * Give a clear error when the source of a package is not available git-svn-id: trunk@35776 - --- packages/fppkg/src/pkgcommands.pp | 9 ++++++--- packages/fppkg/src/pkgmessages.pp | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/fppkg/src/pkgcommands.pp b/packages/fppkg/src/pkgcommands.pp index cef171e365..96d879f32b 100644 --- a/packages/fppkg/src/pkgcommands.pp +++ b/packages/fppkg/src/pkgcommands.pp @@ -366,11 +366,14 @@ begin else begin P:=PackageManager.FindPackage(PackageName, pkgpkAvailable); - if Assigned(P) then + if not Assigned(P) then begin - if P.PackagesStructure.UnzipBeforeUse then - ExecuteAction(PackageName,'unzip'); + Error(Format(SErrPackageNotAvailable, [PackageName])); + Exit; end; + + if P.PackagesStructure.UnzipBeforeUse then + ExecuteAction(PackageName,'unzip'); ExecuteAction(PackageName,'installdependencies'); end; end; diff --git a/packages/fppkg/src/pkgmessages.pp b/packages/fppkg/src/pkgmessages.pp index 9259d24fa7..f245bd6771 100644 --- a/packages/fppkg/src/pkgmessages.pp +++ b/packages/fppkg/src/pkgmessages.pp @@ -26,7 +26,8 @@ Resourcestring SErrMissingPackage = 'Could not find package "%s"'; SErrMissingInstallRepo = 'Could not find repository "%s"'; SErrNoPackageSpecified = 'No package specified'; - SErrNoPackageAvailable = 'Package %s %s is not available'; + SErrPackageNotAvailable = 'Source of package %s is not available'; + SErrNoPackageAvailable = 'Package dependency %s %s is not available'; SErrOnlyLocalDir = 'The specified command "%s" works only on current dir, not on a (remote) package'; SErrIllConfRepository = 'Invalid configured repository "%s"'; SErrExecutionFPMake = 'Execution of FPMake %s failed';