summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/deps.c6
-rw-r--r--lib/libalpm/versioncmp.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index ae378658..7065efa7 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -328,7 +328,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
}
/* else if still not found... */
if(!found) {
- _alpm_log(PM_LOG_DEBUG, _("checkdeps: found %s as a dependency for %s"),
+ _alpm_log(PM_LOG_DEBUG, _("missing dependency '%s' for package '%s'"),
depend.name, tp->name);
miss = _alpm_depmiss_new(tp->name, PM_DEP_TYPE_DEPEND, depend.mod,
depend.name, depend.version);
@@ -397,8 +397,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
int _alpm_splitdep(char *depstr, pmdepend_t *depend)
{
- char *str = NULL;
- char *ptr = NULL;
+ char *str = NULL, *ptr = NULL;
if(depstr == NULL || depend == NULL) {
return(-1);
@@ -432,6 +431,7 @@ int _alpm_splitdep(char *depstr, pmdepend_t *depend)
if(depend->mod != PM_DEP_MOD_EQ) {
ptr++;
}
+
STRNCPY(depend->version, ptr, PKG_VERSION_LEN);
FREE(str);
diff --git a/lib/libalpm/versioncmp.c b/lib/libalpm/versioncmp.c
index 489e109d..d23f0568 100644
--- a/lib/libalpm/versioncmp.c
+++ b/lib/libalpm/versioncmp.c
@@ -238,7 +238,7 @@ int _alpm_versioncmp(const char *a, const char *b)
if((!*one) && (!*two)) {
/* compare release numbers */
- if(rel1 && rel2) return(_alpm_versioncmp(rel1, rel2));
+ if(rel1 && rel2 && strlen(rel1) && strlen(rel2)) return(_alpm_versioncmp(rel1, rel2));
return(0);
}