aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 14:09:57 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 14:11:30 +0000
commitaa99650677bdcb8b8acbff68b413350a1b8b8ea6 (patch)
treec306717041d3a27ef57354df343c5d4736ceea76
parente0ef0b7678fd7c9fa970313b53e0d99d8732d133 (diff)
downloadpaludis-aa99650677bdcb8b8acbff68b413350a1b8b8ea6.tar.gz
paludis-aa99650677bdcb8b8acbff68b413350a1b8b8ea6.tar.xz
Betterer error message
-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 a246aeb..fb45618 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;
}