libxbps: change the epoch char to ':' to differentiate the starting char in pkgname.

Added xbps_get_pkg_epoch(), to get the epoch version string.
This commit is contained in:
Juan RP
2010-05-11 13:38:35 +02:00
parent a79d7b5884
commit 17b7651137
3 changed files with 28 additions and 4 deletions

View File

@@ -183,6 +183,20 @@ xbps_check_is_installed_pkgname(const char *pkgname)
return false;
}
const char *
xbps_get_pkg_epoch(const char *pkg)
{
const char *tmp;
assert(pkg != NULL);
tmp = strrchr(pkg, ':');
if (tmp == NULL)
return NULL;
return tmp + 1; /* skip first ':' */
}
const char *
xbps_get_pkg_version(const char *pkg)
{