Просмотр исходного кода

Sync
Author: jgg
Date: 1998-10-20 02:41:03 GMT
Sync

Arch Librarian лет назад: 22
Родитель
Сommit
024835dca7
5 измененных файлов с 47 добавлено и 4 удалено
  1. 1 0
      Makefile
  2. 3 2
      buildlib/makefile.in
  3. 9 2
      doc/examples/apt.conf
  4. 12 0
      test/makefile
  5. 22 0
      test/scratch.cc

+ 1 - 0
Makefile

@@ -7,6 +7,7 @@
 .PHONY: headers library clean veryclean all binary program doc
 .PHONY: headers library clean veryclean all binary program doc
 all headers library clean veryclean binary program doc:
 all headers library clean veryclean binary program doc:
 	$(MAKE) -C apt-pkg $@
 	$(MAKE) -C apt-pkg $@
+	$(MAKE) -C methods $@
 	$(MAKE) -C cmdline $@
 	$(MAKE) -C cmdline $@
 	$(MAKE) -C deity $@
 	$(MAKE) -C deity $@
 	$(MAKE) -C gui $@
 	$(MAKE) -C gui $@

+ 3 - 2
buildlib/makefile.in

@@ -5,8 +5,9 @@
 .SILENT:
 .SILENT:
 
 
 SRCDIR=@top_srcdir@
 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)
 BUILD:=$(shell pwd)
 export BUILD
 export BUILD
 
 

+ 9 - 2
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
 /* 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
    NOT actually be used as a real config file, though it is a completely
    valid file.
    valid file.
@@ -18,6 +18,7 @@ APT {
 
 
 Dir 
 Dir 
 {
 {
+  
   State "/var/state/apt/" 
   State "/var/state/apt/" 
   {
   {
      lists "lists/";
      lists "lists/";
@@ -36,6 +37,11 @@ Dir
      sourcelist "sources.list";
      sourcelist "sources.list";
      main "apt.conf";
      main "apt.conf";
   };
   };
+  
+  Bin {
+     methods "/home/jgg/work/apt/build/bin/methods/";
+     gzip "gzip";
+  };
 };
 };
 
 
 DSelect {
 DSelect {
@@ -43,5 +49,6 @@ DSelect {
 }
 }
 
 
 Debug {
 Debug {
-  pkgProblemResolver "false";
+  pkgProblemResolver "true";
+  pkgAcquire::Worker "true";
 }
 }

+ 12 - 0
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)

+ 22 - 0
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();
+}