Fix reproducibility issue due to readdir() order by sorting
the list of sources to be built and linked.
[jak@debian.org: Added summary and fixed typo]
Closes: #810509
APT_DOMAIN:=libapt-inst$(MAJOR)
LIBRARYDEPENDS=$(LIB)/libapt-pkg.so
APT_DOMAIN:=libapt-inst$(MAJOR)
LIBRARYDEPENDS=$(LIB)/libapt-pkg.so
-SOURCE = $(wildcard *.cc */*.cc)
-HEADERS = $(addprefix apt-pkg/,$(notdir $(wildcard *.h */*.h)))
+SOURCE = $(sort $(wildcard *.cc */*.cc))
+HEADERS = $(addprefix apt-pkg/,$(notdir $(sort $(wildcard *.h */*.h))))
endif
APT_DOMAIN:=libapt-pkg$(LIBAPTPKG_MAJOR)
endif
APT_DOMAIN:=libapt-pkg$(LIBAPTPKG_MAJOR)
-SOURCE = $(wildcard *.cc */*.cc)
-HEADERS = $(addprefix apt-pkg/,$(notdir $(wildcard *.h */*.h)))
+SOURCE = $(sort $(wildcard *.cc */*.cc))
+HEADERS = $(addprefix apt-pkg/,$(notdir $(sort $(wildcard *.h */*.h))))
SLIBS=$(PTHREADLIB) -lapt-pkg
CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
SLIBS=$(PTHREADLIB) -lapt-pkg
CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
-SOURCE = $(wildcard *.cc)
-HEADERS = $(addprefix apt-private/,$(wildcard *.h))
+SOURCE = $(sort $(wildcard *.cc))
+HEADERS = $(addprefix apt-private/,$(sort $(wildcard *.h)))