summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-04-15 07:09:02 +0200
committerDavid Tardon <dtardon@redhat.com>2013-04-15 07:17:46 +0200
commit578d3476f0c1bc13ac08cc111f5d758226f4d07b (patch)
treeacf74d0caa797ea25af31d342f40acd266aa37d8 /solenv
parentfa0faf3f04882b55a8aaaaef2524f66b00371857 (diff)
add error checking into installer/filelist.pm
Change-Id: Iccb314155ac70984fa70e7d1ec839edd9eb14270
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/filelists.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/filelists.pm b/solenv/bin/modules/installer/filelists.pm
index d3447be79163..5aa0506df9b2 100644
--- a/solenv/bin/modules/installer/filelists.pm
+++ b/solenv/bin/modules/installer/filelists.pm
@@ -40,8 +40,15 @@ sub resolve_filelist_flag
foreach my $path (@{$filelist})
{
- # TODO: check that the file is really under $outdir
- # TODO: check existence of the file
+ if ((index $path, $outdir) != 0)
+ {
+ installer::logger::print_error("file '$path' is not in '$outdir'");
+ }
+ if (!-f $path)
+ {
+ installer::logger::print_error("file '$path' does not exist");
+ }
+
my $subpath = substr $path, ((length $outdir) + 1); # drop separator too
my %newfile = ();