]> git.pld-linux.org Git - packages/aptitude.git/blame - aptitude-patch1
- part of a patch - I don't know what is in new rpm replacement of dbindex.h
[packages/aptitude.git] / aptitude-patch1
CommitLineData
133e80e6
PG
1--- aptitude-0.0.8.2/src/generic/aptcache.cc.orig Sat Apr 7 17:53:06 2001
2+++ aptitude-0.0.8.2/src/generic/aptcache.cc Sat Apr 7 18:06:26 2001
3@@ -29,6 +29,7 @@
4 #include <apt-pkg/tagfile.h>
5 #include <apt-pkg/fileutl.h>
6 #include <apt-pkg/algorithms.h>
7+#include <apt-pkg/systemfactory.h>
8 #ifdef HAVE_LIBAPT_PKG3
9 #include <apt-pkg/pkgsystem.h>
10 #include <apt-pkg/policy.h>
11@@ -163,7 +164,7 @@
12 if(!pkgDepCache::Init(&Prog))
13 return false;
14
15- string statedir=_config->FindDir("Dir::Aptitude::state", "/var/state/aptitude");
16+ string statedir=_config->FindDir("Dir::Aptitude::state", "/var/lib/aptitude");
17 // Should this not go under Dir:: ? I'm not sure..
18 delete package_states;
19 package_states=new aptitude_state[Head().PackageCount];
20@@ -289,7 +290,7 @@
21 {
22 if(lock==-1)
23 return true;
24- string statefile=_config->FindDir("Dir::Aptitude::state", "/var/state/aptitude")+"pkgstates";
25+ string statefile=_config->FindDir("Dir::Aptitude::state", "/var/lib/aptitude")+"pkgstates";
26
27 FileFd newstate(statefile+".new", FileFd::WriteEmpty);
28 if(!newstate.IsOpen())
29@@ -689,7 +690,8 @@
30 bool aptitudeCacheFile::Open(OpProgress &Progress, bool WithLock)
31 {
32 if(WithLock)
33- Lock=new pkgDpkgLock;
34+ //Lock=new pkgDpkgLock;
35+ Lock=new pkgRpmLock; // pkgDpkgLock;
36
37 if(_error->PendingError())
38 return false;
39@@ -700,7 +702,8 @@
40
41 if(WithLock)
42 {
43- pkgMakeStatusCache(List, Progress);
44+ //pkgMakeStatusCache(List, Progress);
45+ _system->makeStatusCache(List, Progress);
46 if(_error->PendingError())
47 return _error->Error(_("The package lists or status file could not be parsed or opened."));
48 if(!_error->empty())
49@@ -716,7 +719,8 @@
50 }
51 else
52 {
53- Map=pkgMakeStatusCacheMem(List, Progress);
54+ //Map=pkgMakeStatusCacheMem(List, Progress);
55+ Map=_system->makeStatusCacheMem(List, Progress);
56 Progress.Done();
57 if(!Map)
58 return false;
59--- aptitude-0.0.8.2/src/generic/aptcache.h.orig Sat Apr 7 18:09:53 2001
60+++ aptitude-0.0.8.2/src/generic/aptcache.h Sat Apr 7 18:11:08 2001
61@@ -31,6 +31,7 @@
62 #include <config.h>
63
64 #include <apt-pkg/depcache.h>
65+#include <apt-pkg/rpminit.h>
66
67 #ifndef HAVE_LIBAPT_PKG3
68 #include <apt-pkg/dpkginit.h>
69@@ -212,7 +213,8 @@
70 {
71 MMap *Map;
72 aptitudeDepCache *Cache;
73- pkgDpkgLock *Lock;
74+ //pkgDpkgLock *Lock;
75+ pkgRpmLock *Lock;
76 public:
77 // We look pretty much exactly like a pointer to a dep cache
78 inline operator aptitudeDepCache &() {return *Cache;};
79--- aptitude-0.0.8.2/src/Makefile.am.orig Sat Apr 7 17:29:53 2001
80+++ aptitude-0.0.8.2/src/Makefile.am Sat Apr 7 17:39:20 2001
81@@ -3,7 +3,7 @@
82 SUBDIRS=generic vscreen
83
84 localedir = $(datadir)/locale
85-INCLUDES = -Wall -Werror -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl
86+INCLUDES = -Wall -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl #-Werror
87 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
88
89 bin_PROGRAMS=aptitude
90--- aptitude-0.0.8.2/src/dep_item.cc.orig Sat Apr 7 17:42:18 2001
91+++ aptitude-0.0.8.2/src/dep_item.cc Sat Apr 7 17:45:18 2001
92@@ -31,7 +31,11 @@
93 #include "generic/apt.h"
94
95 #include <apt-pkg/version.h>
96+#include <apt-pkg/systemfactory.h>
97+
98 #include <apt-pkg/configuration.h>
99+
100+#define pkgCheckDep _system->checkDep
101
102 class pkg_depitem:public pkg_subtree
103 {
104--- aptitude-0.0.8.2/src/download.cc.orig Sat Apr 7 17:46:41 2001
105+++ aptitude-0.0.8.2/src/download.cc Sat Apr 7 17:50:59 2001
106@@ -23,6 +23,7 @@
107 #include <apt-pkg/error.h>
108 #include <apt-pkg/dpkgpm.h>
109 #include <apt-pkg/packagemanager.h>
110+#include <apt-pkg/systemfactory.h>
111 #include <apt-pkg/sourcelist.h>
112 #include <apt-pkg/acquire.h>
113 #include <apt-pkg/acquire-item.h>
114@@ -213,7 +214,9 @@
115 }
116
117 // Make a package manager, get ready to download
118- pkgDPkgPM pm(*apt_cache_file);
119+ // pkgDPkgPM pm(*apt_cache_file);
120+ pkgPackageManager *pm_ = _system->CreatePackageManager(*apt_cache_file);
121+ pkgPackageManager &pm = *pm_;
122 if(!pm.GetArchives(&fetcher, &list, apt_package_records) || _error->PendingError())
123 {
124 _error->Error(_("Internal error: couldn't generate list of packages to download"));
125@@ -294,7 +297,7 @@
126 }
127
128 fprintf(f, "Aptitude " VERSION ": log report\n\n");
129- fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\ndpkg problems may not be completed.\n\n"));
130+ fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\nrpm problems may not be completed.\n\n"));
131 fprintf(f, _("Will install %li packages, and remove %li packages.\n"), (*apt_cache_file)->InstCount(), (*apt_cache_file)->DelCount());
132 if((*apt_cache_file)->UsrSize()>0)
133 fprintf(f, _("%li bytes of disk space will be used\n"), (long int) (*apt_cache_file)->UsrSize());
134@@ -370,7 +373,7 @@
135 _error->DumpErrors();
136 cerr<<_("Ack! Something bad happened while installing packages. Trying to recover:")<<endl;
137 // and this is really a hack:
138- system("dpkg --configure -a");
139+ // system("dpkg --configure -a");
140 _error->Discard();
141 }
142
143--- aptitude-0.0.8.2/src/pkg_columnizer.cc.orig Sat Apr 7 18:14:34 2001
144+++ aptitude-0.0.8.2/src/pkg_columnizer.cc Sat Apr 7 18:15:26 2001
145@@ -28,7 +28,11 @@
146 #include <apt-pkg/strutl.h>
147 #include <apt-pkg/error.h>
148 #include <apt-pkg/configuration.h>
149-#include <apt-pkg/version.h>
150+//#include <apt-pkg/version.h>
151+#include <apt-pkg/systemfactory.h>
152+
153+#define pkgCheckDep _system->checkDep
154+
155 #ifdef HAVE_LIBAPT_PKG3
156 #include <apt-pkg/pkgsystem.h>
157 #endif
158--- aptitude-0.0.8.2/src/pkg_info_screen.cc.orig Sat Apr 7 18:15:42 2001
159+++ aptitude-0.0.8.2/src/pkg_info_screen.cc Sat Apr 7 18:16:27 2001
160@@ -69,7 +69,7 @@
161 tree->add_child(new pkg_description(pkg.VersionList(), _("Description")));
162 tree->add_child(new vs_staticitem(_("Priority: "),ver.PriorityType()?ver.PriorityType():"Unknown"));
163 tree->add_child(new vs_staticitem(_("Section: "),pkg.Section()?pkg.Section():_("Unknown")));
164- tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
165+ //tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
166 tree->add_child(new vs_staticitem(_("Compressed size: "), SizeToStr(ver->Size)));
167 tree->add_child(new vs_staticitem(_("Uncompressed size: "), SizeToStr(ver->InstalledSize)));
168 if(!rec.SourcePkg().empty())
169--- aptitude-0.0.8.2/src/pkg_ver_item.cc.orig Sat Apr 7 18:17:28 2001
170+++ aptitude-0.0.8.2/src/pkg_ver_item.cc Sat Apr 7 18:20:32 2001
171@@ -35,6 +35,9 @@
172 #include <string>
173 #include <apt-pkg/configuration.h>
174 #include <apt-pkg/strutl.h>
175+#include <apt-pkg/systemfactory.h>
176+
177++#define pkgVersionCompare _system->versionCompare
178
179 class pkg_ver_columnizer:public column_generator
180 {
181--- aptitude-0.0.8.2/src/vs_progress.cc.orig Sat Apr 7 18:21:03 2001
182+++ aptitude-0.0.8.2/src/vs_progress.cc Sat Apr 7 18:21:32 2001
183@@ -32,7 +32,7 @@
184
185 if(!Op.empty())
186 {
187- assert(Percent>=0 && Percent<=100);
188+ //assert(Percent>=0 && Percent<=100);
189 barsize=int(Percent*width/100.0);
190
191 snprintf(percent_string, 50, ": %i%%", int(Percent));
192--- aptitude-0.0.8.2/configure.in.orig Sat Apr 7 16:56:20 2001
193+++ aptitude-0.0.8.2/configure.in Sat Apr 7 19:12:31 2001
194@@ -15,16 +15,19 @@
195 ac_cv_c_inline=yes
196
197 dnl Checks for libraries.
198-AC_CHECK_LIB(curses, initscr)
199-AC_CHECK_LIB(apt-pkg, main, , AC_MSG_ERROR([Can't find the APT libraries -- please install libapt-pkg-dev]))
200+AC_CHECK_LIB(ncurses, initscr)
201+AC_CHECK_LIB(popt, poptGetArg, , AC_MSG_ERROR([Can't find the popt library -- please install popt-devel]))
202+AC_CHECK_LIB(rpmio, rpmdbOpen, , AC_MSG_ERROR([Can't find the RPM library -- please install rpm-devel]), [ -lrpm -lpopt -ldb])
203+AC_CHECK_LIB(apt-pkg, main, , AC_MSG_ERROR([Can't find the APT libraries -- please install libapt-pkg-devel]), [ -lrpm -lpopt -ldb])
204 AC_CHECK_LIB(pthread, main,
205 HAVE_LIBPTHREAD=1
206- , AC_MSG_WARN([Can't find the POSIX thread libraries -- configuring without threads]))
207+ , AC_MSG_WARN([Can't find the POSIX thread libraries -- configuring without threads]), [ -lrpm -lpopt -ldb])
208
209 dnl Checks for header files.
210 AC_HEADER_STDC
211 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h, , AC_MSG_ERROR([Can't find needed header file.]))
212-AC_CHECK_HEADER(apt-pkg/init.h, , AC_MSG_ERROR([Can't find the APT header files -- please install libapt-pkg-dev]))
213+AC_CHECK_HEADER(apt-pkg/init.h, , AC_MSG_ERROR([Can't find the APT header files -- please install libapt-pkg-devel]), [ -lrpm -lpopt -ldb])
214+AC_CHECK_HEADER(rpm/dbindex.h, CXXFLAGS="$CXXFLAGS -I/usr/include/rpm" , AC_MSG_ERROR([Can't find the RPM header files -- please install librpm-devel]), [ -lrpm -lpopt -ldb -lrpmio])
215 AC_CHECK_HEADER(apt-pkg/policy.h, AC_DEFINE(HAVE_LIBAPT_PKG3))
216 if test x$HAVE_LIBPTHREAD = x1
217 then
218--- aptitude-0.0.8.2/Makefile.in.orig Sat Apr 7 16:58:45 2001
219+++ aptitude-0.0.8.2/Makefile.in Sat Apr 7 17:11:40 2001
220@@ -44,9 +44,10 @@
221 AUTOHEADER = @AUTOHEADER@
222
223 INSTALL = @INSTALL@
224-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
225+INSTALL_PROGRAM = @INSTALL_PROGRAM@
226 INSTALL_DATA = @INSTALL_DATA@
227 INSTALL_SCRIPT = @INSTALL_SCRIPT@
228+INSTALL_STRIP_FLAG =
229 transform = @program_transform_name@
230
231 NORMAL_INSTALL = :
232@@ -112,7 +113,7 @@
233 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
234 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
235
236-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
237+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
238 cd $(top_builddir) \
239 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
240
241@@ -298,6 +299,11 @@
242 -rm -rf $(distdir)
243 mkdir $(distdir)
244 -chmod 777 $(distdir)
245+ here=`cd $(top_builddir) && pwd`; \
246+ top_distdir=`cd $(distdir) && pwd`; \
247+ distdir=`cd $(distdir) && pwd`; \
248+ cd $(top_srcdir) \
249+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
250 @for file in $(DISTFILES); do \
251 d=$(srcdir); \
252 if test -d $$d/$$file; then \
253@@ -344,7 +350,7 @@
254 all-am: Makefile $(DATA) config.h
255 all-redirect: all-recursive-am
256 install-strip:
257- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
258+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
259 installdirs: installdirs-recursive
260 installdirs-am:
261 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
262--- aptitude-0.0.8.2/config.h.in.orig Sat Apr 7 17:13:27 2001
263+++ aptitude-0.0.8.2/config.h.in Sat Apr 7 17:15:15 2001
264@@ -3,9 +3,6 @@
265 /* Define if using alloca.c. */
266 #undef C_ALLOCA
267
268-/* Define to empty if the keyword does not work. */
269-#undef const
270-
271 /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
272 This function is required for alloca.c support on those systems. */
273 #undef CRAY_STACKSEG_END
274@@ -19,9 +16,6 @@
275 /* Define if you have a working `mmap' system call. */
276 #undef HAVE_MMAP
277
278-/* Define as __inline if that's what the C compiler calls it. */
279-#undef inline
280-
281 /* Define to `long' if <sys/types.h> doesn't define. */
282 #undef off_t
283
284@@ -154,6 +148,12 @@
285
286 /* Define if you have the i library (-li). */
287 #undef HAVE_LIBI
288+
289+/* Define if you have the popt library (-lpopt). */
290+#undef HAVE_LIBPOPT
291+
292+/* Define if you have the rpm library (-lrpm). */
293+#undef HAVE_LIBRPM
294
295 /* Name of package */
296 #undef PACKAGE
This page took 0.140401 seconds and 4 git commands to generate.