summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-09-23 19:01:37 +0200
committerDan McGee <dan@archlinux.org>2007-09-23 12:05:30 -0500
commit443950b7e9c40493a184d55caaa71c2b4daa3ffd (patch)
tree0ffef0f3b486d861da213dba4a36de9c5389789b /lib/libalpm/package.c
parentf9b7c67d24210dc4b2c77b751948e0f17f80583f (diff)
downloadpacman-443950b7e9c40493a184d55caaa71c2b4daa3ffd.tar.xz
libalpm/package.c : fix for FS#8081, case sensitive comparisons in parse_descfile.
This fix FS#8081. The tr_TR locale has known issue with case insensitive comparisons, mostly because upper(i) != I. So the .PKGINFO files generated by makepkg MUST contain all keywords in lowercases now. This was already done, but was not mandatory. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index a841bf58..f8cba1fc 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -852,40 +852,39 @@ static int parse_descfile(const char *descfile, pmpkg_t *info)
info->name[0] != '\0' ? info->name : "error", linenum);
} else {
_alpm_strtrim(key);
- key = _alpm_strtoupper(key);
_alpm_strtrim(ptr);
- if(!strcmp(key, "PKGNAME")) {
+ if(!strcmp(key, "pkgname")) {
strncpy(info->name, ptr, sizeof(info->name));
- } else if(!strcmp(key, "PKGVER")) {
+ } else if(!strcmp(key, "pkgver")) {
strncpy(info->version, ptr, sizeof(info->version));
- } else if(!strcmp(key, "PKGDESC")) {
+ } else if(!strcmp(key, "pkgdesc")) {
strncpy(info->desc, ptr, sizeof(info->desc));
- } else if(!strcmp(key, "GROUP")) {
+ } else if(!strcmp(key, "group")) {
info->groups = alpm_list_add(info->groups, strdup(ptr));
- } else if(!strcmp(key, "URL")) {
+ } else if(!strcmp(key, "url")) {
strncpy(info->url, ptr, sizeof(info->url));
- } else if(!strcmp(key, "LICENSE")) {
+ } else if(!strcmp(key, "license")) {
info->licenses = alpm_list_add(info->licenses, strdup(ptr));
- } else if(!strcmp(key, "BUILDDATE")) {
+ } else if(!strcmp(key, "builddate")) {
strncpy(info->builddate, ptr, sizeof(info->builddate));
- } else if(!strcmp(key, "INSTALLDATE")) {
+ } else if(!strcmp(key, "installdate")) {
strncpy(info->installdate, ptr, sizeof(info->installdate));
- } else if(!strcmp(key, "PACKAGER")) {
+ } else if(!strcmp(key, "packager")) {
strncpy(info->packager, ptr, sizeof(info->packager));
- } else if(!strcmp(key, "ARCH")) {
+ } else if(!strcmp(key, "arch")) {
strncpy(info->arch, ptr, sizeof(info->arch));
- } else if(!strcmp(key, "SIZE")) {
+ } else if(!strcmp(key, "size")) {
/* size in the raw package is uncompressed (installed) size */
info->isize = atol(ptr);
- } else if(!strcmp(key, "DEPEND")) {
+ } else if(!strcmp(key, "depend")) {
info->depends = alpm_list_add(info->depends, strdup(ptr));
- } else if(!strcmp(key, "CONFLICT")) {
+ } else if(!strcmp(key, "conflict")) {
info->conflicts = alpm_list_add(info->conflicts, strdup(ptr));
- } else if(!strcmp(key, "REPLACES")) {
+ } else if(!strcmp(key, "replaces")) {
info->replaces = alpm_list_add(info->replaces, strdup(ptr));
- } else if(!strcmp(key, "PROVIDES")) {
+ } else if(!strcmp(key, "provides")) {
info->provides = alpm_list_add(info->provides, strdup(ptr));
- } else if(!strcmp(key, "BACKUP")) {
+ } else if(!strcmp(key, "backup")) {
info->backup = alpm_list_add(info->backup, strdup(ptr));
} else {
_alpm_log(PM_LOG_DEBUG, "%s: syntax error in description file line %d\n",