From 9bd2313a5c7523501bcec398877489c5a1fc1415 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 3 Jan 2016 19:23:30 +0100 Subject: use one 'store' method to rule all (de)compressors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding a new compressor method meant adding a new method as well – even if that boilt down to just linking to our generalized decompressor with a new name. That is unneeded busywork if we can instead just call the generalized decompressor and let it figure out which compressor to use based on the filenames rather than by program name. For compatibility we ship still 'gzip', 'bzip2' and co, but they are just links to our "new" 'store' method. --- methods/makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'methods/makefile') diff --git a/methods/makefile b/methods/makefile index 868c52a40..3274e9279 100644 --- a/methods/makefile +++ b/methods/makefile @@ -23,11 +23,11 @@ LIB_MAKES = apt-pkg/makefile SOURCE = copy.cc include $(PROGRAM_H) -# The gzip method -PROGRAM=gzip +# The store method +PROGRAM=store SLIBS = -lapt-pkg $(INTLLIBS) LIB_MAKES = apt-pkg/makefile -SOURCE = gzip.cc +SOURCE = store.cc include $(PROGRAM_H) # The gpgv method @@ -96,15 +96,15 @@ $(BIN)/ssh: clean-$(BIN)/ssh: -rm $(BIN)/ssh -# create links for all other compressors -COMPRESSORS=bzip2 lzma xz +# create compat links for all compressors +COMPRESSORS=gzip bzip2 lzma xz binary: $(addprefix $(BIN)/,$(COMPRESSORS)) veryclean: $(addprefix clean-$(BIN)/,$(COMPRESSORS)) -$(addprefix $(BIN)/,$(COMPRESSORS)): $(BIN)/gzip +$(addprefix $(BIN)/,$(COMPRESSORS)): $(BIN)/store echo "Installing $(notdir $@) method link" - ln -fs gzip $@ + ln -fs store $@ $(addprefix clean-$(BIN)/,$(COMPRESSORS)): -rm $(BIN)/$(notdir $@) -- cgit v1.2.3