[darwinbuild-changes] [779] branches/PR-7748469/darwinup/Depot.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Sat Mar 13 18:35:52 PST 2010
Revision: 779
http://trac.macosforge.org/projects/darwinbuild/changeset/779
Author: wsiegrist at apple.com
Date: 2010-03-13 18:35:50 -0800 (Sat, 13 Mar 2010)
Log Message:
-----------
Send regular output to stdout instead of stderr. Add a success message to install subcommand.
Modified Paths:
--------------
branches/PR-7748469/darwinup/Depot.cpp
Modified: branches/PR-7748469/darwinup/Depot.cpp
===================================================================
--- branches/PR-7748469/darwinup/Depot.cpp 2010-03-14 02:17:48 UTC (rev 778)
+++ branches/PR-7748469/darwinup/Depot.cpp 2010-03-14 02:35:50 UTC (rev 779)
@@ -145,7 +145,7 @@
if (writable) {
uid_t uid = getuid();
if (uid) {
- fprintf(stderr, "You must be root to perform that operation.\n");
+ fprintf(stdout, "You must be root to perform that operation.\n");
exit(3);
}
res = this->create_storage();
@@ -554,7 +554,7 @@
}
}
- fprintf(stderr, "%c %s\n", state, file->path());
+ fprintf(stdout, "%c %s\n", state, file->path());
if (!dryrun) res = this->insert(archive, file);
assert(res == 0);
if (preceding && preceding != actual) delete preceding;
@@ -643,6 +643,8 @@
if (archive) {
res = this->install(archive);
if (res == 0) {
+ fprintf(stdout, "Installed archive: %llu %s \n",
+ archive->serial(), archive->name());
uuid_unparse_upper(archive->uuid(), uuid);
fprintf(stdout, "%s\n", uuid);
} else {
@@ -652,12 +654,12 @@
fprintf(stderr, "Error: Unable to rollback installation. "
"Your system is in an inconsistent state! File a bug!\n");
} else {
- fprintf(stderr, "Rollback successful.\n");
+ fprintf(stdout, "Rollback successful.\n");
}
res = 1;
}
} else {
- fprintf(stderr, "Archive not found: %s\n", path);
+ fprintf(stdout, "Archive not found: %s\n", path);
}
return res;
@@ -890,7 +892,7 @@
}
}
- fprintf(stderr, "%c %s\n", state, file->path());
+ fprintf(stdout, "%c %s\n", state, file->path());
if (res != 0) fprintf(stderr, "%s:%d: uninstall failed: %s\n",
__FILE__, __LINE__, file->path());
@@ -1338,7 +1340,7 @@
fprintf(stderr, "Error: unknown command given to dispatch_command.\n");
}
if (res != 0) {
- fprintf(stderr, "An error occurred.\n");
+ fprintf(stdout, "An error occurred.\n");
}
return res;
}
@@ -1363,13 +1365,13 @@
for (size_t i = 0; i < count; i++) {
if (!list[i]) {
- fprintf(stderr, "Archive not found: %s\n", arg);
+ fprintf(stdout, "Archive not found: %s\n", arg);
return -1;
}
if (verbosity & VERBOSE_DEBUG) {
char uuid[37];
uuid_unparse_upper(list[i]->uuid(), uuid);
- fprintf(stderr, "Found archive: %s\n", uuid);
+ fprintf(stdout, "Found archive: %s\n", uuid);
}
res = this->dispatch_command(list[i], command);
delete list[i];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20100313/6d68bd0f/attachment.html>
More information about the darwinbuild-changes
mailing list