Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg: messages improvements
Baptiste Daroussin committed 2 months ago
commit b21ebf98a20bb5c7adc2068a1fbdb290150f6d12
parent 4270506
16 files changed +65 -65
modified libpkg/backup_lib.c
@@ -137,7 +137,7 @@ backup_library(struct pkgdb *db, struct pkg *p, const char *path)

	if (mkdirat(p->rootfd, RELATIVE_PATH(ctx.backup_library_path), 0755) == -1) {
		if (!mkdirat_p(p->rootfd, RELATIVE_PATH(ctx.backup_library_path))) {
-
			pkg_emit_errno("Impossible to create the library backup "
+
			pkg_emit_errno("Unable to create the library backup "
			    "directory", ctx.backup_library_path);
			close(from);
			return;
@@ -146,7 +146,7 @@ backup_library(struct pkgdb *db, struct pkg *p, const char *path)
	backupdir = openat(p->rootfd, RELATIVE_PATH(ctx.backup_library_path),
	    O_DIRECTORY);
	if (backupdir == -1) {
-
		pkg_emit_error("Impossible to open the library backup "
+
		pkg_emit_error("Unable to open the library backup "
		    "directory %s", ctx.backup_library_path);
		goto out;
	}
@@ -159,7 +159,7 @@ backup_library(struct pkgdb *db, struct pkg *p, const char *path)
	unlinkat(backupdir, libname, 0);
	to = openat(backupdir, libname, O_EXCL|O_CREAT|O_WRONLY, 0644);
	if (to == -1) {
-
		pkg_emit_errno("Impossible to create the backup library", libname);
+
		pkg_emit_errno("Unable to create the backup library", libname);
		goto out;
	}

@@ -175,7 +175,7 @@ backup_library(struct pkgdb *db, struct pkg *p, const char *path)
	}

out:
-
	pkg_emit_errno("Fail to backup the library", libname);
+
	pkg_emit_errno("Failed to backup the library", libname);
	if (backupdir >= 0)
		close(backupdir);
	if (from >= 0)
modified libpkg/fetch_file.c
@@ -45,12 +45,12 @@ file_open(struct pkg_repo *repo, struct fetch_item *fi)
	if (len > 5)
		u += 5; /* file: */
	if (len < 8) {
-
		pkg_emit_error("Invalid url: %s'\n', "
+
		pkg_emit_error("Invalid URL: '%s', "
		    "file://<absolutepath> expected", fi->url);
		return (EPKG_FATAL);
	}
	if (strncmp(u, "//", 2) != 0) {
-
		pkg_emit_error("invalid url: '%s'\n", fi->url);
+
		pkg_emit_error("Invalid URL: '%s'", fi->url);
		return (EPKG_FATAL);
	}
	u+=2;
modified libpkg/fetch_libcurl.c
@@ -267,7 +267,7 @@ http_getmirrors(struct pkg_repo *r, struct curl_repodata *cr)
		url = curl_url();
		if (curl_url_set(url, CURLUPART_URL, line, 0)) {
			curl_url_cleanup(url);
-
			pkg_emit_error("Invalid mirror url: '%s'", line);
+
			pkg_emit_error("Invalid mirror URL: '%s'", line);
			continue;
		}
		m = xmalloc(sizeof(*m));
@@ -330,7 +330,7 @@ curl_open(struct pkg_repo *repo, struct fetch_item *fi __unused)
			urloff = 4;
		CURLUcode c = curl_url_set(cr->url, CURLUPART_URL, repo->url + urloff, 0);
		if (c) {
-
			pkg_emit_error("impossible to parse url: '%s'", repo->url);
+
			pkg_emit_error("Unable to parse URL: '%s'", repo->url);
			return (EPKG_FATAL);
		}

@@ -358,7 +358,7 @@ curl_open(struct pkg_repo *repo, struct fetch_item *fi __unused)
		cr->url = curl_url();
		CURLUcode c = curl_url_set(cr->url, CURLUPART_URL, repo->url, 0);
		if (c) {
-
			pkg_emit_error("impossible to parse url: '%s'", repo->url);
+
			pkg_emit_error("Unable to parse URL: '%s'", repo->url);
			return (EPKG_FATAL);
		}
		repo->http = http_getmirrors(repo, cr);
@@ -556,7 +556,7 @@ do_retry:
		fi->mtime = t;
	} else if (response_code != 304 && retcode != EPKG_FATAL &&
	    retcode != EPKG_CANCEL && retcode != EPKG_ENOENT) {
-
		pkg_emit_error("Impossible to get the value from Last-Modified"
+
		pkg_emit_error("Unable to get the value from Last-Modified"
		    " HTTP header");
		fi->mtime = 0;
	}
modified libpkg/lua.c
@@ -262,7 +262,7 @@ lua_pkg_copy(lua_State *L)
	if (!install_as_user && s1.st_flags != 0) {
		if (chflagsat(rootfd, RELATIVE_PATH(dst),
		    s1.st_flags, AT_SYMLINK_NOFOLLOW) == -1) {
-
			pkg_fatal_errno("Fail to chflags %s", dst);
+
			pkg_fatal_errno("Failed to chflags %s", dst);
			lua_pushinteger(L, -1);
			return (1);
		}
modified libpkg/lua_scripts.c
@@ -156,7 +156,7 @@ cleanup:
		killemall.rk_sig = SIGKILL;
		killemall.rk_flags = 0;
		if (procctl(P_PID, mypid, PROC_REAP_KILL, &killemall) != 0) {
-
			pkg_errno("%s", "Fail to kill all processes");
+
			pkg_errno("%s", "Failed to kill all processes");
		}
	}
	procctl(P_PID, mypid, PROC_REAP_RELEASE, NULL);
@@ -187,7 +187,7 @@ pkg_lua_script_from_ucl(struct pkg *pkg, const ucl_object_t *obj, pkg_lua_script

	while ((cur = ucl_iterate_object(obj, &it, true))) {
		if (ucl_object_type(cur) != UCL_STRING) {
-
			pkg_emit_error("lua scripts be strings");
+
			pkg_emit_error("lua scripts must be strings");
			return (EPKG_FATAL);
		}
		vec_push(&pkg->lua_scripts[type], xstrdup(ucl_object_tostring(cur)));
modified libpkg/pkg.c
@@ -319,7 +319,7 @@ pkg_set_s(struct pkg *pkg, pkg_attr attr, const char *str)
	case PKG_ATTR_FLATSIZE:
		i = strtoimax(str, &endptr, 10);
		if (endptr != NULL) {
-
			pkg_emit_error("Impossible to convert '%s' to int64_t",
+
			pkg_emit_error("Unable to convert '%s' to int64_t",
			    str);
			return (EPKG_FATAL);
		}
@@ -328,7 +328,7 @@ pkg_set_s(struct pkg *pkg, pkg_attr attr, const char *str)
	case PKG_ATTR_OLD_FLATSIZE:
		i = strtoimax(str, &endptr, 10);
		if (endptr != NULL) {
-
			pkg_emit_error("Impossible to convert '%s' to int64_t",
+
			pkg_emit_error("Unable to convert '%s' to int64_t",
			    str);
			return (EPKG_FATAL);
		}
@@ -337,7 +337,7 @@ pkg_set_s(struct pkg *pkg, pkg_attr attr, const char *str)
	case PKG_ATTR_PKGSIZE:
		i = strtoimax(str, &endptr, 10);
		if (endptr != NULL) {
-
			pkg_emit_error("Impossible to convert '%s' to int64_t",
+
			pkg_emit_error("Unable to convert '%s' to int64_t",
			    str);
			return (EPKG_FATAL);
		}
@@ -346,7 +346,7 @@ pkg_set_s(struct pkg *pkg, pkg_attr attr, const char *str)
	case PKG_ATTR_TIME:
		i = strtoimax(str, &endptr, 10);
		if (endptr != NULL) {
-
			pkg_emit_error("Impossible to convert '%s' to int64_t",
+
			pkg_emit_error("Unable to convert '%s' to int64_t",
			    str);
			return (EPKG_FATAL);
		}
modified libpkg/pkg_add.c
@@ -240,7 +240,7 @@ attempt_to_merge(int rootfd, struct pkg_config_file *rcf, struct pkg *local,
	newconf = xstring_new();
	if (merge_3way(lcf->content, localconf, rcf->content, newconf) != 0) {
		xstring_free(newconf);
-
		pkg_emit_error("Impossible to merge configuration file: %s", rcf->path);
+
		pkg_emit_error("Unable to merge configuration file: %s", rcf->path);
	} else {
		char *conf = xstring_get(newconf);
		rcf->newcontent = conf;
@@ -259,7 +259,7 @@ set_chflags(int fd, const char *path, u_long fflags)
	if (fflags == 0)
		return (EPKG_OK);
	if (chflagsat(fd, RELATIVE_PATH(path), fflags, AT_SYMLINK_NOFOLLOW) == -1) {
-
		pkg_fatal_errno("Fail to chflags %s", path);
+
		pkg_fatal_errno("Failed to chflags %s", path);
	}
#endif
	return (EPKG_OK);
@@ -275,7 +275,7 @@ set_attrsat(int fd, const char *path, mode_t perm, uid_t uid, gid_t gid,
	times[1] = *mts;
	if (utimensat(fd, RELATIVE_PATH(path), times,
	    AT_SYMLINK_NOFOLLOW) == -1 && errno != EOPNOTSUPP){
-
		pkg_fatal_errno("Fail to set time on %s", path);
+
		pkg_fatal_errno("Failed to set time on %s", path);
	}

	if (getenv("INSTALL_AS_USER") == NULL) {
@@ -283,11 +283,11 @@ set_attrsat(int fd, const char *path, mode_t perm, uid_t uid, gid_t gid,
				AT_SYMLINK_NOFOLLOW) == -1) {
			if (errno == ENOTSUP) {
				if (fchownat(fd, RELATIVE_PATH(path), uid, gid, 0) == -1) {
-
					pkg_fatal_errno("Fail to chown(fallback) %s", path);
+
					pkg_fatal_errno("Failed to chown(fallback) %s", path);
				}
			}
			else {
-
				pkg_fatal_errno("Fail to chown %s", path);
+
				pkg_fatal_errno("Failed to chown %s", path);
			}
		}
	}
@@ -307,16 +307,16 @@ set_attrsat(int fd, const char *path, mode_t perm, uid_t uid, gid_t gid,
			 * thus cosmetic, just skip them on these systems.
			 */
			if (fstatat(fd, RELATIVE_PATH(path), &st, AT_SYMLINK_NOFOLLOW) == -1) {
-
				pkg_fatal_errno("Fail to get file status %s", path);
+
				pkg_fatal_errno("Failed to get file status %s", path);
			}
			if (!S_ISLNK(st.st_mode)) {
				if (fchmodat(fd, RELATIVE_PATH(path), perm, 0) == -1) {
-
					pkg_fatal_errno("Fail to chmod(fallback) %s", path);
+
					pkg_fatal_errno("Failed to chmod(fallback) %s", path);
				}
			}
		}
		else {
-
			pkg_fatal_errno("Fail to chmod %s", path);
+
			pkg_fatal_errno("Failed to chmod %s", path);
		}
	}

@@ -413,29 +413,29 @@ create_dir(struct pkg_add_context *context, struct pkg_dir *d,
	if (fstatat(fd, RELATIVE_PATH(path), &st, 0) == -1) {
		if (errno != ENOENT) {
			close_tempdir(tmpdir);
-
			pkg_fatal_errno("Fail to stat directory %s", d->path);
+
			pkg_fatal_errno("Failed to stat directory %s", d->path);
		}
		/* path is a dangling symlink. */
		error = unlinkat(fd, RELATIVE_PATH(path), 0);
		if (error != 0) {
			close_tempdir(tmpdir);
-
			pkg_fatal_errno("Fail to unlink dangling symlink %s",
+
			pkg_fatal_errno("Failed to unlink dangling symlink %s",
			    d->path);
		}
		if (mkdirat(fd, RELATIVE_PATH(path), 0755) == -1) {
			if (tmpdir != NULL) {
				close_tempdir(tmpdir);
				pkg_fatal_errno(
-
				    "Fail to create directory %s/%s",
+
				    "Failed to create directory %s/%s",
				    tmpdir->temp, path);
			} else {
-
				pkg_fatal_errno("Fail to create directory %s",
+
				pkg_fatal_errno("Failed to create directory %s",
				    path);
			}
		}
		if (fstatat(fd, RELATIVE_PATH(path), &st, 0) == -1) {
			close_tempdir(tmpdir);
-
			pkg_fatal_errno("Fail to stat directory %s", d->path);
+
			pkg_fatal_errno("Failed to stat directory %s", d->path);
		}
	}

@@ -515,7 +515,7 @@ create_symlinks(struct pkg_add_context *context, struct pkg_file *f, const char
	}
	if (tmpdir == NULL) {
		if (f->temppath == NULL) {
-
			pkg_emit_error("Fail to create symlink %s: "
+
			pkg_emit_error("Failed to create symlink %s: "
			    "no temporary path", f->path);
			return (EPKG_FATAL);
		}
@@ -536,7 +536,7 @@ retry:
			goto retry;
		}

-
		pkg_fatal_errno("Fail to create symlink: %s", path);
+
		pkg_fatal_errno("Failed to create symlink: %s", path);
	}

	if (set_attrsat(fd, path, f->perm, f->uid, f->gid,
@@ -629,7 +629,7 @@ create_hardlink(struct pkg_add_context *context, struct pkg_file *f, const char
	if (tmpdir == NULL) {
		if (f->temppath == NULL) {
			close_tempdir(tmpdir);
-
			pkg_emit_error("Fail to create hardlink %s: "
+
			pkg_emit_error("Failed to create hardlink %s: "
			    "no temporary path", f->path);
			return (EPKG_FATAL);
		}
@@ -643,7 +643,7 @@ create_hardlink(struct pkg_add_context *context, struct pkg_file *f, const char
	if (tmphdir == NULL) {
		if (fh->temppath == NULL) {
			close_tempdir(tmpdir);
-
			pkg_emit_error("Fail to create hardlink %s -> %s: "
+
			pkg_emit_error("Failed to create hardlink %s -> %s: "
			    "no temporary path for source", f->path, path);
			return (EPKG_FATAL);
		}
@@ -669,7 +669,7 @@ retry:

		close_tempdir(tmpdir);
		close_tempdir(tmphdir);
-
		pkg_fatal_errno("Fail to create hardlink: %s <-> %s", pathfrom, pathto);
+
		pkg_fatal_errno("Failed to create hardlink: %s <-> %s", pathfrom, pathto);
	}
	close_tempdir(tmpdir);
	close_tempdir(tmphdir);
@@ -745,7 +745,7 @@ create_regfile(struct pkg_add_context *context, struct pkg_file *f, struct archi
	} else if (f->temppath != NULL) {
		fd = open_tempfile(context->rootfd, f->temppath, f->perm);
	} else {
-
		pkg_emit_error("Fail to create temporary file for %s", f->path);
+
		pkg_emit_error("Failed to create temporary file for %s", f->path);
		return (EPKG_FATAL);
	}
	if (fd == -2) {
@@ -756,9 +756,9 @@ create_regfile(struct pkg_add_context *context, struct pkg_file *f, struct archi
	if (fd == -1) {
		if (tmpdir != NULL) {
			close_tempdir(tmpdir);
-
			pkg_fatal_errno("Fail to create temporary file '%s/%s' for %s", tmpdir->name, f->path + tmpdir->len, f->path);
+
			pkg_fatal_errno("Failed to create temporary file '%s/%s' for %s", tmpdir->name, f->path + tmpdir->len, f->path);
		}
-
		pkg_fatal_errno("Fail to create temporary file for %s", f->path);
+
		pkg_fatal_errno("Failed to create temporary file for %s", f->path);
	}

	if (fromfd == -1) {
@@ -789,21 +789,21 @@ create_regfile(struct pkg_add_context *context, struct pkg_file *f, struct archi
			if (ftruncate(fd, archive_entry_size(ae)) == -1) {
				close(fd);
				close_tempdir(tmpdir);
-
				pkg_fatal_errno("Fail to truncate file: %s", f->path);
+
				pkg_fatal_errno("Failed to truncate file: %s", f->path);
			}
		}

		if (!f->config && archive_read_data_into_fd(a, fd) != ARCHIVE_OK) {
			close(fd);
			close_tempdir(tmpdir);
-
			pkg_emit_error("Fail to extract %s from package: %s",
+
			pkg_emit_error("Failed to extract %s from package: %s",
			    f->path, archive_error_string(a));
			return (EPKG_FATAL);
		}
	} else {
		while ((len = read(fromfd, buf, sizeof(buf))) > 0)
			if (write(fd, buf, len) == -1) {
-
				pkg_errno("Fail to write file: %s", f->temppath);
+
				pkg_errno("Failed to write file: %s", f->temppath);
			}
	}
	if (fd != -1)
@@ -992,7 +992,7 @@ pkg_extract_finalize(struct pkg *pkg, tempdirs_t *tempdirs)
			struct tempdir *t = tempdirs->d[i];
			if (renameat(pkg->rootfd, RELATIVE_PATH(t->temp),
			    pkg->rootfd, RELATIVE_PATH(t->name)) != 0) {
-
				pkg_fatal_errno("Fail to rename %s -> %s",
+
				pkg_fatal_errno("Failed to rename %s -> %s",
				    t->temp, t->name);
			}
			free(t);
@@ -1044,7 +1044,7 @@ pkg_extract_finalize(struct pkg *pkg, tempdirs_t *tempdirs)
			snprintf(pkgnew, sizeof(pkgnew), "%s.pkgnew", f->path);
			if (renameat(pkg->rootfd, RELATIVE_PATH(f->temppath),
			    pkg->rootfd, RELATIVE_PATH(pkgnew)) == -1) {
-
				pkg_fatal_errno("Fail to rename %s -> %s",
+
				pkg_fatal_errno("Failed to rename %s -> %s",
				    f->temppath, fto);
			}
			pkg_emit_notice("Cannot install %s, "
@@ -1639,14 +1639,14 @@ pkg_add_group(struct pkg *pkg)
	hidden_tempfile(temp, MAXPATHLEN, pkg->name);
	int fd = openat(gfd, temp, O_CREAT|O_EXCL|O_WRONLY, 0644);
	if (fd == -1) {
-
		pkg_emit_errno("impossible to create group file %s", pkg->name);
+
		pkg_emit_errno("Unable to create group file %s", pkg->name);
		return (EPKG_FATAL);
	}
	pkg_group_dump(fd, pkg);
	close(fd);
	if (renameat(gfd, temp, gfd, pkg->name) == -1) {
		unlinkat(gfd, temp, 0);
-
		pkg_emit_errno("impossible to create group file %s", pkg->name);
+
		pkg_emit_errno("Unable to create group file %s", pkg->name);
		return (EPKG_FATAL);
	}
	return (EPKG_OK);
@@ -1797,7 +1797,7 @@ pkg_add_fromdir(struct pkg *pkg, const char *src, struct pkgdb *db __unused)
			    sizeof(target))) == -1) {
				vec_free_and_free(&hardlinks, free);
				close(fromfd);
-
				pkg_fatal_errno("Impossible to read symlinks "
+
				pkg_fatal_errno("Unable to read symlinks "
				    "'%s'", f->path);
			}
			target[link_len] = '\0';
@@ -1810,7 +1810,7 @@ pkg_add_fromdir(struct pkg *pkg, const char *src, struct pkgdb *db __unused)
			    O_RDONLY)) == -1) {
				vec_free_and_free(&hardlinks, free);
				close(fromfd);
-
				pkg_fatal_errno("Impossible to open source file"
+
				pkg_fatal_errno("Unable to open source file"
				    " '%s'", RELATIVE_PATH(f->path));
			}
			path = NULL;
@@ -1934,7 +1934,7 @@ open_tempdir(struct pkg_add_context *context, const char *path)
		t = xcalloc(1, sizeof(*t));
		hidden_tempfile(t->temp, sizeof(t->temp), walk);
		if (mkdirat(rootfd, RELATIVE_PATH(t->temp), 0755) == -1) {
-
			pkg_errno("Fail to create temporary directory: %s", t->temp);
+
			pkg_errno("Failed to create temporary directory: %s", t->temp);
			free(t);
			return (NULL);
		}
@@ -1943,7 +1943,7 @@ open_tempdir(struct pkg_add_context *context, const char *path)
		t->len = strlen(t->name);
		t->fd = openat(rootfd, RELATIVE_PATH(t->temp), O_DIRECTORY|O_CLOEXEC);
		if (t->fd == -1) {
-
			pkg_errno("Fail to open directory %s", t->temp);
+
			pkg_errno("Failed to open directory %s", t->temp);
			free(t);
			return (NULL);
		}
modified libpkg/pkg_config.c
@@ -524,7 +524,7 @@ connect_evpipe(const char *evpipe) {
	if (S_ISFIFO(st.st_mode)) {
		flag |= O_NONBLOCK;
		if ((ctx.eventpipe = open(evpipe, flag)) == -1)
-
			pkg_emit_errno("open event pipe", evpipe);
+
			pkg_emit_errno("Open event pipe", evpipe);
		return;
	}

@@ -1232,7 +1232,7 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
	k = NULL;
	o = NULL;
	if (ctx.rootfd == -1 && (ctx.rootfd = open("/", O_DIRECTORY|O_RDONLY|O_CLOEXEC)) < 0) {
-
		pkg_emit_error("Impossible to open /");
+
		pkg_emit_error("Unable to open /");
		return (EPKG_FATAL);
	}

@@ -1880,7 +1880,7 @@ pkg_set_rootdir(const char *rootdir) {
		close(ctx.rootfd);

	if ((ctx.rootfd = open(rootdir, O_DIRECTORY|O_RDONLY|O_CLOEXEC)) < 0) {
-
		pkg_emit_error("Impossible to open %s", rootdir);
+
		pkg_emit_error("Unable to open %s", rootdir);
		return (EPKG_FATAL);
	}
	ctx.pkg_rootdir = rootdir;
modified libpkg/pkg_jobs.c
@@ -259,7 +259,7 @@ pkg_jobs_add(struct pkg_jobs *j, match_t match, char **argv, int argc)

	if (j->solved) {
		pkg_emit_error("The job has already been solved. "
-
		    "Impossible to append new elements");
+
		    "Unable to append new elements");
		return (EPKG_FATAL);
	}

modified libpkg/pkg_ports.c
@@ -829,7 +829,7 @@ external_keyword(struct plist *plist, char *keyword, char *line, struct file_att
	}
	ret = apply_keyword_file(o, plist, line, attr);
	if (ret != EPKG_OK) {
-
		pkg_emit_error("Fail to apply keyword '%s'", keyword);
+
		pkg_emit_error("Failed to apply keyword '%s'", keyword);
	}

	return (ret);
@@ -1247,12 +1247,12 @@ include_plist(struct plist *p, char *name, struct file_attr *a __unused)

	fd = openat(p->plistdirfd, name, O_RDONLY);
	if (fd == -1) {
-
		pkg_emit_errno("Inpossible to include", name);
+
		pkg_emit_errno("Unable to include", name);
		return (EPKG_FATAL);
	}
	f = fdopen(fd, "r");
	if (f == NULL) {
-
		pkg_emit_errno("Inpossible to include", name);
+
		pkg_emit_errno("Unable to include", name);
		close(fd);
		return (EPKG_FATAL);
	}
@@ -1278,7 +1278,7 @@ ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)

	pplist->plistdirfd = open_directory_of(plist);
	if (pplist->plistdirfd == -1) {
-
		pkg_emit_error("impossible to open the directory where the plist is: %s", plist);
+
		pkg_emit_error("Unable to open the directory where the plist is: %s", plist);
		plist_free(pplist);
		return (EPKG_FATAL);
	}
modified libpkg/scripts.c
@@ -262,7 +262,7 @@ cleanup:
		killemall.rk_flags = 0;
		if (procctl(P_PID, mypid, PROC_REAP_KILL, &killemall) != 0) {
			if (errno != ESRCH || killemall.rk_killed != 0 ) {
-
				pkg_errno("%s", "Fail to kill all processes");
+
				pkg_errno("%s", "Failed to kill all processes");
			}
		}
	}
modified libpkg/utils.c
@@ -850,7 +850,7 @@ mkdirat_p(int fd, const char *path)
				strlcat(pathdone, "/", sizeof(pathdone));
				continue;
			}
-
			pkg_errno("Fail to create /%s", pathdone);
+
			pkg_errno("Failed to create /%s", pathdone);
			return (false);
		}
		strlcat(pathdone, "/", sizeof(pathdone));
modified src/clean.c
@@ -190,7 +190,7 @@ recursive_analysis(int fd, struct pkgdb *db, const char *dir,
	d = fdopendir(tmpfd);
	if (d == NULL) {
		close(tmpfd);
-
		warnx("Impossible to open the directory %s", dir);
+
		warnx("Unable to open the directory %s", dir);
		return (0);
	}

@@ -203,7 +203,7 @@ recursive_analysis(int fd, struct pkgdb *db, const char *dir,
			nbfiles++;
			newfd = openat(fd, ent->d_name, O_DIRECTORY|O_CLOEXEC, 0);
			if (newfd == -1) {
-
				warnx("Impossible to open the directory %s",
+
				warnx("Unable to open the directory %s",
				    path);
				continue;
			}
@@ -305,7 +305,7 @@ exec_clean(int argc, char **argv)
	cachedir = pkg_get_cachedir();
	cachefd = pkg_get_cachedirfd();
	if (cachefd == -1) {
-
		warn("Impossible to open %s", cachedir);
+
		warn("Unable to open %s", cachedir);
		return (errno == ENOENT ? EXIT_SUCCESS : EXIT_FAILURE);
	}

modified src/register.c
@@ -113,7 +113,7 @@ exec_register(int argc, char **argv)
			location = optarg;
			break;
		default:
-
			warnx("Unrecognised option -%c\n", ch);
+
			warnx("Unrecognised option -%c", ch);
			usage_register();
			pkg_free(pkg);
			return (EXIT_FAILURE);
modified src/set.c
@@ -214,7 +214,7 @@ exec_set(int argc, char **argv)
		depfield = PKG_SET_DEPORIGIN;
	}
	if (partial && ((sets & (NAME|ORIGIN)) == 0)) {
-
		warnx("-p requires either -o or -n option)");
+
		warnx("-p requires either -o or -n option");
		usage_set();
		return (EXIT_FAILURE);
	}
modified src/ssh.c
@@ -66,7 +66,7 @@ exec_ssh(int argc, char **argv __unused)
		restricted = "/";

	if ((fd = open(restricted, O_DIRECTORY|O_RDONLY|O_CLOEXEC)) < 0) {
-
		warn("Impossible to open the restricted directory");
+
		warn("Unable to open the restricted directory");
		return (EXIT_FAILURE);
	}