]> git.pld-linux.org Git - packages/aptitude.git/blame - aptitude-apt-rpm.patch
- up to 0.3.5.1 (the last version supporting apt 0.5)
[packages/aptitude.git] / aptitude-apt-rpm.patch
CommitLineData
74404cd2
JB
1From Wilfried.Weissmann@gmx.at Fri Oct 20 22:16:18 2006
2Date: Fri, 20 Oct 2006 21:15:58 +0200
3From: Wilfried Weissmann <Wilfried.Weissmann@gmx.at>
4To: Panu Matilainen <pmatilai@laiskiainen.org>
5Cc: Wilfried Weissmann <wweissmann@gmx.at>, apt-rpm@lists.laiskiainen.org
6Subject: Re: [OT] who maintains aptitude for rpm? (fwd)
7
8Hi,
9
10Here is the aptitude patch for 0.3.5.1. The work is based on the patch
11from mandriva. I did some upgrades, installs and package removals this
12week on a fedora 5 computer and I did not have any serious problems.
13When I do a update of the repository I get warnings about that there are
14no checksum files. However the update is working fine.
15
16Bye,
17Wilfried
18
19 [ Part 2: "Attached Text" ]
20
21diff -Nurp aptitude-0.3.5.1-orig/configure.ac aptitude-0.3.5.1/configure.ac
22--- aptitude-0.3.5.1-orig/configure.ac 2006-10-11 16:06:48.000000000 +0200
23+++ aptitude-0.3.5.1/configure.ac 2006-10-12 15:39:30.000000000 +0200
24@@ -23,6 +23,15 @@ AC_CHECK_LIB(pthread, main,
25 HAVE_LIBPTHREAD=1
26 , [AC_MSG_ERROR([Can't find the POSIX thread libraries])])
27
28+dnl popt checking
29+AC_CHECK_LIB(popt, main,
30+ HAVE_POPT=1,
31+ AC_MSG_ERROR([Can't find the popt library -- please install popt-devel package]))
32+dnl rpm checking
33+AC_CHECK_LIB(rpm, main,
34+ HAVE_RPM=1,
35+ AC_MSG_ERROR([Can't find the rpm library -- please install librpm-devel package]))
36+
37 ALL_LINGUAS="ar bs ca cs da de el es eu fi fr gl it ja lt nb nl nn pl pt pt_BR ro ru sk tl tr vi zh_CN zh_TW"
38 AM_GNU_GETTEXT([external])
39
40@@ -145,6 +154,24 @@ then
41 [AC_MSG_ERROR([POSIX thread header not installed])])
42 fi
43
44+if test x$HAVE_RPM = x1
45+then
46+ AC_CHECK_HEADER(rpm/rpmio.h,
47+ CXXFLAGS="$CXXFLAGS -I/usr/include/rpm"
48+ LDFLAGS="$LDFLAGS -lrpm"
49+ [AC_DEFINE(HAVE_RPM, , [Define if rpm is available])],
50+ [AC_MSG_ERROR([RPM headers not found. Please verify your build system.])])
51+fi
52+
53+if test x$HAVE_POPT = x1
54+then
55+ AC_CHECK_HEADER(popt.h,
56+ CXXFLAGS="$CXXFLAGS"
57+ LDFLAGS="$LDFLAGS -lpopt"
58+ [AC_DEFINE(HAVE_POPT, , [Define if popt is available])],
59+ [AC_MSG_ERROR([POPT headers not found. Please verify your build system.])])
60+fi
61+
62 WERROR="-Werror"
63
64 AC_ARG_ENABLE(dynamic-backtrace,
65diff -Nurp aptitude-0.3.5.1-orig/doc/aptitude-html.xsl aptitude-0.3.5.1/doc/aptitude-html.xsl
66--- aptitude-0.3.5.1-orig/doc/aptitude-html.xsl 2006-10-11 16:06:47.000000000 +0200
67+++ aptitude-0.3.5.1/doc/aptitude-html.xsl 2006-10-12 15:39:30.000000000 +0200
68@@ -5,7 +5,7 @@
69 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
70 version="1.0">
71
72-<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl"/>
73+<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl"/>
74
75 <xsl:import href="aptitude-common.xsl"/>
76
77diff -Nurp aptitude-0.3.5.1-orig/doc/aptitude-man.xsl aptitude-0.3.5.1/doc/aptitude-man.xsl
78--- aptitude-0.3.5.1-orig/doc/aptitude-man.xsl 2006-10-11 16:06:47.000000000 +0200
79+++ aptitude-0.3.5.1/doc/aptitude-man.xsl 2006-10-12 15:39:30.000000000 +0200
80@@ -5,7 +5,7 @@
81 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
82 version="1.0">
83
84-<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl"/>
85+<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl"/>
86
87 <xsl:template match='replaceable'>
88 <xsl:text>\fI&lt;</xsl:text><xsl:apply-templates/><xsl:text>&gt;\fR</xsl:text>
89diff -Nurp aptitude-0.3.5.1-orig/doc/aptitude-txt.xsl aptitude-0.3.5.1/doc/aptitude-txt.xsl
90--- aptitude-0.3.5.1-orig/doc/aptitude-txt.xsl 2006-10-11 16:06:47.000000000 +0200
91+++ aptitude-0.3.5.1/doc/aptitude-txt.xsl 2006-10-12 15:39:30.000000000 +0200
92@@ -5,7 +5,7 @@
93 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
94 version="1.0">
95
96-<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl"/>
97+<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl"/>
98
99 <xsl:import href="aptitude-common.xsl"/>
100
101diff -Nurp aptitude-0.3.5.1-orig/doc/cs/aptitude.xml aptitude-0.3.5.1/doc/cs/aptitude.xml
102--- aptitude-0.3.5.1-orig/doc/cs/aptitude.xml 2006-10-11 16:06:46.000000000 +0200
103+++ aptitude-0.3.5.1/doc/cs/aptitude.xml 2006-10-12 15:39:30.000000000 +0200
104@@ -1,7 +1,7 @@
105 <?xml version="1.0" encoding="iso-8859-2" standalone="no"?>
106
107 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
108-"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd" [
109+"file:///usr/share/sgml/docbook/xml-dtd-4.2-1.0-30/docbookx.dtd" [
110 <!ENTITY aptitude "<command>aptitude</command>">
111 <!ENTITY apt '<systemitem class="library">apt</systemitem>'>
112 <!ENTITY dselect '<command>dselect</command>'>
113diff -Nurp aptitude-0.3.5.1-orig/doc/cs/Makefile.am aptitude-0.3.5.1/doc/cs/Makefile.am
114--- aptitude-0.3.5.1-orig/doc/cs/Makefile.am 2006-10-11 16:06:46.000000000 +0200
115+++ aptitude-0.3.5.1/doc/cs/Makefile.am 2006-10-12 15:39:30.000000000 +0200
116@@ -59,7 +59,7 @@ doc-html-stamp: aptitude.xml ../aptitude
117
118 mkdir output-html/images/
119 ln -f $(srcdir)/images/*.png output-html/images/
120- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
121- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
122+ for x in caution important note tip warning; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.png output-html/images/; done
123+ for x in home next prev up; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.gif output-html/images/; done
124
125 touch doc-html-stamp
126diff -Nurp aptitude-0.3.5.1-orig/doc/de/Makefile.am aptitude-0.3.5.1/doc/de/Makefile.am
127--- aptitude-0.3.5.1-orig/doc/de/Makefile.am 2006-10-11 16:06:46.000000000 +0200
128+++ aptitude-0.3.5.1/doc/de/Makefile.am 2006-10-12 15:39:30.000000000 +0200
129@@ -61,8 +61,8 @@ doc-html-stamp: $(XMLSOURCES) $(srcdir)/
130
131 mkdir output-html/images/
132 ln -f $(srcdir)/images/*.png output-html/images/
133- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
134- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
135+ for x in caution important note tip warning; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.png output-html/images/; done
136+ for x in home next prev up; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.gif output-html/images/; done
137
138 touch doc-html-stamp
139
140diff -Nurp aptitude-0.3.5.1-orig/doc/en/Makefile.am aptitude-0.3.5.1/doc/en/Makefile.am
141--- aptitude-0.3.5.1-orig/doc/en/Makefile.am 2006-10-11 16:06:46.000000000 +0200
142+++ aptitude-0.3.5.1/doc/en/Makefile.am 2006-10-12 15:39:30.000000000 +0200
143@@ -53,7 +53,7 @@ doc-html-stamp: aptitude.xml manpage.xml
144
145 mkdir output-html/images/
146 ln -f $(srcdir)/images/*.png output-html/images/
147- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
148- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
149+ for x in caution important note tip warning; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.png output-html/images/; done
150+ for x in home next prev up; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.gif output-html/images/; done
151
152 touch doc-html-stamp
153diff -Nurp aptitude-0.3.5.1-orig/doc/fi/Makefile.am aptitude-0.3.5.1/doc/fi/Makefile.am
154--- aptitude-0.3.5.1-orig/doc/fi/Makefile.am 2006-10-11 16:06:47.000000000 +0200
155+++ aptitude-0.3.5.1/doc/fi/Makefile.am 2006-10-12 15:39:30.000000000 +0200
156@@ -60,7 +60,7 @@ doc-html-stamp: aptitude.xml manpage.xml
157
158 mkdir output-html/images/
159 ln -f $(srcdir)/images/*.png output-html/images/
160- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
161- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
162+ for x in caution important note tip warning; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.png output-html/images/; done
163+ for x in home next prev up; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.gif output-html/images/; done
164
165 touch doc-html-stamp
166diff -Nurp aptitude-0.3.5.1-orig/doc/fr/Makefile.am aptitude-0.3.5.1/doc/fr/Makefile.am
167--- aptitude-0.3.5.1-orig/doc/fr/Makefile.am 2006-10-11 16:06:47.000000000 +0200
168+++ aptitude-0.3.5.1/doc/fr/Makefile.am 2006-10-12 15:39:30.000000000 +0200
169@@ -56,7 +56,7 @@ doc-html-stamp: aptitude.xml manpage.xml
170
171 mkdir output-html/images/
172 ln -f $(srcdir)/images/*.png output-html/images/
173- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
174- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
175+ for x in caution important note tip warning; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.png output-html/images/; done
176+ for x in home next prev up; do ln -s /usr/share/sgml/docbook/xsl-stylesheets/images/$$x.gif output-html/images/; done
177
178 touch doc-html-stamp
179diff -Nurp aptitude-0.3.5.1-orig/Makefile.am aptitude-0.3.5.1/Makefile.am
180--- aptitude-0.3.5.1-orig/Makefile.am 2006-10-11 16:06:48.000000000 +0200
181+++ aptitude-0.3.5.1/Makefile.am 2006-10-12 15:39:30.000000000 +0200
182@@ -17,12 +17,13 @@ EXTRA_DIST = config.rpath ChangeLog.SVN
183 $(TLMANPAGES) $(TLHELPTXTS)
184
185 pkgdatadir=$(datadir)/$(PACKAGE)
186+pkgstatedir=$(localstatedir)/$(PACKAGE)
187
188 pkgdata_DATA = $(TLHELPTXTS) COPYING NEWS \
189 function_groups function_pkgs aptitude-defaults
190
191 install-data-local:
192- [ -d $(DESTDIR)$(STATEDIR) ] || $(mkinstalldirs) $(DESTDIR)$(STATEDIR)
193+ [ -d $(DESTDIR)$(pkgstatedir) ] || $(mkinstalldirs) $(DESTDIR)$(pkgstatedir)
194 # FIXME: this really ought to use the autoconf directory variables
195
196 for l in $(MANPAGE_LOCALES); do \
197@@ -31,7 +32,7 @@ install-data-local:
198 done
199
200 uninstall-local:
201- rm -fr $(DESTDIR)$(STATEDIR)
202+ rm -fr $(DESTDIR)$(pkgstatedir)
203 # Is -r a good idea here?
204
205
206diff -Nurp aptitude-0.3.5.1-orig/src/cmdline/cmdline_changelog.cc aptitude-0.3.5.1/src/cmdline/cmdline_changelog.cc
207--- aptitude-0.3.5.1-orig/src/cmdline/cmdline_changelog.cc 2006-10-11 16:06:47.000000000 +0200
208+++ aptitude-0.3.5.1/src/cmdline/cmdline_changelog.cc 2006-10-12 15:39:47.000000000 +0200
209@@ -14,7 +14,6 @@
210 #include <generic/apt/pkg_changelog.h>
211
212 #include <apt-pkg/error.h>
213-#include <apt-pkg/metaindex.h>
214 #include <apt-pkg/progress.h>
215 #include <apt-pkg/sourcelist.h>
216 #include <apt-pkg/srcrecords.h>
217@@ -23,6 +22,7 @@
218
219 using namespace std;
220
221+#if 0
222 /** Represents the information needed to retrieve a changelog. */
223 struct changelog_entity
224 {
225@@ -54,6 +54,7 @@ struct changelog_entity
226 pkg = other.pkg;
227 ver = other.ver;
228 section = other.section;
229+ return *this;
230 }
231 };
232
233@@ -185,9 +186,12 @@ changelog_entity find_src_archive(pkgSou
234
235 return changelog_entity();
236 }
237+#endif
238
239 bool do_cmdline_changelog(const vector<string> &packages)
240 {
241+ _error->Error(_("Somebody was too lazy to implement this! FIXME"));
242+#if 0
243 const char *pager="/usr/bin/sensible-pager";
244
245 if(access("/usr/bin/sensible-pager", X_OK)!=0)
246@@ -310,6 +314,7 @@ bool do_cmdline_changelog(const vector<s
247 // Run the user's pager.
248 system((string(pager) + " " + filename.get_name()).c_str());
249 }
250+#endif
251 }
252
253 // TODO: fetch them all in one go.
254diff -Nurp aptitude-0.3.5.1-orig/src/cmdline/cmdline_prompt.cc aptitude-0.3.5.1/src/cmdline/cmdline_prompt.cc
255--- aptitude-0.3.5.1-orig/src/cmdline/cmdline_prompt.cc 2006-10-11 16:06:47.000000000 +0200
256+++ aptitude-0.3.5.1/src/cmdline/cmdline_prompt.cc 2006-10-12 15:39:30.000000000 +0200
257@@ -21,10 +21,10 @@
258 #include <vscreen/vscreen.h>
259
260 #include <apt-pkg/algorithms.h>
261-#include <apt-pkg/dpkgpm.h>
262 #include <apt-pkg/error.h>
263 #include <apt-pkg/sourcelist.h>
264 #include <apt-pkg/strutl.h>
265+#include <apt-pkg/pkgsystem.h>
266
267 using namespace std;
268
269@@ -51,7 +51,7 @@ static bool get_fetchinfo(fetchinfo &f)
270 if(!l.ReadMainList())
271 return _error->Error(_("Couldn't read list of sources"));
272
273- pkgDPkgPM pm(*apt_cache_file);
274+ pkgPackageManager &pm = *_system->CreatePM(*apt_cache_file);
275 pm.GetArchives(&fetcher, &l, apt_package_records);
276
277 f.FetchBytes=fetcher.FetchNeeded();
278diff -Nurp aptitude-0.3.5.1-orig/src/dep_item.cc aptitude-0.3.5.1/src/dep_item.cc
279--- aptitude-0.3.5.1-orig/src/dep_item.cc 2006-10-11 16:06:48.000000000 +0200
280+++ aptitude-0.3.5.1/src/dep_item.cc 2006-10-12 15:39:30.000000000 +0200
281@@ -31,7 +31,8 @@
282 #include <generic/apt/apt.h>
283 #include <generic/apt/config_signal.h>
284
285-#include <apt-pkg/version.h>
286+#include <apt-pkg/pkgsystem.h>
287+#include <apt-pkg/configuration.h>
288
289 using namespace std;
290 using namespace __gnu_cxx;
291diff -Nurp aptitude-0.3.5.1-orig/src/desc_parse.cc aptitude-0.3.5.1/src/desc_parse.cc
292--- aptitude-0.3.5.1-orig/src/desc_parse.cc 2006-10-11 16:06:48.000000000 +0200
293+++ aptitude-0.3.5.1/src/desc_parse.cc 2006-10-12 15:39:30.000000000 +0200
294@@ -72,10 +72,14 @@ static fragment *make_level_fragment(con
295 wstring::size_type &start)
296 {
297 vector<fragment*> fragments;
298+
299+#if 0
300 bool first=true;
301+#endif
302
303 while(start<desc.size())
304 {
305+#if 0
306 wstring::size_type loc=start;
307 unsigned int nspaces;
308
309@@ -225,6 +229,19 @@ static fragment *make_level_fragment(con
310 fragments.push_back(wrapbox(text_fragment(par)));
311 }
312 }
313+#endif
314+ wstring::size_type amt=0;
315+
316+ while(start+amt<desc.size() && desc[start+amt]!=L'\n')
317+ ++amt;
318+
319+ fragments.push_back(wrapbox(text_fragment(wstring(desc, start, amt))));
320+
321+ start+=amt;
322+
323+ // Skip the newline
324+ if(start<desc.size())
325+ ++start;
326 }
327
328 return sequence_fragment(fragments);
329@@ -235,13 +252,6 @@ fragment *make_desc_fragment(const wstri
330 wstring::size_type loc=0;
331 vector<fragment*> fragments;
332
333- // Skip the short description
334- while(loc<desc.size() && desc[loc]!=L'\n')
335- ++loc;
336-
337- if(loc<desc.size()) // Skip the '\n'
338- ++loc;
339-
340 // Skip leading whitespace on the first line if there is any.
341 if(loc<desc.size() && desc[loc] == L' ')
342 ++loc;
343diff -Nurp aptitude-0.3.5.1-orig/src/download_item.cc aptitude-0.3.5.1/src/download_item.cc
344--- aptitude-0.3.5.1-orig/src/download_item.cc 2006-10-11 16:06:48.000000000 +0200
345+++ aptitude-0.3.5.1/src/download_item.cc 2006-10-12 15:39:30.000000000 +0200
346@@ -42,8 +42,11 @@ style download_item::get_normal_style()
347 return vs_treeitem::get_normal_style()+get_style("DownloadHit");
348 case pkgAcquire::Item::StatError:
349 return vs_treeitem::get_normal_style()+get_style("Error");
350+// Not yet implemented in apt 0.5
351+#if 0
352 case pkgAcquire::Item::StatAuthError:
353 return vs_treeitem::get_normal_style()+get_style("Error");
354+#endif
355 default:
356 assert(0);
357 }
358@@ -104,9 +107,12 @@ void download_item::paint(vs_tree *win,
359 case pkgAcquire::Item::StatError:
360 output+=item.Owner->ErrorText;
361 break;
362+// Not yet implemented in apt 0.5
363+#if 0
364 case pkgAcquire::Item::StatAuthError:
365 output+=item.Owner->ErrorText;
366 break;
367+#endif
368 }
369
370 win->show_string_as_progbar(0, y, transcode(output),
371diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/apt.cc aptitude-0.3.5.1/src/generic/apt/apt.cc
372--- aptitude-0.3.5.1-orig/src/generic/apt/apt.cc 2006-10-11 16:06:47.000000000 +0200
373+++ aptitude-0.3.5.1/src/generic/apt/apt.cc 2006-10-12 15:39:30.000000000 +0200
374@@ -597,6 +597,8 @@ bool package_recommended(const pkgCache:
375
376 bool package_trusted(const pkgCache::VerIterator &ver)
377 {
378+// Not yet implemented in apt 0.5
379+#if 0
380 for(pkgCache::VerFileIterator i = ver.FileList(); !i.end(); ++i)
381 {
382 pkgIndexFile *index;
383@@ -604,7 +606,7 @@ bool package_trusted(const pkgCache::Ver
384 if(apt_source_list->FindIndex(i.File(), index) && !index->IsTrusted())
385 return false;
386 }
387-
388+#endif
389 return true;
390 }
391
392diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/aptitudepolicy.h aptitude-0.3.5.1/src/generic/apt/aptitudepolicy.h
393--- aptitude-0.3.5.1-orig/src/generic/apt/aptitudepolicy.h 2006-10-11 16:06:47.000000000 +0200
394+++ aptitude-0.3.5.1/src/generic/apt/aptitudepolicy.h 2006-10-12 15:39:30.000000000 +0200
395@@ -17,7 +17,7 @@
396 class aptitudePolicy:public pkgPolicy
397 {
398 public:
399- aptitudePolicy::aptitudePolicy(pkgCache *Owner)
400+ aptitudePolicy(pkgCache *Owner)
401 :pkgPolicy(Owner) {}
402
403 bool IsImportantDep(pkgCache::DepIterator dep);
404diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/aptitude_resolver_universe.h aptitude-0.3.5.1/src/generic/apt/aptitude_resolver_universe.h
405--- aptitude-0.3.5.1-orig/src/generic/apt/aptitude_resolver_universe.h 2006-10-11 16:06:47.000000000 +0200
406+++ aptitude-0.3.5.1/src/generic/apt/aptitude_resolver_universe.h 2006-10-12 15:39:30.000000000 +0200
407@@ -20,6 +20,8 @@
408 #ifndef APTITUDE_RESOLVER_UNIVERSE_H
409 #define APTITUDE_RESOLVER_UNIVERSE_H
410
411+#include <assert.h>
412+
413 #include <apt-pkg/pkgcache.h>
414 #include <apt-pkg/pkgsystem.h>
415 #include <apt-pkg/version.h>
416diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/download_install_manager.cc aptitude-0.3.5.1/src/generic/apt/download_install_manager.cc
417--- aptitude-0.3.5.1-orig/src/generic/apt/download_install_manager.cc 2006-10-11 16:06:47.000000000 +0200
418+++ aptitude-0.3.5.1/src/generic/apt/download_install_manager.cc 2006-10-12 15:39:47.000000000 +0200
419@@ -26,15 +26,16 @@
420 #include <aptitude.h>
421
422 #include <apt-pkg/acquire-item.h>
423-#include <apt-pkg/dpkgpm.h>
424 #include <apt-pkg/error.h>
425 #include <apt-pkg/sourcelist.h>
426+#include <apt-pkg/pkgsystem.h>
427
428 using namespace std;
429
430 download_install_manager::download_install_manager(bool _download_only)
431- : log(NULL), download_only(_download_only), pm(new pkgDPkgPM(*apt_cache_file))
432+ : log(NULL), download_only(_download_only)
433 {
434+ pm=_system->CreatePM(*apt_cache_file);
435 }
436
437 download_install_manager::~download_install_manager()
438@@ -133,13 +134,12 @@ download_manager::result download_instal
439
440 result rval = success;
441
442- pkgPackageManager::OrderResult pmres = pm->DoInstall(aptcfg->FindI("APT::Status-Fd", -1));
443+ pkgPackageManager::OrderResult pmres = pm->DoInstall();
444 switch(pmres)
445 {
446 case pkgPackageManager::Failed:
447 _error->DumpErrors();
448- cerr << _("A package failed to install. Trying to recover:") << endl;
449- system("dpkg --configure -a");
450+ cerr << _("A package failed to install.") << endl;
451 _error->Discard();
452
453 rval = failure;
454@@ -162,7 +162,7 @@ download_manager::result download_instal
455 if(!apt_cache_file->GainLock())
456 // This really shouldn't happen.
457 {
458- _error->Error(_("Could not regain the system lock! (Perhaps another apt or dpkg is running?)"));
459+ _error->Error(_("Could not regain the system lock! (Perhaps another apt or rpm is running?)"));
460 return failure;
461 }
462
463diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/download_manager.cc aptitude-0.3.5.1/src/generic/apt/download_manager.cc
464--- aptitude-0.3.5.1-orig/src/generic/apt/download_manager.cc 2006-10-11 16:06:47.000000000 +0200
465+++ aptitude-0.3.5.1/src/generic/apt/download_manager.cc 2006-10-12 15:39:30.000000000 +0200
466@@ -36,5 +36,5 @@ pkgAcquire::RunResult download_manager::
467
468 pkgAcquire::RunResult download_manager::do_download(int PulseInterval)
469 {
470- return fetcher->Run(PulseInterval);
471+ return fetcher->Run();
472 }
473diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/log.cc aptitude-0.3.5.1/src/generic/apt/log.cc
474--- aptitude-0.3.5.1-orig/src/generic/apt/log.cc 2006-10-11 16:06:47.000000000 +0200
475+++ aptitude-0.3.5.1/src/generic/apt/log.cc 2006-10-12 15:39:30.000000000 +0200
476@@ -66,7 +66,7 @@ bool do_log(const string &log,
477
478 fprintf(f, "Aptitude " VERSION ": %s\n%s\n\n",
479 _("log report"), timestr.c_str());
480- fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\ndpkg problems may not be completed.\n\n"));
481+ fprintf(f, _("IMPORTANT: this log only lists intended actions; actions which fail due to\nrpm problems may not be completed.\n\n"));
482 fprintf(f, _("Will install %li packages, and remove %li packages.\n"),
483 (*apt_cache_file)->InstCount(), (*apt_cache_file)->DelCount());
484
485diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/tags.cc aptitude-0.3.5.1/src/generic/apt/tags.cc
486--- aptitude-0.3.5.1-orig/src/generic/apt/tags.cc 2006-10-11 16:06:47.000000000 +0200
487+++ aptitude-0.3.5.1/src/generic/apt/tags.cc 2006-10-12 15:39:47.000000000 +0200
488@@ -30,6 +30,7 @@
489
490 #include <ctype.h>
491 #include <string.h>
492+#include <assert.h>
493
494 #include <sigc++/functors/mem_fun.h>
495
496diff -Nurp aptitude-0.3.5.1-orig/src/generic/apt/tasks.cc aptitude-0.3.5.1/src/generic/apt/tasks.cc
497--- aptitude-0.3.5.1-orig/src/generic/apt/tasks.cc 2006-10-11 16:06:47.000000000 +0200
498+++ aptitude-0.3.5.1/src/generic/apt/tasks.cc 2006-10-12 15:39:30.000000000 +0200
499@@ -48,6 +48,7 @@ static void update_tasks(const pkgCache:
500 // tasks structure.
501 assert(tasks_by_package);
502
503+#if 0
504 list<string> &lst=tasks_by_package[pkg->ID];
505
506 lst.clear();
507@@ -90,6 +91,7 @@ static void update_tasks(const pkgCache:
508 if(loc!=tasks.size())
509 lst.push_back(string(tasks, loc));
510 }
511+#endif
512 }
513
514 bool task::keys_present()
515diff -Nurp aptitude-0.3.5.1-orig/src/generic/problemresolver/dummy_universe.h aptitude-0.3.5.1/src/generic/problemresolver/dummy_universe.h
516--- aptitude-0.3.5.1-orig/src/generic/problemresolver/dummy_universe.h 2006-10-11 16:06:47.000000000 +0200
517+++ aptitude-0.3.5.1/src/generic/problemresolver/dummy_universe.h 2006-10-12 15:39:30.000000000 +0200
518@@ -28,6 +28,7 @@
519 #include <set>
520 #include <string>
521 #include <vector>
522+#include <assert.h>
523
524 #include <generic/util/exception.h>
525
526diff -Nurp aptitude-0.3.5.1-orig/src/generic/util/temp.h aptitude-0.3.5.1/src/generic/util/temp.h
527--- aptitude-0.3.5.1-orig/src/generic/util/temp.h 2006-10-11 16:06:47.000000000 +0200
528+++ aptitude-0.3.5.1/src/generic/util/temp.h 2006-10-12 15:39:30.000000000 +0200
529@@ -25,6 +25,8 @@
530
531 #include <string>
532
533+#include <assert.h>
534+
535 #include "exception.h"
536 #include "threads.h"
537
538diff -Nurp aptitude-0.3.5.1-orig/src/generic/util/threads.h aptitude-0.3.5.1/src/generic/util/threads.h
539--- aptitude-0.3.5.1-orig/src/generic/util/threads.h 2006-10-11 16:06:47.000000000 +0200
540+++ aptitude-0.3.5.1/src/generic/util/threads.h 2006-10-12 15:39:30.000000000 +0200
541@@ -586,7 +586,7 @@ namespace threads
542 * performed.
543 */
544 template<typename Mutator>
545- void box::update(const Mutator &m);
546+ void update(const Mutator &m);
547 };
548
549 /** A box specialized for 'void'; may make it easier to write
550@@ -621,7 +621,7 @@ namespace threads
551 bool timed_put(const timespec &until);
552
553 template<typename Mutator>
554- void box::update(const Mutator &m)
555+ void update(const Mutator &m)
556 {
557 take();
558 try
559diff -Nurp aptitude-0.3.5.1-orig/src/generic/util/util.cc aptitude-0.3.5.1/src/generic/util/util.cc
560--- aptitude-0.3.5.1-orig/src/generic/util/util.cc 2006-10-11 16:06:47.000000000 +0200
561+++ aptitude-0.3.5.1/src/generic/util/util.cc 2006-10-12 15:39:30.000000000 +0200
562@@ -27,6 +27,7 @@
563 #include <sys/types.h>
564 #include <time.h>
565 #include <unistd.h>
566+#include <assert.h>
567
568 using namespace std;
569
570diff -Nurp aptitude-0.3.5.1-orig/src/pkg_info_screen.cc aptitude-0.3.5.1/src/pkg_info_screen.cc
571--- aptitude-0.3.5.1-orig/src/pkg_info_screen.cc 2006-10-11 16:06:48.000000000 +0200
572+++ aptitude-0.3.5.1/src/pkg_info_screen.cc 2006-10-12 15:39:30.000000000 +0200
573@@ -79,7 +79,7 @@ void pkg_grouppolicy_info::setup_package
574 pkgRecords::Parser &rec=apt_package_records->Lookup(ver.FileList());
575
576 string desc=apt_package_records->Lookup(ver.FileList()).LongDesc();
577- string shortdesc=string(desc, 0, desc.find('\n'));
578+ string shortdesc=apt_package_records->Lookup(ver.FileList()).ShortDesc();
579
580 vector<fragment*> frags;
581
582diff -Nurp aptitude-0.3.5.1-orig/src/vscreen/vs_menubar.cc aptitude-0.3.5.1/src/vscreen/vs_menubar.cc
583--- aptitude-0.3.5.1-orig/src/vscreen/vs_menubar.cc 2006-10-11 16:06:48.000000000 +0200
584+++ aptitude-0.3.5.1/src/vscreen/vs_menubar.cc 2006-10-12 15:39:30.000000000 +0200
585@@ -309,7 +309,8 @@ int vs_menubar::width_request()
586 }
587
588 // Expand the width as needed to account for active menus.
589- for(activemenulist::iterator i=active_menus.begin(), num=0;
590+ int num=0;
591+ for(activemenulist::iterator i=active_menus.begin();
592 i!=active_menus.end();
593 i++, num++)
594 {
595@@ -345,7 +346,8 @@ int vs_menubar::height_request(int w)
596
597 int h=always_visible?1:0;
598
599- for(activemenulist::iterator i=active_menus.begin(), num=0;
600+ int num=0;
601+ for(activemenulist::iterator i=active_menus.begin();
602 i!=active_menus.end();
603 i++, num++)
604 h=max(h, 1+(*i)->height_request(w));
605diff -Nurp aptitude-0.3.5.1-orig/src/vscreen/vs_stacked.h aptitude-0.3.5.1/src/vscreen/vs_stacked.h
606--- aptitude-0.3.5.1-orig/src/vscreen/vs_stacked.h 2006-10-11 16:06:48.000000000 +0200
607+++ aptitude-0.3.5.1/src/vscreen/vs_stacked.h 2006-10-12 15:39:30.000000000 +0200
608@@ -75,7 +75,7 @@ public:
609
610 void dispatch_mouse(short id, int x, int y, int z, mmask_t bstate);
611
612- vs_widget_ref vs_stacked::get_focus();
613+ vs_widget_ref get_focus();
614
615 void show_all();
616
617diff -Nurp aptitude-0.3.5.1-orig/src/vscreen/vs_table.h aptitude-0.3.5.1/src/vscreen/vs_table.h
618--- aptitude-0.3.5.1-orig/src/vscreen/vs_table.h 2006-10-11 16:06:48.000000000 +0200
619+++ aptitude-0.3.5.1/src/vscreen/vs_table.h 2006-10-12 15:39:30.000000000 +0200
620@@ -123,14 +123,14 @@ private:
621 */
622 void get_col_contents(std::vector<std::vector<child_info *> > col_contents);
623
624- void vs_table::alloc_ideal_widths(std::vector<int> &col_sizes);
625- void vs_table::expand_widths(std::vector<int> &col_sizes, int target_w);
626- void vs_table::shrink_widths(std::vector<int> &col_sizes, int target_w);
627- void vs_table::alloc_ideal_heights(std::vector<int> &row_sizes,
628+ void alloc_ideal_widths(std::vector<int> &col_sizes);
629+ void expand_widths(std::vector<int> &col_sizes, int target_w);
630+ void shrink_widths(std::vector<int> &col_sizes, int target_w);
631+ void alloc_ideal_heights(std::vector<int> &row_sizes,
632 const std::vector<int> &col_sizes);
633- void vs_table::expand_heights(std::vector<int> &row_sizes, int target_h);
634- void vs_table::shrink_heights(std::vector<int> &row_sizes, int target_h);
635- void vs_table::alloc_child_sizes(const std::vector<int> &col_sizes,
636+ void expand_heights(std::vector<int> &row_sizes, int target_h);
637+ void shrink_heights(std::vector<int> &row_sizes, int target_h);
638+ void alloc_child_sizes(const std::vector<int> &col_sizes,
639 const std::vector<int> &row_sizes);
640
641
642diff -Nurp aptitude-0.3.5.1-orig/src/vscreen/vs_tree.h aptitude-0.3.5.1/src/vscreen/vs_tree.h
643--- aptitude-0.3.5.1-orig/src/vscreen/vs_tree.h 2006-10-11 16:06:48.000000000 +0200
644+++ aptitude-0.3.5.1/src/vscreen/vs_tree.h 2006-10-12 15:39:30.000000000 +0200
645@@ -141,8 +141,8 @@ public:
646 */
647 int height_request(int w);
648
649- bool vs_tree::get_cursorvisible();
650- point vs_tree::get_cursorloc();
651+ bool get_cursorvisible();
652+ point get_cursorloc();
653 virtual bool focus_me() {return true;}
654 virtual void paint(const style &st);
655 virtual void dispatch_mouse(short id, int x, int y, int z, mmask_t bstate);
656diff -Nurp aptitude-0.3.5.1-orig/src/vs_progress.cc aptitude-0.3.5.1/src/vs_progress.cc
657--- aptitude-0.3.5.1-orig/src/vs_progress.cc 2006-10-11 16:06:48.000000000 +0200
658+++ aptitude-0.3.5.1/src/vs_progress.cc 2006-10-12 15:39:30.000000000 +0200
659@@ -37,7 +37,8 @@ void vs_progress::paint(const style &st)
660
661 if(!Op.empty())
662 {
663- assert(Percent>=0 && Percent<=100);
664+ if ( Percent > 100 )
665+ Percent = 100;
666 barsize=int(Percent*width/100.0);
667
668 snprintf(percent_string, 50, ": %i%%", int(Percent));
This page took 0.138298 seconds and 4 git commands to generate.