pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg_add: can't remove files during install
--On Thursday, September 24, 2009 00:23:11 +0300 Stathis Kamperis
<ekamperi%gmail.com@localhost> wrote:
>> Can you ktrace another pkg_add try? And look at the kdump? (Don't send
>> it to the mailing list -- too big.)
Hi,
I have some trouble with pkg_add, too, and I think this is related.
I use pkgsrc on Linux systems, with PREFIX=/opt/pkgsrc. On the 2 systems I
currently work with, pkg_add -V says "20090817".
On my systems, it seems to have trouble finding the correct PKG_DBDIR (for
the pkgdb.byfile.db database) and for the package-specific files/directories
below PKG_DBDIR.
Setting PKG_DBDIR in the environment does not seem to help.
strace excerpts are attached below.
Excerpt 1 shows that pkg_add fails to use ${PREFIX}/var/db/pkg as directory
for the pkgdb.byfile.db database. Instead it creates a new database at
/pkgdb.byfile.db, same with PKG_DBDIR set in environment.
Excerpt 2 shows that pkg_add fails to call the "+INSTALL"-script after
unpacking it into ${PREFIX}/var/db/pkg/<package_name>/, as it doubles
the package name in the effective path name. This gives the error message
it shows when called without strace:
pkg_add: exec of install script failed: No such file or directory
pkg_add: 1 package addition failed
I hope my package database is not too corrupted yet :-)
Regards
Matthias
--------------------------------------------------------------------
(dfdisk this is just some arbitrary package)
# strace -f 2>&1 pkg_add /opt/pkgsrc/packages/All/dfdisk-1.0.tgz
Excerpt 1: does not use ${PREFIX}/var/db/pkg directory for the
pkgdb.byfile.db database
...
stat64("/pkgdb.byfile.db", {st_mode=S_IFREG|0644, st_size=8192, ...}) = 0
open("/pkgdb.byfile.db", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
read(4, "\0\0\0\0\1\0\0\0\0\0\0\0b1\5\0\t\0\0\0\0\20\0\0\0\t\0\0"..., 512)
= 512
close(4) = 0
stat64("DB_CONFIG", 0xbfb5a9ec) = -1 ENOENT (No such file or
directory)
open("DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
stat64("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
gettimeofday({1253807619, 978137}, NULL) = 0
stat64("__db.002", 0xbfb5aa8c) = -1 ENOENT (No such file or
directory)
open("/pkgdb.byfile.db", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=8192, ...}) = 0
mmap2(NULL, 8192, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40018000
munmap(0x40018000, 8192) = 0
close(4) = 0
mkdir("/opt/pkgsrc/var/db/pkg/dfdisk-1.0", 0777) = 0
unlink("/opt/pkgsrc/var/db/pkg/dfdisk-1.0/+CONTENTS") = -1 ENOENT (No such
file or directory)
open("/opt/pkgsrc/var/db/pkg/dfdisk-1.0/+CONTENTS",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 4
write(4, "@cwd /opt/pkgsrc\n@src /opt/pkgsr"..., 512) = 512
write(4, "", 0) = 0
close(4) = 0
...
Excerpt 2: doubles the "dfdisk-1.0" path component, failing to
execute the packages "+INSTALL" script
...
[pid 11724] chdir("/opt/pkgsrc/var/db/pkg/dfdisk-1.0") = 0
[pid 11724] execve("/dfdisk-1.0/+INSTALL", ["/dfdisk-1.0/+INSTALL",
"dfdisk-1.0", "PRE-INSTALL"], [/* 33 vars */]) = -1 ENOENT (No such file or
directory)
[pid 11724] exit_group(127) = ?
Process 11723 resumed
Process 11724 detached
<... waitpid resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 127}], 0) = 11724
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, "pkg_add: ", 9pkg_add: ) = 9
write(2, "install script returned error st"..., 36install script returned
error status) = 36
write(2, "\n", 1
) = 1
Home |
Main Index |
Thread Index |
Old Index