Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=be28117aeeb5da2e5c1cb91034d64a6b1eae1354

commit be28117aeeb5da2e5c1cb91034d64a6b1eae1354
Author: Miklos Vajna <[email protected]>
Date:   Sun May 1 23:10:51 2011 +0200

dump_pkg_files, pkg_fsck: respect config->root

diff --git a/src/pacman-g2/package.c b/src/pacman-g2/package.c
index 3b34a1f..5b9ea42 100644
--- a/src/pacman-g2/package.c
+++ b/src/pacman-g2/package.c
@@ -32,8 +32,11 @@
#include "log.h"
#include "util.h"
#include "list.h"
+#include "conf.h"
#include "package.h"

+extern config_t *config;
+
/* Display the content of an installed package
*/
void dump_pkg_full(PM_PKG *pkg, int level)
@@ -173,7 +176,7 @@ void dump_pkg_files(PM_PKG *pkg)
pkgfiles = pacman_pkg_getinfo(pkg, PM_PKG_FILES);

for(i = pkgfiles; i; i = pacman_list_next(i)) {
-               fprintf(stdout, "%s /%s\n", (char *)pkgname, (char 
*)pacman_list_getdata(i));
+               fprintf(stdout, "%s %s%s\n", (char *)pkgname, config->root, 
(char *)pacman_list_getdata(i));
}

fflush(stdout);
@@ -216,7 +219,7 @@ void pkg_fsck(PM_PKG *pkg){
struct stat buf;

for(i = pkgfiles; i; i = pacman_list_next(i)) {
-               snprintf(path, PATH_MAX, "/%s", (char *)pacman_list_getdata(i));
+               snprintf(path, PATH_MAX, "%s%s", config->root, (char 
*)pacman_list_getdata(i));
if(lstat(path, &buf) == -1) {
fprintf(stdout, "%s %s\t%s.\n", pkgname, path, strerror(errno));
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to