summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--buildlib/makefile.in5
-rw-r--r--doc/examples/apt.conf11
-rw-r--r--test/makefile12
-rw-r--r--test/scratch.cc22
5 files changed, 47 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a2b513423..e7990fb90 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@
.PHONY: headers library clean veryclean all binary program doc
all headers library clean veryclean binary program doc:
$(MAKE) -C apt-pkg $@
+ $(MAKE) -C methods $@
$(MAKE) -C cmdline $@
$(MAKE) -C deity $@
$(MAKE) -C gui $@
diff --git a/buildlib/makefile.in b/buildlib/makefile.in
index f53b8cca9..424ed1e46 100644
--- a/buildlib/makefile.in
+++ b/buildlib/makefile.in
@@ -5,8 +5,9 @@
.SILENT:
SRCDIR=@top_srcdir@
-SUBDIRS:=./doc ./bin ./obj ./include/apt-pkg ./include/deity
-SUBDIRS+=./obj/doc ./obj/apt-pkg ./obj/deity ./obj/gui ./obj/cmdline
+SUBDIRS:=./doc ./bin ./bin/methods ./obj ./include/apt-pkg ./include/deity
+SUBDIRS+=./obj/doc ./obj/apt-pkg ./obj/deity ./obj/gui ./obj/cmdline \
+ ./obj/test ./obj/methods
BUILD:=$(shell pwd)
export BUILD
diff --git a/doc/examples/apt.conf b/doc/examples/apt.conf
index 9b96a30c5..8cd9c3b43 100644
--- a/doc/examples/apt.conf
+++ b/doc/examples/apt.conf
@@ -1,4 +1,4 @@
-// $Id: apt.conf,v 1.2 1998/10/08 04:55:07 jgg Exp $
+// $Id: apt.conf,v 1.3 1998/10/20 02:41:06 jgg Exp $
/* This file is an index of all APT configuration directives. It should
NOT actually be used as a real config file, though it is a completely
valid file.
@@ -18,6 +18,7 @@ APT {
Dir
{
+
State "/var/state/apt/"
{
lists "lists/";
@@ -36,6 +37,11 @@ Dir
sourcelist "sources.list";
main "apt.conf";
};
+
+ Bin {
+ methods "/home/jgg/work/apt/build/bin/methods/";
+ gzip "gzip";
+ };
};
DSelect {
@@ -43,5 +49,6 @@ DSelect {
}
Debug {
- pkgProblemResolver "false";
+ pkgProblemResolver "true";
+ pkgAcquire::Worker "true";
}
diff --git a/test/makefile b/test/makefile
new file mode 100644
index 000000000..299389873
--- /dev/null
+++ b/test/makefile
@@ -0,0 +1,12 @@
+# -*- make -*-
+BASE=..
+SUBDIR=test
+
+# Bring in the default rules
+include ../buildlib/defaults.mak
+
+# Scratch program to test incomplete code fragments in
+PROGRAM=scratch-test
+SLIBS = -lapt-pkg
+SOURCE = scratch.cc
+include $(PROGRAM_H)
diff --git a/test/scratch.cc b/test/scratch.cc
new file mode 100644
index 000000000..577ab5f9b
--- /dev/null
+++ b/test/scratch.cc
@@ -0,0 +1,22 @@
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/init.h>
+#include <apt-pkg/error.h>
+
+int main()
+{
+ pkgInitialize(*_config);
+
+ pkgSourceList List;
+ pkgAcquire Fetcher;
+ List.ReadMainList();
+
+ pkgSourceList::const_iterator I;
+ for (I = List.begin(); I != List.end(); I++)
+ {
+ new pkgAcqIndex(&Fetcher,I);
+ if (_error->PendingError() == true)
+ break;
+ }
+
+ _error->DumpErrors();
+}