]> git.pld-linux.org Git - packages/aptitude.git/blob - aptitude-make.patch
- cosmetics
[packages/aptitude.git] / aptitude-make.patch
1 diff -ru aptitude-0.1.4/configure.in aptitude-0.1.4-AX/configure.in
2 --- aptitude-0.1.4/configure.in Tue Apr 10 13:25:42 2001
3 +++ aptitude-0.1.4-AX/configure.in      Wed May 23 00:58:48 2001
4 @@ -14,8 +14,10 @@
5  ac_cv_c_const=yes
6  ac_cv_c_inline=yes
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_MSG_ERROR([Can't find the curses libraries -- please install libncurses5-dev]))
14  AC_CHECK_LIB(apt-pkg, main, , AC_MSG_ERROR([Can't find the APT libraries -- please install libapt-pkg-dev]))
15  AC_CHECK_LIB(pthread, main,
16 diff -ru aptitude-0.1.4/src/Makefile.am aptitude-0.1.4-AX/src/Makefile.am
17 --- aptitude-0.1.4/src/Makefile.am      Sun Mar  4 04:34:25 2001
18 +++ aptitude-0.1.4-AX/src/Makefile.am   Wed May 23 00:58:16 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
28 diff -ru aptitude-0.1.4/src/dep_item.cc aptitude-0.1.4-AX/src/dep_item.cc
29 --- aptitude-0.1.4/src/dep_item.cc      Sun Mar 18 18:53:10 2001
30 +++ aptitude-0.1.4-AX/src/dep_item.cc   Wed May 23 00:59:42 2001
31 @@ -30,7 +30,10 @@
32  #include "generic/apt.h"
33  #include "generic/config_signal.h"
34  
35 -#include <apt-pkg/version.h>
36 +//#include <apt-pkg/version.h>
37 +#include <apt-pkg/systemfactory.h>
38 +
39 +#define pkgCheckDep _system->checkDep
40  
41  class pkg_depitem:public pkg_subtree
42  {
43 diff -ru aptitude-0.1.4/src/download.cc aptitude-0.1.4-AX/src/download.cc
44 --- aptitude-0.1.4/src/download.cc      Sun Apr  8 22:08:43 2001
45 +++ aptitude-0.1.4-AX/src/download.cc   Wed May 23 00:58:16 2001
46 @@ -23,6 +23,7 @@
47  #include <apt-pkg/error.h>
48  #include <apt-pkg/dpkgpm.h>
49  #include <apt-pkg/packagemanager.h>
50 +#include <apt-pkg/systemfactory.h>
51  #include <apt-pkg/sourcelist.h>
52  #include <apt-pkg/acquire.h>
53  #include <apt-pkg/acquire-item.h>
54 @@ -162,7 +163,9 @@
55      }
56  
57    // Make a package manager, get ready to download
58 -  pkgDPkgPM pm(*apt_cache_file);
59 +  //pkgDPkgPM pm(*apt_cache_file);
60 +  pkgPackageManager *pm_ = _system->CreatePackageManager(*apt_cache_file);
61 +  pkgPackageManager &pm = *pm_;
62    if(!pm.GetArchives(&fetcher, &list, apt_package_records) || _error->PendingError())
63      {
64        _error->Error(_("Internal error: couldn't generate list of packages to download"));
65 @@ -237,7 +240,7 @@
66         }
67  
68        fprintf(f, "Aptitude " VERSION ": log report\n\n");
69 -      fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\ndpkg problems may not be completed.\n\n"));
70 +      fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\nrpm problems may not be completed.\n\n"));
71        fprintf(f, _("Will install %li packages, and remove %li packages.\n"), (*apt_cache_file)->InstCount(), (*apt_cache_file)->DelCount());
72        if((*apt_cache_file)->UsrSize()>0)
73         fprintf(f, _("%li bytes of disk space will be used\n"), (long int) (*apt_cache_file)->UsrSize());
74 @@ -313,7 +316,7 @@
75        _error->DumpErrors();
76        cerr<<_("Ack!  Something bad happened while installing packages.  Trying to recover:")<<endl;
77        // and this is really a hack:
78 -      system("dpkg --configure -a");
79 +      //system("dpkg --configure -a");
80        _error->Discard();
81      }
82  
83 Only in aptitude-0.1.4-AX/src: download.cc.orig
84 diff -ru aptitude-0.1.4/src/generic/Makefile.am aptitude-0.1.4-AX/src/generic/Makefile.am
85 --- aptitude-0.1.4/src/generic/Makefile.am      Mon Dec  4 04:54:18 2000
86 +++ aptitude-0.1.4-AX/src/generic/Makefile.am   Wed May 23 00:58:16 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  
96 diff -ru aptitude-0.1.4/src/generic/aptcache.cc aptitude-0.1.4-AX/src/generic/aptcache.cc
97 --- aptitude-0.1.4/src/generic/aptcache.cc      Tue Apr 10 13:09:15 2001
98 +++ aptitude-0.1.4-AX/src/generic/aptcache.cc   Wed May 23 00:58:16 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 @@ -291,7 +292,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 @@ -694,7 +695,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 @@ -705,7 +706,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 @@ -721,7 +723,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;
145 Only in aptitude-0.1.4-AX/src/generic: aptcache.cc.orig
146 diff -ru aptitude-0.1.4/src/generic/aptcache.h aptitude-0.1.4-AX/src/generic/aptcache.h
147 --- aptitude-0.1.4/src/generic/aptcache.h       Sun Mar 18 18:53:12 2001
148 +++ aptitude-0.1.4-AX/src/generic/aptcache.h    Wed May 23 00:58:16 2001
149 @@ -31,6 +31,7 @@
150  #include <config.h>
151  
152  #include <apt-pkg/depcache.h>
153 +#include <apt-pkg/rpminit.h>
154  
155  #include <sigc++/basic_signal.h>
156  
157 @@ -221,7 +222,8 @@
158  {
159    MMap *Map;
160    aptitudeDepCache *Cache;
161 -  pkgDpkgLock *Lock;
162 +  //pkgDpkgLock *Lock;
163 +  pkgRpmLock *Lock;
164  public:
165    // We look pretty much exactly like a pointer to a dep cache
166    inline operator aptitudeDepCache &() {return *Cache;};
167 Only in aptitude-0.1.4-AX/src/generic: aptcache.h.orig
168 diff -ru aptitude-0.1.4/src/main.cc aptitude-0.1.4-AX/src/main.cc
169 --- aptitude-0.1.4/src/main.cc  Fri Mar 23 22:44:16 2001
170 +++ aptitude-0.1.4-AX/src/main.cc       Wed May 23 00:58:16 2001
171 @@ -30,7 +30,9 @@
172  
173  #include <sigc++/func_slot.h>
174  
175 -#include <apt-pkg/init.h>
176 +//#include <apt-pkg/init.h>
177 +#include <apt-pkg/rpmfactory.h>
178 +#include <apt-pkg/rpminit.h>
179  
180  #include "ui.h"
181  
182 @@ -89,6 +91,11 @@
183  
184  int main(int argc, char *argv[])
185  {
186 +  {
187 +    static RPMFactory bla;
188 +    static pkgRpmLock lock;
189 +  }
190 +
191    srandom(time(0));
192  
193    setlocale(LC_ALL, "");
194 Only in aptitude-0.1.4-AX/src: main.cc.orig
195 diff -ru aptitude-0.1.4/src/pkg_columnizer.cc aptitude-0.1.4-AX/src/pkg_columnizer.cc
196 --- aptitude-0.1.4/src/pkg_columnizer.cc        Sun Mar 18 18:53:11 2001
197 +++ aptitude-0.1.4-AX/src/pkg_columnizer.cc     Wed May 23 00:58:16 2001
198 @@ -32,6 +32,9 @@
199  #ifdef HAVE_LIBAPT_PKG3
200  #include <apt-pkg/pkgsystem.h>
201  #endif
202 +#include <apt-pkg/systemfactory.h>
203 +#define pkgCheckDep _system->checkDep
204 +
205  
206  column_definition_list *pkg_item::pkg_columnizer::columns=NULL;
207  column_definition_list *pkg_item::pkg_columnizer::status_columns=NULL;
208 diff -ru aptitude-0.1.4/src/pkg_info_screen.cc aptitude-0.1.4-AX/src/pkg_info_screen.cc
209 --- aptitude-0.1.4/src/pkg_info_screen.cc       Sat Jan 27 02:12:37 2001
210 +++ aptitude-0.1.4-AX/src/pkg_info_screen.cc    Wed May 23 00:58:16 2001
211 @@ -74,11 +74,13 @@
212        tree->add_child(new pkg_description(pkg.VersionList(), _("Description")));
213        tree->add_child(new vs_staticitem(_("Priority: "),ver.PriorityType()?ver.PriorityType():"Unknown"));
214        tree->add_child(new vs_staticitem(_("Section: "),pkg.Section()?pkg.Section():_("Unknown")));
215 -      tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
216 +      //tree->add_child(new vs_staticitem(_("Maintainer: "),rec.Maintainer()));
217        tree->add_child(new vs_staticitem(_("Compressed size: "), SizeToStr(ver->Size)));
218        tree->add_child(new vs_staticitem(_("Uncompressed size: "), SizeToStr(ver->InstalledSize)));
219 +#if 0
220        if(!rec.SourcePkg().empty())
221         tree->add_child(new vs_staticitem(_("Source Package: "),rec.SourcePkg()));
222 +#endif
223  
224        setup_package_deps<pkg_item_with_generic_subtree>(pkg, ver, tree, sig);
225      }
226 Only in aptitude-0.1.4-AX/src: pkg_info_screen.cc.orig
227 diff -ru aptitude-0.1.4/src/pkg_ver_item.cc aptitude-0.1.4-AX/src/pkg_ver_item.cc
228 --- aptitude-0.1.4/src/pkg_ver_item.cc  Tue Apr 10 02:21:49 2001
229 +++ aptitude-0.1.4-AX/src/pkg_ver_item.cc       Wed May 23 00:58:16 2001
230 @@ -41,6 +41,8 @@
231  #include <apt-pkg/configuration.h>
232  #include <apt-pkg/strutl.h>
233  
234 +#define pkgCheckDep _system->checkDep
235 +
236  class pkg_ver_columnizer:public column_generator
237  {
238    pkgCache::VerIterator ver;
239 Only in aptitude-0.1.4-AX/src: pkg_ver_item.cc.orig
240 diff -ru aptitude-0.1.4/src/pkg_ver_item.h aptitude-0.1.4-AX/src/pkg_ver_item.h
241 --- aptitude-0.1.4/src/pkg_ver_item.h   Sun Mar 18 18:53:11 2001
242 +++ aptitude-0.1.4-AX/src/pkg_ver_item.h        Wed May 23 00:58:16 2001
243 @@ -30,8 +30,11 @@
244  #include "pkg_grouppolicy.h"
245  #include "pkg_item_with_subtree.h"
246  
247 -#include <apt-pkg/version.h>
248 +/* #include <apt-pkg/version.h> */
249  #include <apt-pkg/depcache.h>
250 +#include <apt-pkg/systemfactory.h>
251 +#include <apt-pkg/depcache.h>
252 +#define pkgVersionCompare _system->versionCompare           
253  #ifdef HAVE_LIBAPT_PKG3
254  #include <apt-pkg/pkgsystem.h>
255  #endif
256 Only in aptitude-0.1.4-AX/src: pkg_ver_item.h.orig
257 diff -ru aptitude-0.1.4/src/vs_progress.cc aptitude-0.1.4-AX/src/vs_progress.cc
258 --- aptitude-0.1.4/src/vs_progress.cc   Mon Apr  9 22:42:29 2001
259 +++ aptitude-0.1.4-AX/src/vs_progress.cc        Wed May 23 00:58:16 2001
260 @@ -31,7 +31,7 @@
261  
262    if(!Op.empty())
263      {
264 -      assert(Percent>=0 && Percent<=100);
265 +      //assert(Percent>=0 && Percent<=100);
266        barsize=int(Percent*width/100.0);
267  
268        snprintf(percent_string, 50, ": %i%%", int(Percent));
269 Only in aptitude-0.1.4-AX/src: vs_progress.cc.orig
This page took 0.123938 seconds and 3 git commands to generate.