aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils/unpaxinate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/utils/unpaxinate.cc')
-rw-r--r--paludis/repositories/e/ebuild/utils/unpaxinate.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpaxinate.cc b/paludis/repositories/e/ebuild/utils/unpaxinate.cc
index a246aeb3a..fb45618f2 100644
--- a/paludis/repositories/e/ebuild/utils/unpaxinate.cc
+++ b/paludis/repositories/e/ebuild/utils/unpaxinate.cc
@@ -42,6 +42,8 @@ int main(int argc, char *argv[])
}
archive_entry * entry;
+ bool done_any(false);
+
while (ARCHIVE_OK == archive_read_next_header(archive, &entry))
{
std::string archive_filename(archive_entry_pathname(entry));
@@ -74,6 +76,7 @@ int main(int argc, char *argv[])
x << ", archive_errno " << archive_errno(archive) << ": " << archive_error_string(archive) << std::endl;
return EXIT_FAILURE;
}
+ done_any = true;
}
if (ARCHIVE_OK != ((x = archive_read_finish(archive))))
@@ -83,6 +86,12 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ if (want_env && ! done_any)
+ {
+ std::cerr << "Could not find any environment in '" << archive_file << "'" << std::endl;
+ return EXIT_FAILURE;
+ }
+
return EXIT_SUCCESS;
}