diff options
author | sobomax <sobomax@FreeBSD.org> | 2001-08-02 12:38:29 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2001-08-02 12:38:29 +0000 |
commit | fd136a35b7dd890f7e0311529a85fb68a1a77d13 (patch) | |
tree | e0c4b81d815e2f6178ad7197381d4118747ff56d | |
parent | a9479014c3acf16862bef0f26b143ab5a3e45eeb (diff) | |
download | FreeBSD-src-fd136a35b7dd890f7e0311529a85fb68a1a77d13.zip FreeBSD-src-fd136a35b7dd890f7e0311529a85fb68a1a77d13.tar.gz |
Usability tweak:
Use '' quotes instead of `' to delimit names of files and packages in
warning and error messages, because it is easier to cut-n-paste name in
question that way (single click) without confusing the shell. And yes,
I know that it is less eye-candy...
MFC after: 1 month
-rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 26 | ||||
-rw-r--r-- | usr.sbin/pkg_install/delete/perform.c | 18 | ||||
-rw-r--r-- | usr.sbin/pkg_install/info/perform.c | 2 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/plist.c | 14 |
4 files changed, 30 insertions, 30 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 3f981ad..dfa6269 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -101,7 +101,7 @@ pkg_do(char *pkg) /* Is it an ftp://foo.bar.baz/file.tgz specification? */ if (isURL(pkg)) { if (!(Home = fileGetURL(NULL, pkg))) { - warnx("unable to fetch `%s' by URL", pkg); + warnx("unable to fetch '%s' by URL", pkg); return 1; } where_to = Home; @@ -109,7 +109,7 @@ pkg_do(char *pkg) cfile = fopen(CONTENTS_FNAME, "r"); if (!cfile) { warnx( - "unable to open table of contents file `%s' - not a package?", + "unable to open table of contents file '%s' - not a package?", CONTENTS_FNAME); goto bomb; } @@ -142,14 +142,14 @@ pkg_do(char *pkg) setenv("_TOP", Home, 1); if (unpack(pkg_fullname, extract)) { warnx( - "unable to extract table of contents file from `%s' - not a package?", + "unable to extract table of contents file from '%s' - not a package?", pkg_fullname); goto bomb; } cfile = fopen(CONTENTS_FNAME, "r"); if (!cfile) { warnx( - "unable to open table of contents file `%s' - not a package?", + "unable to open table of contents file '%s' - not a package?", CONTENTS_FNAME); goto bomb; } @@ -167,7 +167,7 @@ pkg_do(char *pkg) printf("Desired prefix of %s does not exist, creating..\n", p->name); vsystem("mkdir -p %s", p->name); if (chdir(p->name) == -1) { - warn("unable to change directory to `%s'", p->name); + warn("unable to change directory to '%s'", p->name); goto bomb; } } @@ -176,7 +176,7 @@ pkg_do(char *pkg) } else { warnx( - "no prefix specified in `%s' - this is a bad package!", + "no prefix specified in '%s' - this is a bad package!", pkg_fullname); goto bomb; } @@ -203,7 +203,7 @@ pkg_do(char *pkg) /* Finally unpack the whole mess */ if (unpack(pkg_fullname, NULL)) { - warnx("unable to extract `%s'!", pkg_fullname); + warnx("unable to extract '%s'!", pkg_fullname); goto bomb; } } @@ -236,7 +236,7 @@ pkg_do(char *pkg) /* See if we're already registered */ sprintf(LogDir, "%s/%s", (tmp = getenv(PKG_DBDIR)) ? tmp : DEF_LOG_DIR, PkgName); if (isdir(LogDir) && !Force) { - warnx("package `%s' already recorded as installed", PkgName); + warnx("package '%s' already recorded as installed", PkgName); code = 1; goto success; /* close enough for government work */ } @@ -246,7 +246,7 @@ pkg_do(char *pkg) if (p->type != PLIST_PKGDEP) continue; if (Verbose) - printf("Package `%s' depends on `%s'.\n", PkgName, p->name); + printf("Package '%s' depends on '%s'.\n", PkgName, p->name); if (vsystem("pkg_info -e %s", p->name)) { char path[FILENAME_MAX], *cp = NULL; @@ -261,7 +261,7 @@ pkg_do(char *pkg) if (Verbose) printf("Loading it from %s.\n", cp); if (vsystem("pkg_add %s'%s'", Verbose ? "-v " : "", cp)) { - warnx("autoload of dependency `%s' failed%s", + warnx("autoload of dependency '%s' failed%s", cp, Force ? " (proceeding anyway)" : "!"); if (!Force) ++code; @@ -284,13 +284,13 @@ pkg_do(char *pkg) ++code; } else if (vsystem("(pwd; cat +CONTENTS) | pkg_add %s-S", Verbose ? "-v " : "")) { - warnx("pkg_add of dependency `%s' failed%s", + warnx("pkg_add of dependency '%s' failed%s", p->name, Force ? " (proceeding anyway)" : "!"); if (!Force) ++code; } else if (Verbose) - printf("\t`%s' loaded successfully.\n", p->name); + printf("\t'%s' loaded successfully.\n", p->name); /* Nuke the temporary playpen */ leave_playpen(); } @@ -439,7 +439,7 @@ pkg_do(char *pkg) if (p->type != PLIST_PKGDEP) continue; if (Verbose) - printf("Attempting to record dependency on package `%s'\n", p->name); + printf("Attempting to record dependency on package '%s'\n", p->name); sprintf(contents, "%s/%s/%s", (tmp = getenv(PKG_DBDIR)) ? tmp : DEF_LOG_DIR, basename_of(p->name), REQUIRED_BY_FNAME); cfile = fopen(contents, "a"); diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c index 3a9ec87..4469299 100644 --- a/usr.sbin/pkg_install/delete/perform.c +++ b/usr.sbin/pkg_install/delete/perform.c @@ -130,7 +130,7 @@ pkg_do(char *pkg) if (!isemptyfile(REQUIRED_BY_FNAME)) { char buf[512]; - warnx("package `%s' is required by these other packages\n" + warnx("package '%s' is required by these other packages\n" "and may not be deinstalled%s:", pkg, Force ? " (but I'll delete it anyway)" : "" ); cfile = fopen(REQUIRED_BY_FNAME, "r"); @@ -139,7 +139,7 @@ pkg_do(char *pkg) fprintf(stderr, "%s", buf); fclose(cfile); } else - warnx("cannot open requirements file `%s'", REQUIRED_BY_FNAME); + warnx("cannot open requirements file '%s'", REQUIRED_BY_FNAME); if (!Force) return 1; } @@ -258,7 +258,7 @@ pkg_do(char *pkg) if (p->type != PLIST_PKGDEP) continue; if (Verbose) - printf("Attempting to remove dependency on package `%s'\n", p->name); + printf("Attempting to remove dependency on package '%s'\n", p->name); if (!Fake) undepend(p, pkg); } @@ -295,21 +295,21 @@ undepend(PackingList p, char *pkgname) p->name, REQUIRED_BY_FNAME); fp = fopen(fname, "r"); if (fp == NULL) { - warnx("couldn't open dependency file `%s'", fname); + warnx("couldn't open dependency file '%s'", fname); return; } sprintf(ftmp, "%s.XXXXXX", fname); s = mkstemp(ftmp); if (s == -1) { fclose(fp); - warnx("couldn't open temp file `%s'", ftmp); + warnx("couldn't open temp file '%s'", ftmp); return; } fpwr = fdopen(s, "w"); if (fpwr == NULL) { close(s); fclose(fp); - warnx("couldn't fdopen temp file `%s'", ftmp); + warnx("couldn't fdopen temp file '%s'", ftmp); remove(ftmp); return; } @@ -321,18 +321,18 @@ undepend(PackingList p, char *pkgname) } (void) fclose(fp); if (fchmod(s, 0644) == FAIL) { - warnx("error changing permission of temp file `%s'", ftmp); + warnx("error changing permission of temp file '%s'", ftmp); fclose(fpwr); remove(ftmp); return; } if (fclose(fpwr) == EOF) { - warnx("error closing temp file `%s'", ftmp); + warnx("error closing temp file '%s'", ftmp); remove(ftmp); return; } if (rename(ftmp, fname) == -1) - warnx("error renaming `%s' to `%s'", ftmp, fname); + warnx("error renaming '%s' to '%s'", ftmp, fname); remove(ftmp); /* just in case */ return; } diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c index be9cca9..2efae9c 100644 --- a/usr.sbin/pkg_install/info/perform.c +++ b/usr.sbin/pkg_install/info/perform.c @@ -150,7 +150,7 @@ pkg_do(char *pkg) sprintf(log_dir, "%s/%s", (tmp = getenv(PKG_DBDIR)) ? tmp : DEF_LOG_DIR, pkg); if (!fexists(log_dir)) { - warnx("can't find package `%s' installed or in a file!", pkg); + warnx("can't find package '%s' installed or in a file!", pkg); return 1; } if (chdir(log_dir) == FAIL) { diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index 40438d8..d7ee821 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -380,9 +380,9 @@ delete_package(Boolean ign_err, Boolean nukedirs, Package *pkg) case PLIST_UNEXEC: format_cmd(tmp, p->name, Where, last_file); if (Verbose) - printf("Execute `%s'\n", tmp); + printf("Execute '%s'\n", tmp); if (!Fake && system(tmp)) { - warnx("unexec command for `%s' failed", tmp); + warnx("unexec command for '%s' failed", tmp); fail = FAIL; } break; @@ -391,7 +391,7 @@ delete_package(Boolean ign_err, Boolean nukedirs, Package *pkg) last_file = p->name; sprintf(tmp, "%s/%s", Where, p->name); if (isdir(tmp) && fexists(tmp) && !issymlink(tmp)) { - warnx("cannot delete specified file `%s' - it is a directory!\n" + warnx("cannot delete specified file '%s' - it is a directory!\n" "this packing list is incorrect - ignoring delete request", tmp); } else { @@ -401,7 +401,7 @@ delete_package(Boolean ign_err, Boolean nukedirs, Package *pkg) if ((cp = MD5File(tmp, buf)) != NULL) { /* Mismatch? */ if (strcmp(cp, p->next->name + 4)) { - warnx("`%s' fails original MD5 checksum - %s", + warnx("'%s' fails original MD5 checksum - %s", tmp, Force ? "deleted anyway." : "not deleted."); if (!Force) { fail = FAIL; @@ -433,7 +433,7 @@ delete_package(Boolean ign_err, Boolean nukedirs, Package *pkg) case PLIST_DIR_RM: sprintf(tmp, "%s/%s", Where, p->name); if (!isdir(tmp) && fexists(tmp)) { - warnx("cannot delete specified directory `%s' - it is a file!\n" + warnx("cannot delete specified directory '%s' - it is a file!\n" "this packing list is incorrect - ignoring delete request", tmp); } else { @@ -471,7 +471,7 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs) cp1 = cp2 = dir; if (!fexists(dir)) { if (!ign_err) - warnx("%s `%s' doesn't really exist", + warnx("%s '%s' doesn't really exist", isdir(dir) ? "directory" : "file", dir); return !ign_err; } @@ -497,7 +497,7 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs) return 0; if (RMDIR(dir) && !ign_err) { if (!fexists(dir)) - warnx("directory `%s' doesn't really exist", dir); + warnx("directory '%s' doesn't really exist", dir); else return 1; } |