]> git.pld-linux.org Git - packages/aptitude.git/blame - aptitude-make.patch
- part of a patch - I don't know what is in new rpm replacement of dbindex.h
[packages/aptitude.git] / aptitude-make.patch
CommitLineData
6c076514
AM
1diff -urN aptitude-0.0.7.15.org/configure.in aptitude-0.0.7.15/configure.in
2--- aptitude-0.0.7.15.org/configure.in Sat Feb 24 15:23:02 2001
3+++ aptitude-0.0.7.15/configure.in Sat Feb 24 15:34:05 2001
4@@ -10,8 +10,10 @@
5 AC_PROG_CXX
6 AC_PROG_RANLIB
7
8+LIBS="$LIBS -lrpm -lrpmbuild -lrpmio -lpopt"
9+
10 dnl Checks for libraries.
11-AC_CHECK_LIB(curses, initscr)
12+AC_CHECK_LIB(ncurses, initscr)
13 AC_CHECK_LIB(apt-pkg, main, , AC_MSG_ERROR([Can't find the APT libraries -- please install libapt-pkg-dev]))
14 AC_CHECK_LIB(pthread, main,
15 HAVE_LIBPTHREAD=1
16diff -urN aptitude-0.0.7.15.org/src/Makefile.am aptitude-0.0.7.15/src/Makefile.am
17--- aptitude-0.0.7.15.org/src/Makefile.am Sat Feb 24 15:23:02 2001
18+++ aptitude-0.0.7.15/src/Makefile.am Sat Feb 24 15:23:11 2001
19@@ -3,7 +3,7 @@
20 SUBDIRS=generic vscreen
21
22 localedir = $(datadir)/locale
23-INCLUDES = -Wall -Werror -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl
24+INCLUDES = -Wall -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl #-Werror
25 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
26
27 bin_PROGRAMS=aptitude
28diff -urN aptitude-0.0.7.15.org/src/dep_item.cc aptitude-0.0.7.15/src/dep_item.cc
29--- aptitude-0.0.7.15.org/src/dep_item.cc Sat Feb 24 15:23:02 2001
30+++ aptitude-0.0.7.15/src/dep_item.cc Sat Feb 24 15:23:11 2001
31@@ -30,8 +30,11 @@
32
33 #include "generic/apt.h"
34
35-#include <apt-pkg/version.h>
36+//#include <apt-pkg/version.h>
37+#include <apt-pkg/systemfactory.h>
38 #include <apt-pkg/configuration.h>
39+
40+#define pkgCheckDep _system->checkDep
41
42 class pkg_depitem:public pkg_subtree
43 {
44diff -urN aptitude-0.0.7.15.org/src/download.cc aptitude-0.0.7.15/src/download.cc
45--- aptitude-0.0.7.15.org/src/download.cc Sat Feb 24 15:23:02 2001
46+++ aptitude-0.0.7.15/src/download.cc Sat Feb 24 15:23:11 2001
47@@ -23,6 +23,7 @@
48 #include <apt-pkg/error.h>
49 #include <apt-pkg/dpkgpm.h>
50 #include <apt-pkg/packagemanager.h>
51+#include <apt-pkg/systemfactory.h>
52 #include <apt-pkg/sourcelist.h>
53 #include <apt-pkg/acquire.h>
54 #include <apt-pkg/acquire-item.h>
55@@ -213,7 +214,9 @@
56 }
57
58 // Make a package manager, get ready to download
59- pkgDPkgPM pm(*apt_cache_file);
60+ //pkgDPkgPM pm(*apt_cache_file);
61+ pkgPackageManager *pm_ = _system->CreatePackageManager(*apt_cache_file);
62+ pkgPackageManager &pm = *pm_;
63 if(!pm.GetArchives(&fetcher, &list, apt_package_records) || _error->PendingError())
64 {
65 _error->Error(_("Internal error: couldn't generate list of packages to download"));
66@@ -294,7 +297,7 @@
67 }
68
69 fprintf(f, "Aptitude " VERSION ": log report\n\n");
70- fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\ndpkg problems may not be completed.\n\n"));
71+ fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\nrpm problems may not be completed.\n\n"));
72 fprintf(f, _("Will install %li packages, and remove %li packages.\n"), (*apt_cache_file)->InstCount(), (*apt_cache_file)->DelCount());
73 if((*apt_cache_file)->UsrSize()>0)
74 fprintf(f, _("%li bytes of disk space will be used\n"), (long int) (*apt_cache_file)->UsrSize());
75@@ -370,7 +373,7 @@
76 _error->DumpErrors();
77 cerr<<_("Ack! Something bad happened while installing packages. Trying to recover:")<<endl;
78 // and this is really a hack:
79- system("dpkg --configure -a");
80+ //system("dpkg --configure -a");
81 _error->Discard();
82 }
83
84diff -urN aptitude-0.0.7.15.org/src/generic/Makefile.am aptitude-0.0.7.15/src/generic/Makefile.am
85--- aptitude-0.0.7.15.org/src/generic/Makefile.am Sat Feb 24 15:23:02 2001
86+++ aptitude-0.0.7.15/src/generic/Makefile.am Sat Feb 24 15:23:11 2001
87@@ -1,7 +1,7 @@
88 MAINTAINERCLEANFILES=Makefile.in
89
90 localedir = $(datadir)/locale
91-INCLUDES = -Wall -Werror -I../../ -I$(srcdir) -I$(top_srcdir)/lib -I../../intl
92+INCLUDES = -Wall -I../../ -I$(srcdir) -I$(top_srcdir)/lib -I../../intl #-Werror
93 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
94 LDADD = @INTLLIBS@
95
96diff -urN aptitude-0.0.7.15.org/src/generic/aptcache.cc aptitude-0.0.7.15/src/generic/aptcache.cc
97--- aptitude-0.0.7.15.org/src/generic/aptcache.cc Sat Feb 24 15:23:02 2001
98+++ aptitude-0.0.7.15/src/generic/aptcache.cc Sat Feb 24 15:25:09 2001
99@@ -33,6 +33,7 @@
100 #include <apt-pkg/pkgsystem.h>
101 #include <apt-pkg/policy.h>
102 #endif
103+#include <apt-pkg/systemfactory.h>
104
105 #include <vector>
106
107@@ -266,7 +267,7 @@
108 {
109 if(lock==-1)
110 return true;
111- string statefile=_config->FindDir("Dir::Aptitude::state", "/var/state/aptitude")+"pkgstates";
112+ string statefile=_config->FindDir("Dir::Aptitude::state", "/var/lib/aptitude")+"pkgstates";
113
114 FileFd newstate(statefile+".new", FileFd::WriteEmpty);
115 if(!newstate.IsOpen())
116@@ -648,7 +649,7 @@
117 bool aptitudeCacheFile::Open(OpProgress &Progress, bool WithLock)
118 {
119 if(WithLock)
120- Lock=new pkgDpkgLock;
121+ Lock=new pkgRpmLock; // pkgDpkgLock;
122
123 if(_error->PendingError())
124 return false;
125@@ -659,7 +660,8 @@
126
127 if(WithLock)
128 {
129- pkgMakeStatusCache(List, Progress);
130+ //pkgMakeStatusCache(List, Progress);
131+ _system->makeStatusCache(List, Progress);
132 if(_error->PendingError())
133 return _error->Error(_("The package lists or status file could not be parsed or opened."));
134 if(!_error->empty())
135@@ -675,7 +677,8 @@
136 }
137 else
138 {
139- Map=pkgMakeStatusCacheMem(List, Progress);
140+ //Map=pkgMakeStatusCacheMem(List, Progress);
141+ Map=_system->makeStatusCacheMem(List, Progress);
142 Progress.Done();
143 if(!Map)
144 return false;
145diff -urN aptitude-0.0.7.15.org/src/generic/aptcache.h aptitude-0.0.7.15/src/generic/aptcache.h
146--- aptitude-0.0.7.15.org/src/generic/aptcache.h Sat Feb 24 15:23:02 2001
147+++ aptitude-0.0.7.15/src/generic/aptcache.h Sat Feb 24 15:25:42 2001
148@@ -31,6 +31,7 @@
149 #include <config.h>
150
151 #include <apt-pkg/depcache.h>
152+#include <apt-pkg/rpminit.h>
153
154 #ifndef HAVE_LIBAPT_PKG3
155 #include <apt-pkg/dpkginit.h>
156@@ -207,7 +208,8 @@
157 {
158 MMap *Map;
159 aptitudeDepCache *Cache;
160- pkgDpkgLock *Lock;
161+ //pkgDpkgLock *Lock;
162+ pkgRpmLock *Lock;
163 public:
164 // We look pretty much exactly like a pointer to a dep cache
165 inline operator aptitudeDepCache &() {return *Cache;};
166diff -urN aptitude-0.0.7.15.org/src/main.cc aptitude-0.0.7.15/src/main.cc
167--- aptitude-0.0.7.15.org/src/main.cc Sat Feb 24 15:23:02 2001
168+++ aptitude-0.0.7.15/src/main.cc Sat Feb 24 15:23:11 2001
169@@ -43,7 +43,9 @@
170
171 #include "../config.h"
172
173-#include <apt-pkg/init.h>
174+//#include <apt-pkg/init.h>
175+#include <apt-pkg/rpmfactory.h>
176+#include <apt-pkg/rpminit.h>
177
178 class mypkgtree:public pkg_tree
179 {
180@@ -95,6 +97,11 @@
181
182 int main(int argc, char *argv[])
183 {
184+ {
185+ static RPMFactory bla;
186+ static pkgRpmLock lock;
187+ }
188+
189 srandom(time(0));
190
191 setlocale(LC_ALL, "");
192diff -urN aptitude-0.0.7.15.org/src/pkg_columnizer.cc aptitude-0.0.7.15/src/pkg_columnizer.cc
193--- aptitude-0.0.7.15.org/src/pkg_columnizer.cc Sat Feb 24 15:23:02 2001
194+++ aptitude-0.0.7.15/src/pkg_columnizer.cc Sat Feb 24 15:24:01 2001
195@@ -32,6 +32,9 @@
196 #ifdef HAVE_LIBAPT_PKG3
197 #include <apt-pkg/pkgsystem.h>
198 #endif
199+#include <apt-pkg/systemfactory.h>
200+#define pkgCheckDep _system->checkDep
201+
202
203 column_definition_list *pkg_item::pkg_columnizer::columns=NULL;
204 column_definition_list *pkg_item::pkg_columnizer::status_columns=NULL;
205diff -urN aptitude-0.0.7.15.org/src/pkg_info_screen.cc aptitude-0.0.7.15/src/pkg_info_screen.cc
206--- aptitude-0.0.7.15.org/src/pkg_info_screen.cc Sat Feb 24 15:23:02 2001
207+++ aptitude-0.0.7.15/src/pkg_info_screen.cc Sat Feb 24 15:23:11 2001
208@@ -69,11 +69,13 @@
209 tree->add_child(new pkg_description(pkg.VersionList(), _("Description")));
210 tree->add_child(new vs_staticitem(_("Priority: "),ver.PriorityType()?ver.PriorityType():"Unknown"));
211 tree->add_child(new vs_staticitem(_("Section: "),pkg.Section()?pkg.Section():_("Unknown")));
212- tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
213+ //tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
214 tree->add_child(new vs_staticitem(_("Compressed size: "), SizeToStr(ver->Size)));
215 tree->add_child(new vs_staticitem(_("Uncompressed size: "), SizeToStr(ver->InstalledSize)));
216+#if 0
217 if(!rec.SourcePkg().empty())
218 tree->add_child(new vs_staticitem(_("Source Package: "),rec.SourcePkg()));
219+#endif
220
221 setup_package_deps<pkg_item_with_generic_subtree>(pkg, ver, tree);
222 }
223diff -urN aptitude-0.0.7.15.org/src/pkg_info_screen.cc.orig aptitude-0.0.7.15/src/pkg_info_screen.cc.orig
224--- aptitude-0.0.7.15.org/src/pkg_info_screen.cc.orig Thu Jan 1 01:00:00 1970
225+++ aptitude-0.0.7.15/src/pkg_info_screen.cc.orig Tue Dec 19 03:37:34 2000
226@@ -0,0 +1,106 @@
227+// pkg_info_screen.cc
228+//
229+// Copyright 2000 Daniel Burrows
230+//
231+// This program is free software; you can redistribute it and/or modify
232+// it under the terms of the GNU General Public License as published by
233+// the Free Software Foundation; either version 2 of the License, or
234+// (at your option) any later version.
235+//
236+// This program is distributed in the hope that it will be useful,
237+// but WITHOUT ANY WARRANTY; without even the implied warranty of
238+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
239+// GNU General Public License for more details.
240+//
241+// You should have received a copy of the GNU General Public License
242+// along with this program; see the file COPYING. If not, write to
243+// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
244+// Boston, MA 02111-1307, USA.
245+//
246+// Gathers information about a package into one
247+// spot (pkg_grouppolicy_info*) and provides dedicated code to display
248+// it (pkg_info_screen)
249+
250+#include "aptitude.h"
251+
252+#include "pkg_info_screen.h"
253+
254+#include "vscreen/vs_staticitem.h"
255+
256+#include "pkg_subtree.h"
257+#include "pkg_item_with_subtree.h"
258+#include "dep_item.h"
259+#include "pkg_ver_item.h"
260+#include "pkg_description_treeitem.h"
261+
262+#include "generic/apt.h"
263+
264+#include <apt-pkg/strutl.h>
265+
266+class pkg_grouppolicy_info:public pkg_grouppolicy
267+{
268+public:
269+ void add_package(pkgCache::PkgIterator pkg, pkg_subtree *root);
270+
271+ static void setup_package_info(pkgCache::PkgIterator pkg, pkgCache::VerIterator ver, pkg_item_with_generic_subtree *tree);
272+};
273+
274+void pkg_grouppolicy_info::add_package(pkgCache::PkgIterator pkg,
275+ pkg_subtree *root)
276+{
277+ pkg_item_with_generic_subtree *newtree=new pkg_item_with_generic_subtree(pkg, true);
278+
279+ setup_package_info(pkg, pkg_item::visible_version(pkg), newtree);
280+
281+ root->add_child(newtree);
282+}
283+
284+void pkg_grouppolicy_info::setup_package_info(pkgCache::PkgIterator pkg,
285+ pkgCache::VerIterator ver,
286+ pkg_item_with_generic_subtree *tree)
287+{
288+
289+ char buf[256];
290+
291+ if(!ver.end())
292+ {
293+
294+ pkgRecords::Parser &rec=apt_package_records->Lookup(ver.FileList());
295+ tree->add_child(new pkg_description(pkg.VersionList(), _("Description")));
296+ tree->add_child(new vs_staticitem(_("Priority: "),ver.PriorityType()?ver.PriorityType():"Unknown"));
297+ tree->add_child(new vs_staticitem(_("Section: "),pkg.Section()?pkg.Section():_("Unknown")));
298+ tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
299+ tree->add_child(new vs_staticitem(_("Compressed size: "), SizeToStr(ver->Size)));
300+ tree->add_child(new vs_staticitem(_("Uncompressed size: "), SizeToStr(ver->InstalledSize)));
301+ if(!rec.SourcePkg().empty())
302+ tree->add_child(new vs_staticitem(_("Source Package: "),rec.SourcePkg()));
303+
304+ setup_package_deps<pkg_item_with_generic_subtree>(pkg, ver, tree);
305+ }
306+
307+ snprintf(buf, 256, _("Packages which depend on %s"), pkg.Name());
308+ pkg_subtree *revtree=new pkg_subtree(buf);
309+ setup_package_deps<pkg_subtree>(pkg, ver, revtree, true);
310+ tree->add_child(revtree);
311+
312+ pkg_vertree_generic *newtree=new pkg_vertree_generic(_("Versions"), true);
313+ setup_package_versions(pkg, newtree);
314+ tree->add_child(newtree);
315+}
316+
317+pkg_info_screen::pkg_info_screen(pkgCache::PkgIterator pkg, pkgCache::VerIterator ver)
318+ :apt_info_tree(pkg.Name(), ver.end()?"":ver.VerStr())
319+{
320+ char buf[256];
321+ set_root(setup_new_root(pkg, ver), true);
322+ snprintf(buf, 256, _("Information about %s"), pkg.Name());
323+ set_header(buf);
324+}
325+
326+vs_treeitem *pkg_info_screen::setup_new_root(pkgCache::PkgIterator pkg,
327+ pkgCache::VerIterator ver)
328+{
329+ pkg_item_with_generic_subtree *tree=new pkg_item_with_generic_subtree(pkg, true);
330+ pkg_grouppolicy_info::setup_package_info(pkg, ver, tree);
331+ return tree;
332+}
333diff -urN aptitude-0.0.7.15.org/src/pkg_ver_item.cc aptitude-0.0.7.15/src/pkg_ver_item.cc
334--- aptitude-0.0.7.15.org/src/pkg_ver_item.cc Sat Feb 24 15:23:02 2001
335+++ aptitude-0.0.7.15/src/pkg_ver_item.cc Sat Feb 24 15:23:11 2001
336@@ -36,6 +36,8 @@
337 #include <apt-pkg/configuration.h>
338 #include <apt-pkg/strutl.h>
339
340+#define pkgCheckDep _system->checkDep
341+
342 class pkg_ver_columnizer:public column_generator
343 {
344 pkgCache::VerIterator ver;
345diff -urN aptitude-0.0.7.15.org/src/pkg_ver_item.h aptitude-0.0.7.15/src/pkg_ver_item.h
346--- aptitude-0.0.7.15.org/src/pkg_ver_item.h Sat Feb 24 15:23:02 2001
347+++ aptitude-0.0.7.15/src/pkg_ver_item.h Sat Feb 24 15:24:46 2001
348@@ -28,8 +28,11 @@
349 #include "pkg_grouppolicy.h"
350 #include "pkg_item_with_subtree.h"
351
352-#include <apt-pkg/version.h>
353+/* #include <apt-pkg/version.h> */
354 #include <apt-pkg/depcache.h>
355+#include <apt-pkg/systemfactory.h>
356+#include <apt-pkg/depcache.h>
357+#define pkgVersionCompare _system->versionCompare
358 #ifdef HAVE_LIBAPT_PKG3
359 #include <apt-pkg/pkgsystem.h>
360 #endif
361diff -urN aptitude-0.0.7.15.org/src/vs_progress.cc aptitude-0.0.7.15/src/vs_progress.cc
362--- aptitude-0.0.7.15.org/src/vs_progress.cc Sat Feb 24 15:23:02 2001
363+++ aptitude-0.0.7.15/src/vs_progress.cc Sat Feb 24 15:23:11 2001
364@@ -32,7 +32,7 @@
365
366 if(!Op.empty())
367 {
368- assert(Percent>=0 && Percent<=100);
369+ //assert(Percent>=0 && Percent<=100);
370 barsize=int(Percent*width/100.0);
371
372 snprintf(percent_string, 50, ": %i%%", int(Percent));
This page took 0.113233 seconds and 4 git commands to generate.