mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-13 12:55:08 -05:00
* has_archname additions
* additional newline for search output, as suggested on the forums
This commit is contained in:
parent
7d6161ccc3
commit
74e780f25d
@ -222,11 +222,11 @@ int split_pkgname(char *target, char *name, char *version)
|
|||||||
strncpy(tmp, p, 512);
|
strncpy(tmp, p, 512);
|
||||||
/* trim file extension (if any) */
|
/* trim file extension (if any) */
|
||||||
if((p = strstr(tmp, PM_EXT_PKG))) {
|
if((p = strstr(tmp, PM_EXT_PKG))) {
|
||||||
*p = 0;
|
*p = '\0';
|
||||||
}
|
}
|
||||||
/* trim architecture */
|
/* trim architecture */
|
||||||
if((p = strrchr(tmp, '-'))) {
|
if((p = _alpm_pkgname_has_arch(tmp))) {
|
||||||
*p = 0;
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
p = tmp + strlen(tmp);
|
p = tmp + strlen(tmp);
|
||||||
@ -240,7 +240,7 @@ int split_pkgname(char *target, char *name, char *version)
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
strncpy(version, p+1, 64);
|
strncpy(version, p+1, 64);
|
||||||
*p = 0;
|
*p = '\0';
|
||||||
|
|
||||||
strncpy(name, tmp, 256);
|
strncpy(name, tmp, 256);
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ static int sync_search(list_t *syncs, list_t *targets)
|
|||||||
(char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION),
|
(char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION),
|
||||||
(group ? " (" : ""), (group ? group : ""), (group ? ") " : ""));
|
(group ? " (" : ""), (group ? group : ""), (group ? ") " : ""));
|
||||||
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
|
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
|
||||||
printf("\n");
|
printf("\n\n");
|
||||||
}
|
}
|
||||||
alpm_list_free_outer(ret);
|
alpm_list_free_outer(ret);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user