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
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>
12 if(!pkgDepCache::Init(&Prog))
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];
24 - string statefile=_config->FindDir("Dir::Aptitude::state", "/var/state/aptitude")+"pkgstates";
25 + string statefile=_config->FindDir("Dir::Aptitude::state", "/var/lib/aptitude")+"pkgstates";
27 FileFd newstate(statefile+".new", FileFd::WriteEmpty);
28 if(!newstate.IsOpen())
30 bool aptitudeCacheFile::Open(OpProgress &Progress, bool WithLock)
33 - Lock=new pkgDpkgLock;
34 + //Lock=new pkgDpkgLock;
35 + Lock=new pkgRpmLock; // pkgDpkgLock;
37 if(_error->PendingError())
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."));
53 - Map=pkgMakeStatusCacheMem(List, Progress);
54 + //Map=pkgMakeStatusCacheMem(List, Progress);
55 + Map=_system->makeStatusCacheMem(List, Progress);
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
64 #include <apt-pkg/depcache.h>
65 +#include <apt-pkg/rpminit.h>
67 #ifndef HAVE_LIBAPT_PKG3
68 #include <apt-pkg/dpkginit.h>
72 aptitudeDepCache *Cache;
74 + //pkgDpkgLock *Lock;
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
82 SUBDIRS=generic vscreen
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@
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
93 #include "generic/apt.h"
95 #include <apt-pkg/version.h>
96 +#include <apt-pkg/systemfactory.h>
98 #include <apt-pkg/configuration.h>
100 +#define pkgCheckDep _system->checkDep
102 class pkg_depitem:public pkg_subtree
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
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>
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())
124 _error->Error(_("Internal error: couldn't generate list of packages to download"));
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());
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");
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
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>
153 +#define pkgCheckDep _system->checkDep
155 #ifdef HAVE_LIBAPT_PKG3
156 #include <apt-pkg/pkgsystem.h>
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
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
173 #include <apt-pkg/configuration.h>
174 #include <apt-pkg/strutl.h>
175 +#include <apt-pkg/systemfactory.h>
177 ++#define pkgVersionCompare _system->versionCompare
179 class pkg_ver_columnizer:public column_generator
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
187 - assert(Percent>=0 && Percent<=100);
188 + //assert(Percent>=0 && Percent<=100);
189 barsize=int(Percent*width/100.0);
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
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,
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])
209 dnl Checks for header files.
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
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
221 AUTOHEADER = @AUTOHEADER@
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@
233 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
234 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
236 -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
237 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
239 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
244 -chmod 777 $(distdir)
245 + here=`cd $(top_builddir) && pwd`; \
246 + top_distdir=`cd $(distdir) && pwd`; \
247 + distdir=`cd $(distdir) && pwd`; \
249 + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
250 @for file in $(DISTFILES); do \
252 if test -d $$d/$$file; then \
254 all-am: Makefile $(DATA) config.h
255 all-redirect: all-recursive-am
257 - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
258 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
259 installdirs: installdirs-recursive
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
265 /* Define if using alloca.c. */
268 -/* Define to empty if the keyword does not work. */
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
275 /* Define if you have a working `mmap' system call. */
278 -/* Define as __inline if that's what the C compiler calls it. */
281 /* Define to `long' if <sys/types.h> doesn't define. */
286 /* Define if you have the i library (-li). */
289 +/* Define if you have the popt library (-lpopt). */
292 +/* Define if you have the rpm library (-lrpm). */
295 /* Name of package */