From 0b4af85e50830c17b3496434b2dd6a83cd2210ee Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 14 Jun 2009 00:02:54 +0200 Subject: [PATCH] Only enable the tar and gzip modules when initialising libarchive. This means you will only be able to run pkgadd/pkginfo on gzipped tarballs but not on tarballs that were compressed with eg bzip2 or xz. --- Makefile | 2 +- pkgutil.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 172b7e9..a194ad2 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ CXXFLAGS += -DNDEBUG CXXFLAGS += -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" \ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -LDFLAGS += -static -larchive -lz -lbz2 +LDFLAGS += -static -larchive -lz OBJECTS = main.o pkgutil.o pkgadd.o pkgrm.o pkginfo.o diff --git a/pkgutil.cc b/pkgutil.cc index 709e748..69fefc1 100644 --- a/pkgutil.cc +++ b/pkgutil.cc @@ -44,8 +44,8 @@ #include #define INIT_ARCHIVE(ar) \ - archive_read_support_compression_all((ar)); \ - archive_read_support_format_all((ar)) + archive_read_support_compression_gzip((ar)); \ + archive_read_support_format_tar((ar)) using __gnu_cxx::stdio_filebuf; -- 2.26.2