Hi
On Sun, Sep 21, 2008 at 03:16:02PM +0300, Roman Kyrylych wrote:
> Hi all!
> 
> Got to chrooting today, to get my packaging process correct.
> Here's what I've got:
> 
> [EMAIL PROTECTED] ~]# echo $CHROOT_SHELL
> /chroot64
> [EMAIL PROTECTED] ~]#  mkarchroot $CHROOT_SHELL/root base base-devel sudo
> mounting sysfs : /sys
> mounting procfs : /proc
> binding device nodes : /dev
> binding pacman cache : /var/cache/pacman
> installing packages:
>       base
>       base-devel
>       sudo
> Root      : /chroot64/root/
> Conf File : /etc/pacman.conf
> DB Path   : /chroot64/root//var/lib/pacman/
> Cache Dirs: /var/cache/pacman/pkg/
> Lock File : /chroot64/root//var/lib/pacman/db.lck
> Log File  : /chroot64/root//var/log/pacman.log
> Targets   : base  base-devel  sudo
> 
> Notice the //
> I've looked into the source, but haven't found what causes / to appear
> after /chroot64/root

I also ran in this issue. libalpm always ensures that paths end with
"/". Dan, can you check the fix?

Jürgen 
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 155f8da..37e586e 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -262,11 +262,11 @@ static void setlibpaths(void)
                                cleanup(ret);
                        }
                        if(!config->dbpath) {
-                               snprintf(path, PATH_MAX, "%s%s", 
alpm_option_get_root(), DBPATH);
+                               snprintf(path, PATH_MAX, "%s%s", 
alpm_option_get_root(), DBPATH + 1);
                                config->dbpath = strdup(path);
                        }
                        if(!config->logfile) {
-                               snprintf(path, PATH_MAX, "%s%s", 
alpm_option_get_root(), LOGFILE);
+                               snprintf(path, PATH_MAX, "%s%s", 
alpm_option_get_root(), LOGFILE + 1);
                                config->logfile = strdup(path);
                        }
                }

Reply via email to