- enable building test/ programs under automake control (Ralf)
authorpmatilai <pmatilai>
Sat, 1 Jul 2006 07:43:06 +0000 (07:43 +0000)
committerpmatilai <pmatilai>
Sat, 1 Jul 2006 07:43:06 +0000 (07:43 +0000)
- remove irrelevant .deb specific test programs
- fix versiontest, conf and scratch tests to be buildable/functional in apt-rpm

14 files changed:
Makefile.am
Makefile.in
configure
configure.ac
test/Makefile.am [new file with mode: 0644]
test/Makefile.in [new file with mode: 0644]
test/conf.cc
test/extract-control.cc [deleted file]
test/makefile [deleted file]
test/rpmver.cc [deleted file]
test/scratch.cc
test/testdeb.cc [deleted file]
test/testextract.cc [deleted file]
test/versiontest.cc

index b127e6d..5a071a5 100644 (file)
@@ -1,5 +1,6 @@
 
 SUBDIRS = lua apt-pkg methods cmdline tools doc po
 
 SUBDIRS = lua apt-pkg methods cmdline tools doc po
+SUBDIRS += test
 
 ACLOCAL_AMFLAGS = -I m4 -I buildlib
 
 
 ACLOCAL_AMFLAGS = -I m4 -I buildlib
 
@@ -7,18 +8,6 @@ EXTRA_DIST = \
                AUTHORS.RPM \
                COPYING.GPL \
                rpmpriorities \
                AUTHORS.RPM \
                COPYING.GPL \
                rpmpriorities \
-               test/conf.cc \
-               test/extract-control.cc \
-               test/hash.cc \
-               test/makefile \
-               test/mthdcat.cc \
-               test/rpmver.cc \
-               test/scratch.cc \
-               test/testdeb.cc \
-               test/testextract.cc \
-               test/uri.cc \
-               test/versions.lst \
-               test/versiontest.cc \
                python/apt.i \
                python/apt.py \
                python/apt_wrap.cxx \
                python/apt.i \
                python/apt.py \
                python/apt_wrap.cxx \
index 3adc741..a26b1aa 100644 (file)
@@ -246,14 +246,10 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-SUBDIRS = lua apt-pkg methods cmdline tools doc po
+SUBDIRS = lua apt-pkg methods cmdline tools doc po test
 ACLOCAL_AMFLAGS = -I m4 -I buildlib
 ACLOCAL_AMFLAGS = -I m4 -I buildlib
-EXTRA_DIST = AUTHORS.RPM COPYING.GPL rpmpriorities test/conf.cc \
-       test/extract-control.cc test/hash.cc test/makefile \
-       test/mthdcat.cc test/rpmver.cc test/scratch.cc test/testdeb.cc \
-       test/testextract.cc test/uri.cc test/versions.lst \
-       test/versiontest.cc python/apt.i python/apt.py \
-       python/apt_wrap.cxx python/Makefile \
+EXTRA_DIST = AUTHORS.RPM COPYING.GPL rpmpriorities python/apt.i \
+       python/apt.py python/apt_wrap.cxx python/Makefile \
        python/swig-1.3.16-cxx.patch contrib/gpg-check/README \
        contrib/gpg-check/gpg-check.conf \
        contrib/gpg-check/gpg-import.lua \
        python/swig-1.3.16-cxx.patch contrib/gpg-check/README \
        contrib/gpg-check/gpg-check.conf \
        contrib/gpg-check/gpg-import.lua \
@@ -680,7 +676,7 @@ distclean-tags:
 distdir: $(DISTFILES)
        $(am__remove_distdir)
        mkdir $(distdir)
 distdir: $(DISTFILES)
        $(am__remove_distdir)
        mkdir $(distdir)
-       $(mkdir_p) $(distdir)/buildlib $(distdir)/contrib/allow-duplicated $(distdir)/contrib/apt-cron $(distdir)/contrib/apt-files $(distdir)/contrib/apt-groupinstall $(distdir)/contrib/apt-wrapper $(distdir)/contrib/gpg-check $(distdir)/contrib/guess $(distdir)/contrib/install-devel $(distdir)/contrib/list-extras $(distdir)/contrib/list-nodeps $(distdir)/contrib/log $(distdir)/contrib/preserve-conf $(distdir)/contrib/proxypasswd $(distdir)/m4 $(distdir)/po $(distdir)/python $(distdir)/test
+       $(mkdir_p) $(distdir)/buildlib $(distdir)/contrib/allow-duplicated $(distdir)/contrib/apt-cron $(distdir)/contrib/apt-files $(distdir)/contrib/apt-groupinstall $(distdir)/contrib/apt-wrapper $(distdir)/contrib/gpg-check $(distdir)/contrib/guess $(distdir)/contrib/install-devel $(distdir)/contrib/list-extras $(distdir)/contrib/list-nodeps $(distdir)/contrib/log $(distdir)/contrib/preserve-conf $(distdir)/contrib/proxypasswd $(distdir)/m4 $(distdir)/po $(distdir)/python
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
        list='$(DISTFILES)'; for file in $$list; do \
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
        list='$(DISTFILES)'; for file in $$list; do \
index 0821e5a..8d1a458 100755 (executable)
--- a/configure
+++ b/configure
@@ -26214,7 +26214,7 @@ echo "${ECHO_T}$LIBSTDCPP_VER" >&6
 
 
 
 
 
 
-                                                                                ac_config_files="$ac_config_files Makefile lua/Makefile apt-pkg/Makefile methods/Makefile cmdline/Makefile tools/Makefile doc/Makefile po/Makefile.in"
+                                                                                          ac_config_files="$ac_config_files Makefile lua/Makefile apt-pkg/Makefile methods/Makefile cmdline/Makefile tools/Makefile doc/Makefile test/Makefile po/Makefile.in"
 
           ac_config_links="$ac_config_links include/apti18n.h:buildlib/gettext.h"
 
 
           ac_config_links="$ac_config_links include/apti18n.h:buildlib/gettext.h"
 
@@ -26858,6 +26858,7 @@ do
   "cmdline/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmdline/Makefile" ;;
   "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
   "cmdline/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmdline/Makefile" ;;
   "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
   "include/apti18n.h" ) CONFIG_LINKS="$CONFIG_LINKS include/apti18n.h:buildlib/gettext.h" ;;
   "include/inttypes.h" ) CONFIG_LINKS="$CONFIG_LINKS include/inttypes.h:buildlib/inttypes.h" ;;
   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
   "include/apti18n.h" ) CONFIG_LINKS="$CONFIG_LINKS include/apti18n.h:buildlib/gettext.h" ;;
   "include/inttypes.h" ) CONFIG_LINKS="$CONFIG_LINKS include/inttypes.h:buildlib/inttypes.h" ;;
index 1f1355d..acbe320 100644 (file)
@@ -240,6 +240,7 @@ AC_CONFIG_FILES([
          cmdline/Makefile
          tools/Makefile
          doc/Makefile
          cmdline/Makefile
          tools/Makefile
          doc/Makefile
+         test/Makefile
          po/Makefile.in
          ])
 AC_CONFIG_LINKS([include/apti18n.h:buildlib/gettext.h])
          po/Makefile.in
          ])
 AC_CONFIG_LINKS([include/apti18n.h:buildlib/gettext.h])
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644 (file)
index 0000000..7195c0c
--- /dev/null
@@ -0,0 +1,33 @@
+noinst_PROGRAMS =
+EXTRA_PROGRAMS =
+
+# Program for testing methods
+noinst_PROGRAMS += mthdcat
+mthdcat_SOURCES = mthdcat.cc
+
+# Program for testing methods
+noinst_PROGRAMS += uritest
+uritest_SOURCES = uri.cc
+uritest_LDADD = ../apt-pkg/libapt-pkg.la
+
+# Scratch program to test incomplete code fragments in
+noinst_PROGRAMS += scratch-test
+scratch_test_SOURCES = scratch.cc
+scratch_test_LDADD = ../apt-pkg/libapt-pkg.la
+
+# Version compare tester
+noinst_PROGRAMS +=versiontest
+versiontest_SOURCES = versiontest.cc
+versiontest_LDADD = ../apt-pkg/libapt-pkg.la
+
+# Program for testing the config file parser
+noinst_PROGRAMS += conftest
+conftest_SOURCES = conf.cc
+conftest_LDADD = ../apt-pkg/libapt-pkg.la
+
+# Program for testing hashes
+noinst_PROGRAMS += hash
+hash_SOURCES = hash.cc
+hash_LDADD = ../apt-pkg/libapt-pkg.la
+
+EXTRA_DIST = versions.lst
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644 (file)
index 0000000..924b100
--- /dev/null
@@ -0,0 +1,513 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = mthdcat$(EXEEXT) uritest$(EXEEXT) \
+       scratch-test$(EXEEXT) versiontest$(EXEEXT) conftest$(EXEEXT) \
+       hash$(EXEEXT)
+EXTRA_PROGRAMS =
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_conftest_OBJECTS = conf.$(OBJEXT)
+conftest_OBJECTS = $(am_conftest_OBJECTS)
+conftest_DEPENDENCIES = ../apt-pkg/libapt-pkg.la
+am_hash_OBJECTS = hash.$(OBJEXT)
+hash_OBJECTS = $(am_hash_OBJECTS)
+hash_DEPENDENCIES = ../apt-pkg/libapt-pkg.la
+am_mthdcat_OBJECTS = mthdcat.$(OBJEXT)
+mthdcat_OBJECTS = $(am_mthdcat_OBJECTS)
+mthdcat_LDADD = $(LDADD)
+am_scratch_test_OBJECTS = scratch.$(OBJEXT)
+scratch_test_OBJECTS = $(am_scratch_test_OBJECTS)
+scratch_test_DEPENDENCIES = ../apt-pkg/libapt-pkg.la
+am_uritest_OBJECTS = uri.$(OBJEXT)
+uritest_OBJECTS = $(am_uritest_OBJECTS)
+uritest_DEPENDENCIES = ../apt-pkg/libapt-pkg.la
+am_versiontest_OBJECTS = versiontest.$(OBJEXT)
+versiontest_OBJECTS = $(am_versiontest_OBJECTS)
+versiontest_DEPENDENCIES = ../apt-pkg/libapt-pkg.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/buildlib/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(conftest_SOURCES) $(hash_SOURCES) $(mthdcat_SOURCES) \
+       $(scratch_test_SOURCES) $(uritest_SOURCES) \
+       $(versiontest_SOURCES)
+DIST_SOURCES = $(conftest_SOURCES) $(hash_SOURCES) $(mthdcat_SOURCES) \
+       $(scratch_test_SOURCES) $(uritest_SOURCES) \
+       $(versiontest_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMPILE_APTSHELL_FALSE = @COMPILE_APTSHELL_FALSE@
+COMPILE_APTSHELL_TRUE = @COMPILE_APTSHELL_TRUE@
+COMPILE_STATIC_FALSE = @COMPILE_STATIC_FALSE@
+COMPILE_STATIC_TRUE = @COMPILE_STATIC_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GLIBC_VER = @GLIBC_VER@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSTDCPP_VER = @LIBSTDCPP_VER@
+LIBTOOL = @LIBTOOL@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+PTHREADLIB = @PTHREADLIB@
+RANLIB = @RANLIB@
+RPMLIBS = @RPMLIBS@
+RPM_PATH = @RPM_PATH@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOCKETLIBS = @SOCKETLIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WITH_LUA_FALSE = @WITH_LUA_FALSE@
+WITH_LUA_TRUE = @WITH_LUA_TRUE@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+mthdcat_SOURCES = mthdcat.cc
+uritest_SOURCES = uri.cc
+uritest_LDADD = ../apt-pkg/libapt-pkg.la
+scratch_test_SOURCES = scratch.cc
+scratch_test_LDADD = ../apt-pkg/libapt-pkg.la
+versiontest_SOURCES = versiontest.cc
+versiontest_LDADD = ../apt-pkg/libapt-pkg.la
+conftest_SOURCES = conf.cc
+conftest_LDADD = ../apt-pkg/libapt-pkg.la
+hash_SOURCES = hash.cc
+hash_LDADD = ../apt-pkg/libapt-pkg.la
+EXTRA_DIST = versions.lst
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  test/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
+conftest$(EXEEXT): $(conftest_OBJECTS) $(conftest_DEPENDENCIES) 
+       @rm -f conftest$(EXEEXT)
+       $(CXXLINK) $(conftest_LDFLAGS) $(conftest_OBJECTS) $(conftest_LDADD) $(LIBS)
+hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) 
+       @rm -f hash$(EXEEXT)
+       $(CXXLINK) $(hash_LDFLAGS) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
+mthdcat$(EXEEXT): $(mthdcat_OBJECTS) $(mthdcat_DEPENDENCIES) 
+       @rm -f mthdcat$(EXEEXT)
+       $(CXXLINK) $(mthdcat_LDFLAGS) $(mthdcat_OBJECTS) $(mthdcat_LDADD) $(LIBS)
+scratch-test$(EXEEXT): $(scratch_test_OBJECTS) $(scratch_test_DEPENDENCIES) 
+       @rm -f scratch-test$(EXEEXT)
+       $(CXXLINK) $(scratch_test_LDFLAGS) $(scratch_test_OBJECTS) $(scratch_test_LDADD) $(LIBS)
+uritest$(EXEEXT): $(uritest_OBJECTS) $(uritest_DEPENDENCIES) 
+       @rm -f uritest$(EXEEXT)
+       $(CXXLINK) $(uritest_LDFLAGS) $(uritest_OBJECTS) $(uritest_LDADD) $(LIBS)
+versiontest$(EXEEXT): $(versiontest_OBJECTS) $(versiontest_DEPENDENCIES) 
+       @rm -f versiontest$(EXEEXT)
+       $(CXXLINK) $(versiontest_LDFLAGS) $(versiontest_OBJECTS) $(versiontest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mthdcat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scratch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uri.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versiontest.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
+@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index 340647b..daa3d98 100644 (file)
@@ -7,6 +7,11 @@ int main(int argc,const char *argv[])
 {
    Configuration Cnf;
    
 {
    Configuration Cnf;
    
+   if (argc < 2)
+   {
+      cerr << "You must specify a test file" << endl;
+      return 0;
+   }
    ReadConfigFile(Cnf,argv[1],true);
    
    // Process 'simple-key' type sections
    ReadConfigFile(Cnf,argv[1],true);
    
    // Process 'simple-key' type sections
diff --git a/test/extract-control.cc b/test/extract-control.cc
deleted file mode 100644 (file)
index 29dcbf3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <apt-pkg/debfile.h>
-#include <apt-pkg/error.h>
-
-#include <iostream>
-#include <unistd.h>
-
-using namespace std;
-
-bool ExtractMember(const char *File,const char *Member)
-{
-   FileFd Fd(File,FileFd::ReadOnly);
-   debDebFile Deb(Fd);
-   if(_error->PendingError() == true)
-      return false;
-   
-   debDebFile::MemControlExtract Extract(Member);
-   if (Extract.Read(Deb) == false)
-      return false;
-   
-   if (Extract.Control == 0)
-      return true;
-   
-   write(STDOUT_FILENO,Extract.Control,Extract.Length);
-   return true;
-}
-
-int main(int argc, const char *argv[])
-{
-   if (argc < 2)
-   {
-      cerr << "Need two arguments, a .deb and the control member" << endl;
-      return 100;
-   }
-   
-   if (ExtractMember(argv[1],argv[2]) == false)
-   {
-      _error->DumpErrors();
-      return 100;
-   }
-   
-   return 0;
-}
diff --git a/test/makefile b/test/makefile
deleted file mode 100644 (file)
index 9ad6233..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# -*- make -*-
-BASE=..
-SUBDIR=test
-
-# Bring in the default rules
-include ../buildlib/defaults.mak
-
-# Program for testing methods
-PROGRAM=mthdcat
-SLIBS = 
-SOURCE = mthdcat.cc
-include $(PROGRAM_H)
-
-# Program for testing methods
-PROGRAM=uritest
-SLIBS = -lapt-pkg
-SOURCE = uri.cc
-include $(PROGRAM_H)
-
-# Scratch program to test incomplete code fragments in
-PROGRAM=scratch-test
-SLIBS = -lapt-inst -lapt-pkg
-LIB_MAKES = apt-pkg/makefile apt-inst/makefile
-SOURCE = scratch.cc
-include $(PROGRAM_H)
-
-# Version compare tester
-PROGRAM=versiontest
-SLIBS = -lapt-pkg 
-LIB_MAKES = apt-pkg/makefile
-SOURCE = versiontest.cc
-include $(PROGRAM_H)
-
-# Version compare tester
-PROGRAM=testextract
-SLIBS = -lapt-pkg -lapt-inst
-LIB_MAKES = apt-pkg/makefile apt-inst/makefile
-SOURCE = testextract.cc
-include $(PROGRAM_H)
-
-# Program for testing the config file parser
-PROGRAM=conftest
-SLIBS = -lapt-pkg
-SOURCE = conf.cc
-include $(PROGRAM_H)
-
-# Program for testing the tar/deb extractor
-PROGRAM=testdeb
-SLIBS = -lapt-pkg -lapt-inst
-SOURCE = testdeb.cc
-include $(PROGRAM_H)
-
-# Program for testing tar extraction
-PROGRAM=extract-control
-SLIBS = -lapt-pkg -lapt-inst
-SOURCE = extract-control.cc
-include $(PROGRAM_H)
-
-# Program for testing hashes
-PROGRAM=hash
-SLIBS = -lapt-pkg 
-SOURCE = hash.cc
-include $(PROGRAM_H)
-
-# Program for checking rpm versions
-PROGRAM=rpmver
-SLIBS = -lapt-pkg -lrpm
-SOURCE = rpmver.cc
-include $(PROGRAM_H)
diff --git a/test/rpmver.cc b/test/rpmver.cc
deleted file mode 100644 (file)
index 9fc807d..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#include <apt-pkg/debversion.h>
-#include <rpm/rpmio.h>
-#include <rpm/misc.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define xisdigit(x) isdigit(x)
-#define xisalpha(x) isalpha(x)
-#define xisalnum(x) (isdigit(x) || isalpha(x))
-
-using namespace std;
-
-int rpmvercmp(const char * a, const char * b)
-{
-    char oldch1, oldch2;
-    char * str1, * str2;
-    char * one, * two;
-    int rc;
-    int isnum;
-
-    /* easy comparison to see if versions are identical */
-    if (!strcmp(a, b)) return 0;
-
-    str1 = (char *)alloca(strlen(a) + 1);
-    str2 = (char *)alloca(strlen(b) + 1);
-
-    strcpy(str1, a);
-    strcpy(str2, b);
-
-    one = str1;
-    two = str2;
-   
-    /* loop through each version segment of str1 and str2 and compare them */
-    while (*one && *two) {
-       while (*one && !xisalnum(*one)) one++;
-       while (*two && !xisalnum(*two)) two++;
-
-       str1 = one;
-       str2 = two;
-
-       /* grab first completely alpha or completely numeric segment */
-       /* leave one and two pointing to the start of the alpha or numeric */
-       /* segment and walk str1 and str2 to end of segment */
-       if (xisdigit(*str1)) {
-           while (*str1 && xisdigit(*str1)) str1++;
-           while (*str2 && xisdigit(*str2)) str2++;
-           isnum = 1;
-       } else {
-           while (*str1 && xisalpha(*str1)) str1++;
-           while (*str2 && xisalpha(*str2)) str2++;
-           isnum = 0;
-       }
-
-       /* save character at the end of the alpha or numeric segment */
-       /* so that they can be restored after the comparison */
-       oldch1 = *str1;
-       *str1 = '\0';
-       oldch2 = *str2;
-       *str2 = '\0';
-
-       /* take care of the case where the two version segments are */
-       /* different types: one numeric, the other alpha (i.e. empty) */
-       if (one == str1) return -1;     /* arbitrary */
-       if (two == str2) return 1;
-
-       if (isnum) {
-           /* this used to be done by converting the digit segments */
-           /* to ints using atoi() - it's changed because long  */
-           /* digit segments can overflow an int - this should fix that. */
-
-           /* throw away any leading zeros - it's a number, right? */
-           while (*one == '0') one++;
-           while (*two == '0') two++;
-
-           /* whichever number has more digits wins */
-           if (strlen(one) > strlen(two)) return 1;
-           if (strlen(two) > strlen(one)) return -1;
-       }
-
-       /* strcmp will return which one is greater - even if the two */
-       /* segments are alpha or if they are numeric.  don't return  */
-       /* if they are equal because there might be more segments to */
-       /* compare */
-       rc = strcmp(one, two);
-       if (rc) return rc;
-
-       /* restore character that was replaced by null above */
-       *str1 = oldch1;
-       one = str1;
-       *str2 = oldch2;
-       two = str2;
-    }
-
-    /* this catches the case where all numeric and alpha segments have */
-    /* compared identically but the segment sepparating characters were */
-    /* different */
-    if ((!*one) && (!*two)) return 0;
-
-    /* whichever version still has characters left over wins */
-    if (!*one) return -1; else return 1;
-}
-
-int main(int argc,const char *argv[])
-{
-   printf("%i\n",strcmp(argv[1],argv[2]));
-   
-   printf("'%s' <> '%s':  ",argv[1],argv[2]);
-   printf("rpm: %i   deb:  %i\n",rpmvercmp(argv[1],argv[2]),
-         debVS.CmpFragment(argv[1],argv[1]+strlen(argv[1]),
-                           argv[2],argv[2]+strlen(argv[2])));
-   
-   printf("'%s' <> '%s':  ",argv[2],argv[1]);
-   printf("rpm: %i   deb:  %i\n",rpmvercmp(argv[2],argv[1]),
-         debVS.CmpFragment(argv[2],argv[2]+strlen(argv[2]),
-                           argv[1],argv[1]+strlen(argv[1])));
-   return 0;
-}
index d638c70..5256e3f 100644 (file)
@@ -1,9 +1,6 @@
-#include <apt-pkg/dpkgdb.h>
-#include <apt-pkg/debfile.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/progress.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/progress.h>
-#include <apt-pkg/extract.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/fileutl.h>
 
 #include <apt-pkg/init.h>
 #include <apt-pkg/fileutl.h>
 
@@ -14,92 +11,7 @@ int main(int argc,char *argv[])
    pkgInitConfig(*_config);
    pkgInitSystem(*_config,_system);
 
    pkgInitConfig(*_config);
    pkgInitSystem(*_config,_system);
 
-//   cout << flNoLink(argv[1]) << endl;
-   
-//   #if 0
-/*   DynamicMMap *FileMap = new DynamicMMap(MMap::Public);
-   pkgFLCache *FList = new pkgFLCache(*FileMap);
-   
-   char *Name = "/tmp/test";
-   pkgFLCache::PkgIterator Pkg(*FList,0);
-   pkgFLCache::NodeIterator Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false);
-   cout << (pkgFLCache::Node *)Node << endl;
-   Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false);
-   cout << (pkgFLCache::Node *)Node << endl;
-*/
-//   #if 0
-   _config->Set("Dir::State::status","/tmp/testing/status");
+   // do something... 
 
 
-   debDpkgDB Db;
-   
-   {
-      OpTextProgress Prog;
-      
-      if (Db.ReadyPkgCache(Prog) == false)
-        cerr << "Error!" << endl;
-      Prog.Done();
-      
-      if (Db.ReadyFileList(Prog) == false)
-        cerr << "Error!" << endl;
-   }
-   
-   if (_error->PendingError() == true)
-   {
-      _error->DumpErrors();
-      return 0;
-   }
-   
-/*   Db.GetFLCache().BeginDiverLoad();
-   pkgFLCache::PkgIterator Pkg(Db.GetFLCache(),0);
-   if (Db.GetFLCache().AddDiversion(Pkg,"/usr/include/linux/kerneld.h","/usr/bin/nslookup") == false)
-      cerr << "Error!" << endl;
-
-   const char *Tmp = "/usr/include/linux/kerneld.h";
-   pkgFLCache::NodeIterator Nde = Db.GetFLCache().GetNode(Tmp,Tmp+strlen(Tmp),0,false,false);
-   map_ptrloc Loc = Nde->File;
-      
-   for (; Nde.end() == false && Nde->File == Loc; Nde++)
-      cout << Nde->Flags << ',' << Nde->Pointer << ',' << Nde.File() << endl;
-   Db.GetFLCache().FinishDiverLoad();*/
-
-/*   unsigned int I = 0;
-   pkgFLCache &Fl = Db.GetFLCache();
-   while (I < Fl.HeaderP->HashSize)
-   {
-      cout << I << endl;
-      pkgFLCache::NodeIterator Node(Fl,Fl.NodeP + Fl.HeaderP->FileHash + I++);
-      if (Node->Pointer == 0)
-        continue;
-      for (; Node.end() == false; Node++)
-      {
-        cout << Node.DirN() << '/' << Node.File();
-        if (Node->Flags == pkgFLCache::Node::Diversion)
-           cout << " (div)";
-        if (Node->Flags == pkgFLCache::Node::ConfFile)
-           cout << " (conf)";
-        cout << endl;
-      }
-   }*/
-
-   for (int I = 1; I < argc; I++)
-   {
-      FileFd F(argv[I],FileFd::ReadOnly);
-      debDebFile Deb(F);
-      
-      if (Deb.ExtractControl(Db) == false)
-        cerr << "Error!" << endl;
-      cout << argv[I] << endl;
-      
-      pkgCache::VerIterator Ver = Deb.MergeControl(Db);
-      if (Ver.end() == true)
-        cerr << "Failed" << endl;
-      else
-        cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl;
-      
-      pkgExtract Extract(Db.GetFLCache(),Ver);
-      Deb.ExtractArchive(Extract);
-   }
-//   #endif
-//#endif      
    _error->DumpErrors();
 }
    _error->DumpErrors();
 }
diff --git a/test/testdeb.cc b/test/testdeb.cc
deleted file mode 100644 (file)
index 5986621..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <apt-pkg/dirstream.h>
-#include <apt-pkg/debfile.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/extracttar.h>
-
-class NullStream : public pkgDirStream
-{
-   public:
-   virtual bool DoItem(Item &Itm,int &Fd) {return true;};
-};
-
-bool Test(const char *File)
-{
-   FileFd Fd(File,FileFd::ReadOnly);
-   debDebFile Deb(Fd);
-   
-   if (_error->PendingError() == true)
-      return false;
-   
-   // Get the archive member and positition the file 
-   const ARArchive::Member *Member = Deb.GotoMember("data.tar.gz");
-   if (Member == 0)
-      return false;
-      
-   // Extract it.
-   ExtractTar Tar(Deb.GetFile(),Member->Size);
-   NullStream Dir;
-   if (Tar.Go(Dir) == false)
-      return false;   
-   
-   return true;
-}
-
-int main(int argc, const char *argv[])
-{
-   Test(argv[1]);
-   _error->DumpErrors();
-   return 0;
-}
diff --git a/test/testextract.cc b/test/testextract.cc
deleted file mode 100644 (file)
index 1c738aa..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <apt-pkg/dpkgdb.h>
-#include <apt-pkg/debfile.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/extract.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/strutl.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-using namespace std;
-
-bool Go(int argc,char *argv[])
-{
-   // Init the database
-   debDpkgDB Db;   
-   {
-      OpTextProgress Prog;
-
-      if (Db.ReadyPkgCache(Prog) == false)
-        return false;
-      Prog.Done();
-      
-      if (Db.ReadyFileList(Prog) == false)
-        return false;
-   }
-
-   for (int I = 1; I < argc; I++)
-   {
-      const char *Fake = 0;
-      for (unsigned J = 0; argv[I][J] != 0; J++)
-      {
-        if (argv[I][J] != ',')
-           continue;
-        Fake = argv[I] + J + 1;
-        argv[I][J] = 0;
-      }
-      
-      FileFd F(argv[I],FileFd::ReadOnly);
-      debDebFile Deb(F);
-
-      if (_error->PendingError() == true)
-        return false;
-      
-      if (Deb.ExtractControl(Db) == false)
-        return false;
-      cout << argv[I] << endl;
-      
-      pkgCache::VerIterator Ver = Deb.MergeControl(Db);
-      if (Ver.end() == true)
-        return false;
-      
-      cout << Ver.ParentPkg().Name() << ' ' << Ver.VerStr() << endl;
-      
-      pkgExtract Extract(Db.GetFLCache(),Ver);
-      
-      if (Fake != 0)
-      {
-        pkgExtract::Item Itm;
-        memset(&Itm,0,sizeof(Itm));
-        FILE *F = fopen(Fake,"r");
-        while (feof(F) == 0)
-        {
-           char Line[300];
-           fgets(Line,sizeof(Line),F);
-           Itm.Name = _strstrip(Line);
-           Itm.Type = pkgDirStream::Item::File;
-           if (Line[strlen(Line)-1] == '/')
-              Itm.Type = pkgDirStream::Item::Directory;
-
-           int Fd;
-           if (Extract.DoItem(Itm,Fd) == false)
-              return false;
-        }       
-      }
-      else
-        if (Deb.ExtractArchive(Extract) == false)
-           return false;
-   }
-   return true;
-}
-
-int main(int argc,char *argv[])
-{
-   pkgInitConfig(*_config);
-   pkgInitSystem(*_config,_system);
-   _config->Set("Dir::State::status","/tmp/testing/status");
-
-   Go(argc,argv);
-   
-   if (_error->PendingError() == true)
-   {
-      _error->DumpErrors();
-      return 0;
-   }
-}
index bd0696d..e7e3d7f 100644 (file)
@@ -17,7 +17,7 @@
 #include <system.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/version.h>
 #include <system.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/version.h>
-#include <apt-pkg/debversion.h>
+#include <apt-pkg/rpmversion.h>
 #include <iostream>
 #include <fstream>
 
 #include <iostream>
 #include <fstream>
 
@@ -175,7 +175,7 @@ bool RunTest(const char *File)
       // Result
       I++;
       int Expected = atoi(I);
       // Result
       I++;
       int Expected = atoi(I);
-      int Res = debVS.CmpVersion(A.c_str(), B.c_str());
+      int Res = rpmVS.CmpVersion(A.c_str(), B.c_str());
       int Res2 = verrevcmp(A.c_str(),B.c_str());
       cout << "'" << A << "' ? '" << B << "' = " << Res << " (= " << Expected << ") " << Res2 << endl;
 
       int Res2 = verrevcmp(A.c_str(),B.c_str());
       cout << "'" << A << "' ? '" << B << "' = " << Res << " (= " << Expected << ") " << Res2 << endl;
 
@@ -189,7 +189,7 @@ bool RunTest(const char *File)
 
       // Check the reverse as well
       Expected = -1*Expected;
 
       // Check the reverse as well
       Expected = -1*Expected;
-      Res = debVS.CmpVersion(B.c_str(), A.c_str());
+      Res = rpmVS.CmpVersion(B.c_str(), A.c_str());
       Res2 = verrevcmp(B.c_str(),A.c_str());
 
       cout << "'" << B << "' ? '" << A << "' = " << Res << " (= " << Expected << ") " << Res2 << endl;
       Res2 = verrevcmp(B.c_str(),A.c_str());
 
       cout << "'" << B << "' ? '" << A << "' = " << Res << " (= " << Expected << ") " << Res2 << endl;