pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/45047: pkgtools/pkg_install minix support



The following reply was made to PR pkg/45047; it has been noted by GNATS.

From: Thomas Cort <tcort%minix3.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/45047: pkgtools/pkg_install minix support
Date: Mon, 13 Jun 2011 13:43:24 -0400

 >> +. =A0if ${OPSYS} =3D=3D "Minix"
 >> +LIBS+=3D =A0 =A0 =A0 =A0 =A0 =A0 =A0-larchive -lbz2 -lz
 >> +. =A0endif
 >
 > This is wrong, it shouldn't be needed.
 
 Without it, I get this:
 
 gcc -L/usr/tmp/work/pkgtools/pkg_install/work/libfetch
 -L/usr/tmp/work/pkgtools/pkg_install/work/libnbcompat
 -Wl,-R/usr/pkg/lib -L../lib -o pkg_add main.o perform.o -linstall
 -lfetch -larchive -lnbcompat
 /usr/lib/libarchive.a(archive_read_support_compression_bzip2.o): In
 function `bzip2_filter_read':
 /usr/src/lib/libarchive/archive_read_support_compression_bzip2.c:(.text+0x2=
 74):
 undefined reference to `BZ2_bzDecompress'
 /usr/src/lib/libarchive/archive_read_support_compression_bzip2.c:(.text+0x2=
 a2):
 undefined reference to `BZ2_bzDecompressEnd'
 /usr/src/lib/libarchive/archive_read_support_compression_bzip2.c:(.text+0x2=
 fc):
 undefined reference to `BZ2_bzDecompressInit'
 /usr/src/lib/libarchive/archive_read_support_compression_bzip2.c:(.text+0x3=
 1c):
 undefined reference to `BZ2_bzDecompressInit'
 /usr/lib/libarchive.a(archive_read_support_compression_bzip2.o): In
 function `bzip2_filter_close':
 /usr/src/lib/libarchive/archive_read_support_compression_bzip2.c:(.text+0x3=
 cd):
 undefined reference to `BZ2_bzDecompressEnd'
 /usr/lib/libarchive.a(archive_read_support_compression_gzip.o): In
 function `gzip_filter_read':
 /usr/src/lib/libarchive/archive_read_support_compression_gzip.c:(.text+0x1c=
 8):
 undefined reference to `crc32'
 /usr/src/lib/libarchive/archive_read_support_compression_gzip.c:(.text+0x20=
 d):
 undefined reference to `inflateInit2_'
 /usr/src/lib/libarchive/archive_read_support_compression_gzip.c:(.text+0x2c=
 0):
 undefined reference to `inflate'
 /usr/src/lib/libarchive/archive_read_support_compression_gzip.c:(.text+0x2e=
 d):
 undefined reference to `inflateEnd'
 /usr/lib/libarchive.a(archive_read_support_compression_gzip.o): In
 function `gzip_filter_close':
 /usr/src/lib/libarchive/archive_read_support_compression_gzip.c:(.text+0x3a=
 d):
 undefined reference to `inflateEnd'
 /usr/lib/libarchive.a(archive_read_support_format_zip.o): In function
 `archive_read_format_zip_read_header':
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0x23c):
 undefined reference to `crc32'
 /usr/lib/libarchive.a(archive_read_support_format_zip.o): In function
 `archive_read_format_zip_read_data':
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0xb0c):
 undefined reference to `crc32'
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0xc1c):
 undefined reference to `inflateReset'
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0xc3e):
 undefined reference to `inflateInit2_'
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0xcc6):
 undefined reference to `inflate'
 /usr/lib/libarchive.a(archive_read_support_format_zip.o): In function
 `archive_read_format_zip_cleanup':
 /usr/src/lib/libarchive/archive_read_support_format_zip.c:(.text+0xf43):
 undefined reference to `inflateEnd'
 collect2: ld returned 1 exit status
 *** Error code 1
 
 
 > =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0case PLIST_CMD:
 > =A0> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (format_cmd(cmd, sizeof(=
 cmd), p->name, pkg->prefix, last_file))
 > =A0> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (format_cmd(cmd, sizeof(=
 cmd), p->name, pkg->install_prefix, last_file))
 > =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -1=
 ;
 > =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("Executing '%s'\n"=
 , cmd);
 > =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!Fake && system(cmd))
 >
 > =A0What are you trying to do here?
 
 I'll check with the original author, but AFAIK it is a DESTDIR related
 change. Again, I'll move those changes into a separate patch/PR and
 give a better explanation of the changes.
 
 > If you want to catch circular dependencies, just use a
 > counter.
 
 Okay. I'll re-implement the circular dependency checker using a counter.
 
 > Bigger question of course is, why you ended up here in first
 >=A0place...
 
 AFAIK it was because of an inconsistent set of binary packages (built
 from different pkgsrc tree versions) causing circular dependencies.
 
 > Please don't include generated files in diffs, they just provide noise.
 
 Sorry, it won't happen again.
 
 >> +#if HAVE_SYS_PARAM_H
 >> +#include <sys/param.h>
 >> +#endif
 >
 > Why?
 
 There was some shuffling around of macros in the Minix headers and
 according to the commit message include <sys/param.h> was needed for
 MIN()/MAX(). However, I just tried it without the include and it works
 just fine. In the next revision of the patch I'll remove that hunk.
 
 >> diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_insta=
 ll/files/lib/plist.c
 >> index f1b6c6d..d171ad4 100644
 >> --- a/pkgtools/pkg_install/files/lib/plist.c
 >> +++ b/pkgtools/pkg_install/files/lib/plist.c
 >> @@ -580,10 +581,12 @@ delete_package(Boolean ign_err, package_t *pkg, Bo=
 olean NoDeleteFiles,
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0case PLIST_UNEXEC:
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (NoDeleteFiles)
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break;
 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0format_cmd(tmp, sizeof(tmp), p-=
 >name, prefix, last_file);
 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("Executing `%s'\n", tmp)=
 ;
 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!Fake && system(tmp)) {
 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0warnx("unexec c=
 ommand for `%s' failed", tmp);
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void) snprintf(tmp, sizeof(tmp=
 ), "%s%s%s",
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
 =A0destdir ? destdir : "", destdir ? "/" : "", prefix);
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0format_cmd(cmd, sizeof(cmd), p-=
 >name, tmp, last_file);
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("Executing `%s'\n", cmd)=
 ;
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!Fake && system(cmd)) {
 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0warnx("unexec c=
 ommand for `%s' failed", cmd);
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fail =3D FAIL=
 ;
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break;
 >>
 >
 > Why?
 
 Again, DESTDIR related. PLIST files can have commands to be executed
 using the @exec directive. Pkgin for instance uses "@exec ${MKDIR}
 %D/etc/pkgin". The %D is supposed to be expanded to pkgsrc root.
 Earlier pkg_add would ignore the destdir when expanding the %D. We
 changed pkg_add to expand %D to destdir/pkgsrc_root.
 


Home | Main Index | Thread Index | Old Index