mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
Fix spelling errors using 'codespell' tool
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
597286eb25
commit
769facca22
2
NEWS
2
NEWS
@ -912,7 +912,7 @@ VERSION DESCRIPTION
|
|||||||
- HTTP/1.1 support
|
- HTTP/1.1 support
|
||||||
- an improved progress bar with transfer rates and ETA
|
- an improved progress bar with transfer rates and ETA
|
||||||
- cleaned up warning output a bit
|
- cleaned up warning output a bit
|
||||||
2.7.2 - Supressed "No such file" messages during stripping
|
2.7.2 - Suppressed "No such file" messages during stripping
|
||||||
- Removed extra newlines in /var/log/pacman.log
|
- Removed extra newlines in /var/log/pacman.log
|
||||||
- Added a --noextract option to makepkg to skip source extraction
|
- Added a --noextract option to makepkg to skip source extraction
|
||||||
2.7.1 - Fixed a couple obscure segfaults
|
2.7.1 - Fixed a couple obscure segfaults
|
||||||
|
@ -314,7 +314,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
|
|||||||
hash_local = alpm_compute_md5sum(filename);
|
hash_local = alpm_compute_md5sum(filename);
|
||||||
hash_pkg = alpm_compute_md5sum(checkfile);
|
hash_pkg = alpm_compute_md5sum(checkfile);
|
||||||
|
|
||||||
/* update the md5 hash in newpkg's backup (it will be the new orginal) */
|
/* update the md5 hash in newpkg's backup (it will be the new original) */
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
for(i = alpm_pkg_get_backup(newpkg); i; i = i->next) {
|
for(i = alpm_pkg_get_backup(newpkg); i; i = i->next) {
|
||||||
alpm_backup_t *backup = i->data;
|
alpm_backup_t *backup = i->data;
|
||||||
|
@ -390,7 +390,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
|
|||||||
|
|
||||||
/* If full is false, only read through the archive until we find our needed
|
/* If full is false, only read through the archive until we find our needed
|
||||||
* metadata. If it is true, read through the entire archive, which serves
|
* metadata. If it is true, read through the entire archive, which serves
|
||||||
* as a verfication of integrity and allows us to create the filelist. */
|
* as a verification of integrity and allows us to create the filelist. */
|
||||||
while((ret = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
|
while((ret = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
|
||||||
const char *entry_name = archive_entry_pathname(entry);
|
const char *entry_name = archive_entry_pathname(entry);
|
||||||
|
|
||||||
@ -460,7 +460,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret != ARCHIVE_EOF && ret != ARCHIVE_OK) { /* An error occured */
|
if(ret != ARCHIVE_EOF && ret != ARCHIVE_OK) { /* An error occurred */
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("error while reading package %s: %s\n"),
|
_alpm_log(handle, ALPM_LOG_ERROR, _("error while reading package %s: %s\n"),
|
||||||
pkgfile, archive_error_string(archive));
|
pkgfile, archive_error_string(archive));
|
||||||
handle->pm_errno = ALPM_ERR_LIBARCHIVE;
|
handle->pm_errno = ALPM_ERR_LIBARCHIVE;
|
||||||
|
@ -488,7 +488,7 @@ alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep)
|
|||||||
|
|
||||||
/* These parameters are messy. We check if this package, given a list of
|
/* These parameters are messy. We check if this package, given a list of
|
||||||
* targets and a db is safe to remove. We do NOT remove it if it is in the
|
* targets and a db is safe to remove. We do NOT remove it if it is in the
|
||||||
* target list, or if if the package was explictly installed and
|
* target list, or if if the package was explicitly installed and
|
||||||
* include_explicit == 0 */
|
* include_explicit == 0 */
|
||||||
static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg,
|
static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg,
|
||||||
alpm_list_t *targets, int include_explicit)
|
alpm_list_t *targets, int include_explicit)
|
||||||
|
@ -105,7 +105,7 @@ static alpm_list_t *list_sigsum(gpgme_sigsum_t sigsum)
|
|||||||
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_CRL_TOO_OLD, "crl too old");
|
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_CRL_TOO_OLD, "crl too old");
|
||||||
/* A policy was not met. */
|
/* A policy was not met. */
|
||||||
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_BAD_POLICY, "bad policy");
|
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_BAD_POLICY, "bad policy");
|
||||||
/* A system error occured. */
|
/* A system error occurred. */
|
||||||
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_SYS_ERROR, "sys error");
|
sigsum_test_bit(sigsum, &summary, GPGME_SIGSUM_SYS_ERROR, "sys error");
|
||||||
/* Fallback case */
|
/* Fallback case */
|
||||||
if(!sigsum) {
|
if(!sigsum) {
|
||||||
|
@ -527,7 +527,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[])
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fork- parent and child each have seperate code blocks below */
|
/* fork- parent and child each have separate code blocks below */
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if(pid == -1) {
|
if(pid == -1) {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("could not fork a new process (%s)\n"), strerror(errno));
|
_alpm_log(handle, ALPM_LOG_ERROR, _("could not fork a new process (%s)\n"), strerror(errno));
|
||||||
@ -677,7 +677,7 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check the alpm cachedirs for existance and find a writable one.
|
/** Check the alpm cachedirs for existence and find a writable one.
|
||||||
* If no valid cache directory can be found, use /tmp.
|
* If no valid cache directory can be found, use /tmp.
|
||||||
* @param handle the context handle
|
* @param handle the context handle
|
||||||
* @return pointer to a writable cache directory.
|
* @return pointer to a writable cache directory.
|
||||||
@ -1251,7 +1251,7 @@ int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int a
|
|||||||
|
|
||||||
/** Checks whether a string matches a shell wildcard pattern.
|
/** Checks whether a string matches a shell wildcard pattern.
|
||||||
* Wrapper around fnmatch.
|
* Wrapper around fnmatch.
|
||||||
* @param pattern pattern to match aganist
|
* @param pattern pattern to match against
|
||||||
* @param string string to check against pattern
|
* @param string string to check against pattern
|
||||||
* @return 0 if string matches pattern, non-zero if they don't match and on
|
* @return 0 if string matches pattern, non-zero if they don't match and on
|
||||||
* error
|
* error
|
||||||
|
@ -53,7 +53,7 @@ fi[]dnl
|
|||||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||||
#
|
#
|
||||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
# only at the first occurence in configure.ac, so if the first place
|
# only at the first occurrence in configure.ac, so if the first place
|
||||||
# it's called might be skipped (such as if it is within an "if", you
|
# it's called might be skipped (such as if it is within an "if", you
|
||||||
# have to call PKG_CHECK_EXISTS manually
|
# have to call PKG_CHECK_EXISTS manually
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
@ -17,7 +17,7 @@ the short opts, any number of valid long opts may be be passed. The end
|
|||||||
of the options delimiter must then be added, followed by the user arguments
|
of the options delimiter must then be added, followed by the user arguments
|
||||||
to the calling program.
|
to the calling program.
|
||||||
|
|
||||||
Reccommended Usage:
|
Recommended Usage:
|
||||||
OPT_SHORT='fb:z'
|
OPT_SHORT='fb:z'
|
||||||
OPT_LONG=('foo' 'bar:' 'baz')
|
OPT_LONG=('foo' 'bar:' 'baz')
|
||||||
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
|
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
|
||||||
|
@ -519,7 +519,7 @@ static int _parse_options(const char *key, char *value,
|
|||||||
char *endptr;
|
char *endptr;
|
||||||
const char *oldlocale;
|
const char *oldlocale;
|
||||||
|
|
||||||
/* set the locale to 'C' for consistant decimal parsing (0.7 and never
|
/* set the locale to 'C' for consistent decimal parsing (0.7 and never
|
||||||
* 0,7) from config files, then restore old setting when we are done */
|
* 0,7) from config files, then restore old setting when we are done */
|
||||||
oldlocale = setlocale(LC_NUMERIC, NULL);
|
oldlocale = setlocale(LC_NUMERIC, NULL);
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
@ -636,7 +636,7 @@ static int _add_mirror(alpm_db_t *db, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets up libalpm global stuff in one go. Called after the command line
|
/** Sets up libalpm global stuff in one go. Called after the command line
|
||||||
* and inital config file parsing. Once this is complete, we can see if any
|
* and initial config file parsing. Once this is complete, we can see if any
|
||||||
* paths were defined. If a rootdir was defined and nothing else, we want all
|
* paths were defined. If a rootdir was defined and nothing else, we want all
|
||||||
* of our paths to live under the rootdir that was specified. Safe to call
|
* of our paths to live under the rootdir that was specified. Safe to call
|
||||||
* multiple times (will only do anything the first time).
|
* multiple times (will only do anything the first time).
|
||||||
|
@ -287,7 +287,7 @@ static ssize_t xwrite(int fd, const void *buf, size_t count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Catches thrown signals. Performs necessary cleanup to ensure database is
|
/** Catches thrown signals. Performs necessary cleanup to ensure database is
|
||||||
* in a consistant state.
|
* in a consistent state.
|
||||||
* @param signum the thrown signal
|
* @param signum the thrown signal
|
||||||
*/
|
*/
|
||||||
static void handler(int signum)
|
static void handler(int signum)
|
||||||
@ -312,7 +312,7 @@ static void handler(int signum)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* SIGINT: no commiting transaction, release it now and then exit pacman
|
/* SIGINT: no committing transaction, release it now and then exit pacman
|
||||||
* SIGHUP, SIGTERM: release no matter what */
|
* SIGHUP, SIGTERM: release no matter what */
|
||||||
alpm_trans_release(config->handle);
|
alpm_trans_release(config->handle);
|
||||||
/* output a newline to be sure we clear any line we may be on */
|
/* output a newline to be sure we clear any line we may be on */
|
||||||
|
@ -314,7 +314,7 @@ size_t strtrim(char *str)
|
|||||||
return end - pch;
|
return end - pch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Replace all occurances of 'needle' with 'replace' in 'str', returning
|
/* Replace all occurrences of 'needle' with 'replace' in 'str', returning
|
||||||
* a new string (must be free'd) */
|
* a new string (must be free'd) */
|
||||||
char *strreplace(const char *str, const char *needle, const char *replace)
|
char *strreplace(const char *str, const char *needle, const char *replace)
|
||||||
{
|
{
|
||||||
@ -336,11 +336,11 @@ char *strreplace(const char *str, const char *needle, const char *replace)
|
|||||||
q = strstr(p, needle);
|
q = strstr(p, needle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no occurences of needle found */
|
/* no occurrences of needle found */
|
||||||
if(!list) {
|
if(!list) {
|
||||||
return strdup(str);
|
return strdup(str);
|
||||||
}
|
}
|
||||||
/* size of new string = size of old string + "number of occurences of needle"
|
/* size of new string = size of old string + "number of occurrences of needle"
|
||||||
* x "size difference between replace and needle" */
|
* x "size difference between replace and needle" */
|
||||||
newsz = strlen(str) + 1 +
|
newsz = strlen(str) + 1 +
|
||||||
alpm_list_count(list) * (replacesz - needlesz);
|
alpm_list_count(list) * (replacesz - needlesz);
|
||||||
@ -354,7 +354,7 @@ char *strreplace(const char *str, const char *needle, const char *replace)
|
|||||||
for(i = list; i; i = alpm_list_next(i)) {
|
for(i = list; i; i = alpm_list_next(i)) {
|
||||||
q = i->data;
|
q = i->data;
|
||||||
if(q > p) {
|
if(q > p) {
|
||||||
/* add chars between this occurence and last occurence, if any */
|
/* add chars between this occurrence and last occurrence, if any */
|
||||||
memcpy(newp, p, (size_t)(q - p));
|
memcpy(newp, p, (size_t)(q - p));
|
||||||
newp += q - p;
|
newp += q - p;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ parse '-p PKGBUILD --' 3 -pPKGBUILD
|
|||||||
# valid shortopts as a long opt
|
# valid shortopts as a long opt
|
||||||
parse '--' 1 --sir
|
parse '--' 1 --sir
|
||||||
|
|
||||||
# long opt wiht no optarg
|
# long opt with no optarg
|
||||||
parse '--log --' 2 --log
|
parse '--log --' 2 --log
|
||||||
|
|
||||||
# long opt with missing optarg
|
# long opt with missing optarg
|
||||||
|
Loading…
Reference in New Issue
Block a user