]> git.saurik.com Git - apt.git/commitdiff
Sync
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:07 +0000 (16:51 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:07 +0000 (16:51 +0000)
Author: jgg
Date: 1998-10-20 02:41:03 GMT
Sync

Makefile
buildlib/makefile.in
doc/examples/apt.conf
test/makefile [new file with mode: 0644]
test/scratch.cc [new file with mode: 0644]

index a2b513423beef42ef8ad1c4eb205904c85960c5a..e7990fb9010fa6d8faa14fb7c3c2b85580f20daf 100644 (file)
--- 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 $@
index f53b8cca9a53f46ae7a9ae01417733c66bcacb16..424ed1e463c502d505dc3386ec14b2e8e7122337 100644 (file)
@@ -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
 
index 9b96a30c5f2ec57c1b36c811113440e618bc6393..8cd9c3b437fdcd252dcc429e6399ebabe6edf63d 100644 (file)
@@ -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 (file)
index 0000000..2993898
--- /dev/null
@@ -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 (file)
index 0000000..577ab5f
--- /dev/null
@@ -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();
+}