[darwinbuild-changes] [835] branches/PR-7872907/darwinup/Depot.cpp

source_changes at macosforge.org source_changes at macosforge.org
Thu Jun 10 10:46:41 PDT 2010


Revision: 835
          http://trac.macosforge.org/projects/darwinbuild/changeset/835
Author:   wsiegrist at apple.com
Date:     2010-06-10 10:46:38 -0700 (Thu, 10 Jun 2010)
Log Message:
-----------
Always print success message for rename command.

Modified Paths:
--------------
    branches/PR-7872907/darwinup/Depot.cpp

Modified: branches/PR-7872907/darwinup/Depot.cpp
===================================================================
--- branches/PR-7872907/darwinup/Depot.cpp	2010-06-10 17:38:00 UTC (rev 834)
+++ branches/PR-7872907/darwinup/Depot.cpp	2010-06-10 17:46:38 UTC (rev 835)
@@ -1408,7 +1408,6 @@
 int Depot::rename_archive(const char* archspec, const char* name) {
 	extern uint32_t verbosity;
 	int res = 0;
-	char uuid[37];
 	
 	if (strncasecmp(archspec, "all", 3) == 0 ||
 		strncasecmp(archspec, "superseded", 10) == 0) {
@@ -1422,10 +1421,13 @@
 		fprintf(stdout, "Archive not found: %s\n", archspec);
 		return -1;
 	}
+	
+	char uuid[37];
+	uuid_unparse_upper(archive->uuid(), uuid);
 	if (verbosity & VERBOSE_DEBUG) {
-		uuid_unparse_upper(archive->uuid(), uuid);
 		fprintf(stdout, "Found archive: %s\n", uuid);
 	}
+
 	if (!name || strlen(name) == 0) {
 		fprintf(stderr, "Error: invalid name: '%s'\n", name);
 		return -3;
@@ -1442,9 +1444,8 @@
 							   archive->info(),
 							   archive->build());
 
-	if (res == 0 && (verbosity & VERBOSE_DEBUG)) {
-		fprintf(stdout, "Renamed archive %s to '%s'.\n", uuid, archive->name());
-	}
+	if (res == 0) fprintf(stdout, "Renamed archive %s to '%s'.\n", 
+						  uuid, archive->name());
 	
 	delete archive;
 	return res;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20100610/32a565d0/attachment.html>


More information about the darwinbuild-changes mailing list