Solved [Solved] pkg2ng doesn't convert anything

Hi,

I've just installed new pkg tools (version pkg-1.3.8_1) on my 9.1-RELEASE-p19 with
Code:
# make UPGRADEPKG=1 install clean
as advised by initial make install clean command

/etc/make.conf was modified to include
Code:
WITH_PKGNG=yes

But when I run pkg2ng following error is displayed and nothin is converted
Code:
Converting packages from /var/db/pkg
Converting portmaster-3.17.2...
Child process pid=88892 terminated abnormally: Segmentation fault: 11
Analysing shared libraries, this will take a while...
Checking all packages: 100%

pkg info shows only pkg-1.3.8_1 package manager installed, while
pkg_info still shows all installed ports.

Would You please help me find a solution?
 
Re: pkg2ng doesn't convert anything

Nope. There is only /usr/local/etc/pkg.conf.sample

After analysing pkg2ng script I have tried "test run" with pkg convert -n and the result is the same
Code:
Converting packages from /var/db/pkg
Converting portmaster-3.17.2...
Child process pid=60167 terminated abnormally: Segmentation fault: 11
and of course pkg.core is created.

I do not have any ideay what's the problem. /var/db/pkg corrupted somehow? But pkg_info runs ok.
 
Re: pkg2ng doesn't convert anything

I'm having the same problem.

I managed to get a stack trace:

Code:
#0  0x082dfce8 in strlcpy ()
#1  0x0808d207 in plist_new ()
#2  0x0808fe5f in ports_parse_plist ()
#3  0x080acbd8 in pkg_old_load_from_path ()
#4  0x0804e6e4 in exec_convert ()
#5  0x08053e99 in main ()

and by putting in a print statement, it appears that after this line:

Code:
        pkg_get(pkg, PKG_PREFIX, &prefix);

prefix == NULL, which I'm fairly certain is the immediate cause of the problem. Why it's NULL I can't tell.

That's getting to the end of my understanding of the code for now, but perhaps somebody will have further information.
 
Re: pkg2ng doesn't convert anything

It looks like pkg_get calls pkg_get2 which then calls pkg_vget. In pkg_vget, it's calling

Code:
obj = ucl_object_find_key(pkg->fields, pkg_keys[attr].name);

where pkg_keys[attr].name is "prefix", and the function returns NULL. Does anybody know what file this function is looking in? Just to be clear, I've tried this with and without a /usr/local/etc/pkg.conf file, and I get the same result.
 
Back
Top