Added support for using noarch packages.
--HG-- extra : convert_revision : a96166ddecb6efe65d35283f25e06a944cc4a038
This commit is contained in:
parent
4f6364a2bd
commit
6b6162bb44
10 changed files with 107 additions and 36 deletions
26
lib/util.c
26
lib/util.c
|
@ -29,6 +29,7 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include <xbps_api.h>
|
||||
|
||||
|
@ -141,6 +142,31 @@ xbps_get_pkg_name(const char *pkg)
|
|||
return pkgname;
|
||||
}
|
||||
|
||||
char *
|
||||
xbps_get_pkg_index_plist(const char *path)
|
||||
{
|
||||
struct utsname un;
|
||||
char *plist, *p;
|
||||
|
||||
assert(path != NULL);
|
||||
|
||||
if (uname(&un) == -1)
|
||||
return NULL;
|
||||
|
||||
p = xbps_append_full_path(false, path, un.machine);
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
|
||||
plist = xbps_append_full_path(false, p, XBPS_PKGINDEX);
|
||||
if (plist == NULL) {
|
||||
free(p);
|
||||
return NULL;
|
||||
}
|
||||
free(p);
|
||||
|
||||
return plist;
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_pkg_has_rundeps(prop_dictionary_t pkg)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue