diff options
author | 2011-02-26 14:09:57 +0000 | |
---|---|---|
committer | 2011-02-26 14:11:30 +0000 | |
commit | aa99650677bdcb8b8acbff68b413350a1b8b8ea6 (patch) | |
tree | c306717041d3a27ef57354df343c5d4736ceea76 | |
parent | e0ef0b7678fd7c9fa970313b53e0d99d8732d133 (diff) | |
download | paludis-aa99650677bdcb8b8acbff68b413350a1b8b8ea6.tar.gz paludis-aa99650677bdcb8b8acbff68b413350a1b8b8ea6.tar.xz |
Betterer error message
-rw-r--r-- | paludis/repositories/e/ebuild/utils/unpaxinate.cc | 9 |
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; } |