Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_files.c4
-rw-r--r--lib/libalpm/conflict.c14
-rw-r--r--lib/libalpm/package.c7
-rw-r--r--lib/libalpm/po/LINGUAS6
-rw-r--r--lib/libalpm/po/cs.po (renamed from lib/libalpm/po/cs_CZ.po)0
-rw-r--r--lib/libalpm/po/pl.po (renamed from lib/libalpm/po/pl_PL.po)0
-rw-r--r--lib/libalpm/po/ru.po (renamed from lib/libalpm/po/ru_RU.po)0
7 files changed, 17 insertions, 14 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 724e3c8f..4cd0985e 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -297,10 +297,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(line);
if(!strcmp(line, "%FILENAME%")) {
- /* filename is _new_ - it provides the real name of the package, on the
- * server, to allow for us to not tie the name of the actual file to the
- * data of the package
- */
if(fgets(info->filename, sizeof(info->filename), fp) == NULL) {
goto error;
}
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index c093705a..3442902c 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -251,10 +251,7 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
alpm_list_t *ret = NULL;
alpm_list_t *pA = filesA, *pB = filesB;
- if(pB == NULL) {
- return(alpm_list_strdup(pA));
- }
-
+ /* if both filesA and filesB have entries, do this loop */
while(pA && pB) {
const char *strA = pA->data;
const char *strB = pB->data;
@@ -279,6 +276,15 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
}
}
}
+ /* ensure we have completely emptied pA */
+ while(pA) {
+ const char *strA = pA->data;
+ /* skip directories */
+ if(strA[strlen(strA)-1] != '/') {
+ ret = alpm_list_add(ret, strdup(strA));
+ }
+ pA = pA->next;
+ }
return(ret);
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 937ee3e0..363cf313 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -162,11 +162,12 @@ const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
+ if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
+ }
+
if(!strlen(pkg->filename)) {
/* construct the file name, it's not in the desc file */
- if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
- }
if(pkg->arch && strlen(pkg->arch) > 0) {
snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PKGEXT,
pkg->name, pkg->version, pkg->arch);
diff --git a/lib/libalpm/po/LINGUAS b/lib/libalpm/po/LINGUAS
index bf816118..955e1fdb 100644
--- a/lib/libalpm/po/LINGUAS
+++ b/lib/libalpm/po/LINGUAS
@@ -1,11 +1,11 @@
# Set of available languages.
-cs_CZ
+cs
de
en_GB
es
fr
hu
it
-pl_PL
+pl
pt_BR
-ru_RU
+ru
diff --git a/lib/libalpm/po/cs_CZ.po b/lib/libalpm/po/cs.po
index 79931f00..79931f00 100644
--- a/lib/libalpm/po/cs_CZ.po
+++ b/lib/libalpm/po/cs.po
diff --git a/lib/libalpm/po/pl_PL.po b/lib/libalpm/po/pl.po
index 2126d6dd..2126d6dd 100644
--- a/lib/libalpm/po/pl_PL.po
+++ b/lib/libalpm/po/pl.po
diff --git a/lib/libalpm/po/ru_RU.po b/lib/libalpm/po/ru.po
index 57add381..57add381 100644
--- a/lib/libalpm/po/ru_RU.po
+++ b/lib/libalpm/po/ru.po