summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-04-17Avoid dpkg and infinite loop in download-only modeDaniel Hartwig1-6/+36
* src/generic/apt/download_install_manager.cc: When in download_only mode: - report download errors; - post_dpkg save/reload cycle (fix for #429388) is not needed; - ignore aptitude::Forget-New-On-Install; - avoid dpkg and a potential infinite loop; - do not run {Pre,Post}-Invoke scripts. Closes: #629266
2012-04-16Remove execute_install_run from download_install_manager.hDaniel Hartwig1-6/+0
Left over from commit 6dcafe7716dc7974576d3e83d3b9fa740ab215d2.
2012-03-27?architecture generates match titlesDaniel Hartwig1-12/+21
2012-03-27Support non-regex terms generating titles for 'pattern' grouping policyDaniel Hartwig2-1/+16
Previously non-regex terms had to use a grouping policy such as: pattern(~ramd64 => amd64) to specify the title. This change permits some terms to define the title, and using shorter grouping policies like: pattern(~ramd64) pattern(~r) * src/generic/apt/matching/match.{cc,h}: - support non-regex terms generating titles;
2012-03-27Add architecture grouping policyDaniel Hartwig3-0/+94
2012-03-25Use FullName with dpkg-reconfigureDaniel Hartwig1-1/+1
2012-03-25Also support MultiArch flags from apt 0.8.16Daniel Hartwig2-32/+31
* configure.ac: - check for MultiArch support in APT (requires at least 0.8); * src/generic/apt/apt.cc: - support libapt-pkg 0.8.16 in multiarch_type; * src/generic/apt/matching/match.cc: - tweak multiarch;
2012-03-23More nice size on cmdline_download_progressDaniel Hartwig1-1/+2
2012-03-23[curses] Hack to prevent debug messages dumping to the screenDaniel Hartwig2-7/+13
Closes: #651748
2012-03-22?architecture(native) matches also "all"Daniel Hartwig1-1/+2
2012-03-22Drop regex support from ?architectureDaniel Hartwig4-18/+13
2012-03-21Extend the default search pattern to support 'name:arch'Daniel Hartwig2-15/+14
A search pattern with no explicit term, "s", is equivalent to "?name(s)". This changes modifies these semantics when the pattern is arch-qualified, "name:arch" which is now equivalent to "?exact-name(name) ?architecture(arch)". These are the semantics used by apt-get and others which are internally derived from pkgCache::FindPkg("name:arch"). On the command-line, it is possible to specify both an architecture and an archive/version, as well as an override specifier: # aptitude install an:armel/sid tf:armel- * src/generic/apt/matching/parse.cc: - extended semantics as per above. * src/cmdline/cmdline_versions.cc: - modify argument processing to use the extended semantics.
2012-03-20Tweak display of architecture in dependency listsDaniel Hartwig1-2/+5
Architecture is not a property of the dependency, it is the particular packages which determine whether they can satisfy a given dependency. The old view: --\ Depends (1) --\ libc6:armel (>= 2.4) (UNSATISFIED) p 2.13-27 --\ PreDepends (1) --\ multiarch-support:armel i multiarch-support 2.13-27 p 2.13-27 The new view is much clearer and does not mislead about the dependency requirements: --\ Depends (1) --\ libc6 (>= 2.4) (UNSATISFIED) p libc6:armel 2.13-27 --\ PreDepends (1) --\ multiarch-support i multiarch-support 2.13-27 p multiarch-support:armel 2.13-27
2012-03-19Support 'native' and 'foreign' as arguments to ?architectureDaniel Hartwig8-2/+117
* src/generic/apt/apt.{cc,h}: - new functions is_native_arch, is_foreign_arch. * src/generic/apt/matching/*: * doc/en/aptitude.xml: - support 'native' and 'foreign' as arguments to ?architecture.
2012-03-19Make ~VCURRENT etc. behave like ?version(CURRENT)Daniel Hartwig1-12/+18
~V was not recognizing the special values CURRENT, CANDIDATE, TARGET. * src/generic/apt/matching/parse.cc: - move choice of ?version implementation to separate function and use that function when parsing the short form ~V.
2012-03-18Adjust loading of default top sectionsDaniel Hartwig1-6/+3
2012-03-18Do not assume "main" is the primary top-sectionDaniel Hartwig1-6/+11
2012-03-18Use libraries (liba, libb, etc.) with 'firstchar' grouping policyDaniel Hartwig1-8/+9
2012-03-18Make load_{group,sort}policy.cc more l10n friendlyDaniel Hartwig2-21/+21
2012-03-18Finish off "Change the default width of version fields (%V and %v) from 10 ↵Daniel Hartwig1-1/+1
to 14…" This is mainly for commit "a303dcaceacdc6299b9f23cc2375b9e403d20da0" which was ineffective. * src/pkg_columnizer.cc: - really change default width of version columns to 14. * doc/en/aptitude.xml: - document changes to default widths of version columns. * po/{dz,nb}.po: - clear bad msgstr at src/pkg_columnizer.cc:86. * po/ru.po: - default width of 'downloadsize' column: 25 -> 19.
2012-03-18Restore 3-way compare to pkg_sortpolicy.ccDaniel Hartwig1-2/+11
Recent commit using pkg_name_lt was an oversight. There are a couple of places that use the 3-way compare of sort policies, ideally they should be eliminated in favour of a straight less-than. This would permit further with performance benefits, such as eliminating the pkg_sortpolicy_wrapper.
2012-03-18Always consider arch when sorting by package nameDaniel Hartwig2-15/+11
* src/generic/apt/apt.h: - consider arch in pkg_name_lt and use this in ver_name_lt. * src/pkg_sortpolicy.cc: - use pkg_name_lt instead of duplicated code.
2012-03-17Revert "Respect DPkg::Options when calling dpkg to recover failed installs"Daniel Hartwig1-17/+9
This reverts commit fd28ea8c2af0786d3a426d06ea3527aa48de96ac. That was a bit too hackish and subject to security issues. Much more work is needed to address the issue, and probably should be implemented within APT.
2012-03-17Use '~r' as short form of '?architecture'Daniel Hartwig1-0/+2
2012-03-17Respect DPkg::Options when calling dpkg to recover failed installsDaniel Hartwig1-9/+17
Usually we use APT to call dpkg, which handles all sorts of nice option parsing. However, if an install run fails then we to call 'dpkg --configure -a' ourselves to see if this fixes the problem. APT passes various options to dpkg, so we should also. * src/generic/apt/download_install_manager.cc: - pass DPkg::Options when invoking dpkg. LP: #257279 LP: #257279
2012-03-16Apply patch from Ubuntu to build -D_FORTIFY_SOURCE=2 errorsDaniel Hartwig5-12/+19
Thanks: Colin Watson Thanks: Michael Vogt Closes: #497539
2012-03-15Use full name (i.e. architecture) with ?name sort policyDaniel Hartwig1-2/+13
A package's full name includes the architecture, so consider this when using sort policies.
2012-03-15Refactor DepType orderingDaniel Hartwig3-87/+32
* src/generic/apt.{cc,h}: - make deptype_to_int an independent function, rename to get_deptype_order * src/generic/infer_reason.cc: - replace cmp_dep_types with get_deptype_order
2012-03-15Group results by package:arch in cmdline versionsDaniel Hartwig1-1/+9
2012-03-15New functions to sort architectures by prefered orderDaniel Hartwig2-0/+37
The order is defined by APT::Architectures, with "all" being first. * src/generic/apt/apt.h: - New function get_arch_order looks up an arch's position in the order. - New functor arch_lt sorts by the prefered order.
2012-03-15Fix '?action(upgrade)' and othersDaniel Hartwig1-0/+3
Searches for an action of 'reinstall', 'upgrade', 'downgrade' were matching incorrectly. * src/generic/apt/matching/match.cc: Add missing 'break' statements. Thanks: Rogier <rogier777@gmail.com> for the patch. Closes: #603862
2012-03-15Cleanup use of identifiers 'dep_type' and 'deptype'Daniel Hartwig2-39/+22
'deptype' is now used consistently to indicate direct use of pkgCache::Dep::DepType as opposed to pkgCache::Dep. * src/generic/apt/apt.h (deptype_lt): also condense a trivial switch statement.
2012-03-07Use arch-qualified names in info screens, dialogs, warningsDaniel Hartwig8-22/+26
Dependencies on Arch: all packages are still handling incorrectly. This patch thoroughly exposes this issue in the curses interface. Where previously aptitude would show (aboot-cross:amd64 info): --\ Depends (2) --- aboot-base (UNAVAILABLE) which is incorrect (as aboot-base *is* available), we now see: --\ Depends (2) --- aboot-base:amd64 (UNAVAILABLE) which makes it clear why the package is *considered* unavailable. APT tools (at least, 0.8.15 series) exhibit this same problem when displaying dependencies. Exposing this issue enables improvements to the dependency parser/handling to be made. Non-multi-arch systems are unaffected.
2012-03-07Refactor duplicated make_{info,dep,ver}_screen + insertDaniel Hartwig5-76/+51
* src/ui.{cc,h}: - New functions show_info_screen, show_dep_screen, show_ver_screen that combine make_x_screen and insert_main_widget with standard descriptions. * src/pkg_item.cc: * src/pkg_ver_item.cc: * src/solution_item.cc: - Migrate duplicated code for above to ui.cc.
2012-03-07Use SizeToStr for all of cmdline progress displayDaniel Hartwig1-2/+2
2012-03-06Always use arch-qualified names in logs and debug infoDaniel Hartwig6-66/+68
2012-03-03Add search terms ?architecture, ?multiarchDaniel Hartwig6-0/+221
* ?architecture(architecture) Select packages for the given architecture (such as "amd64", or "all"). * ?multiarch(multiarch) Select packages with a multi-arch capability of multiarch (that is, either "foreign", "same", "allowed", or "none").
2012-03-03Correctly identify "Architecture: all" packagesDaniel Hartwig2-2/+3
2012-03-02Show Multi-Arch field on pkg_info_screen, cmdline showDaniel Hartwig4-0/+25
* src/generic/apt/apt.{cc,h}: - New function multiarch_type returns a string describing a multi-arch type. * src/cmdline/cmdline_show.cc, src/pkg_info_screen.cc: - Show Multi-Arch field on packages where this is set.
2012-03-02Use arch-qualified names for rdependsDaniel Hartwig4-12/+12
2012-03-02Use arch-qualified names when explaining package states, actionsDaniel Hartwig2-47/+47
2012-03-02Use arch-qualified names when resolving dependenciesDaniel Hartwig3-32/+34
2012-03-02Store package state uniquely for each package:arch combinationDaniel Hartwig1-2/+10
Previously a multi-arch setup would confuse the package states, with packages available on multiple architectures overriding the states of each other in a non-deterministic way. This resulted in much annoying behaviour, such as packages being perpetually marked as new. No more! Package states are now stored with both the name and architecture to uniquely identify each package. Closes: #659079 Closes: #661744
2012-03-02Clean up "Change order of parts of the tree in the default view…"Daniel Hartwig3-52/+47
This ammends commit 965412eea0846427fdd00fc04d436e0bc030f53b. Some changes reverted or cleaned up due to inconsistencies with the rest of the code base: - changes to #include directives; - use of CamelCase in identifiers; - general formatting of the code (indentation, etc.)
2012-03-02Move code for reading Top Sections to apt.ccDaniel Hartwig3-8/+34
2012-03-02Revert "Improvement/simplification of the implementation of parsing sorting ↵Daniel Hartwig2-53/+127
policies by using boost::tokenizer…" This reverts commit 965412eea0846427fdd00fc04d436e0bc030f53b.
2012-02-27Make FindVector consistent with other wrappersDaniel Hartwig1-3/+6
2012-02-26Change the default width of version fields (%V and %v) from 10 to 14, since ↵Manuel A. Fernandez Montecelo1-2/+2
many packages contain long versions, and 14 character limit still respects the 80-column width in package view list (slightly changing initial suggestion from Osamu Aoki <osamu@debian.org> due to related commit changing 'sizechange'/%Z field) (Closes: #624542)
2012-02-26Change default width of %D, %I, %o, and %Z, make %Z adjustable (patch from ↵Manuel A. Fernandez Montecelo1-6/+7
Michał Kułach <michalkulach@gmail.com>) (Closes: #599209)
2012-02-26Improving error messages given to users when parsing grouping policies, ↵Manuel A. Fernandez Montecelo1-12/+11
mainly by referring to them by the name actually used in the command line (the one that users know), rather than by their 'internal' name (Closes: #231595)