Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Hello, I have not uploaded to unstable yet, but this is to request a pre-approval to upload to unstable if it will be accepted for stretch. It fixes some of the more important bugs right now in aptitude (some causing crashes, could be even RC), some minor problems with unintursive changes, and some doc/po translation updates (not included in the diff) as well as strenghthening a build-dep in d/control on the debian/ side (not affecting Debian because versions are in sync, but it could help if building for derivatives or in pre-stretch systems). I attach the diff as git-log with the most important changes, leaving aside the translation updates and d/control. I think that it's a bit more clear than a debdiff in this case, but it wouldn't be a problem to provide a debdiff if you prefer that. unblock aptitude/0.8.6-1 Cheers. -- System Information: Debian Release: 9.0 APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
commit e46df0b36580be3a1a389f0008b1fc1485b5d963 Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Sun Feb 19 00:22:37 2017 +0100 [cmdline] Better message when there are no deb-src in sources.list (Closes: #841875) diff --git a/NEWS b/NEWS index b9d8250d..e6f241c6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ [2017-01-xx] Version 0.8.6 UNRELEASED +- User visible changes: + + * [cmdline] Better message when there are no deb-src in sources.list + (Closes: #841875) + - Bug fixes: * Use a more strict mask for comparison of dependency operators, thanks to diff --git a/src/cmdline/cmdline_action.cc b/src/cmdline/cmdline_action.cc index 564b8d08..32c01c99 100644 --- a/src/cmdline/cmdline_action.cc +++ b/src/cmdline/cmdline_action.cc @@ -1,7 +1,7 @@ // cmdline_action.cc // // Copyright 2004 Daniel Burrows -// Copyright 2015-2016 Manuel A. Fernandez Montecelo +// Copyright 2015-2017 Manuel A. Fernandez Montecelo #include "cmdline_action.h" #include "cmdline_util.h" @@ -46,6 +46,13 @@ namespace bool allow_auto, const std::shared_ptr<terminal_metrics> &term_metrics) { + // check for deb-src in sources.list or die -- needs to instantiate + { + pkgSrcRecords records(*apt_source_list); + aptitude::cmdline::on_apt_errors_print_and_die(); + } + + aptitude::cmdline::source_package sourcepkg = aptitude::cmdline::find_source_package(pkg, version_source, diff --git a/src/cmdline/cmdline_action.h b/src/cmdline/cmdline_action.h index 758287e6..07f3ab39 100644 --- a/src/cmdline/cmdline_action.h +++ b/src/cmdline/cmdline_action.h @@ -1,7 +1,7 @@ // cmdline_action.h -*-c++-*- // // Copyright (C) 2004, 2010 Daniel Burrows -// Copyright (C) 2015-2016 Manuel A. Fernandez Montecelo +// Copyright (C) 2015-2017 Manuel A. Fernandez Montecelo // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as commit 0d5495389aabc779539d4d5ff4cd2a5ab6951591 Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Sat Feb 18 22:58:17 2017 +0100 Fix misdetection of auto-installed packages from apt (Closes: #831858, #841347) diff --git a/NEWS b/NEWS index ea4a8a04..b9d8250d 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,9 @@ Version 0.8.6 UNRELEASED caused extra problems like classifying the tag in their own subtree due to the new-line mismatch in the tag name. + * Fix misdetection of auto-installed packages from apt + (Closes: #831858, #841347) + - Translation updates: * ru.po: Russian translation by Lev Lamberov (Closes: #855329) diff --git a/src/generic/apt/aptcache.cc b/src/generic/apt/aptcache.cc index 22788f91..5b686480 100644 --- a/src/generic/apt/aptcache.cc +++ b/src/generic/apt/aptcache.cc @@ -1,7 +1,7 @@ // aptcache.cc // // Copyright 1999-2009, 2011 Daniel Burrows -// Copyright 2015-2016 Manuel A. Fernandez Montecelo +// Copyright 2015-2017 Manuel A. Fernandez Montecelo // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -398,6 +398,13 @@ bool aptitudeDepCache::build_selection_list(OpProgress* Prog, pkg_state.remove_reason=(changed_reason) section.FindI("Remove-Reason", manual); + // marked as auto-installed from apt? -- bug #841347 + // + // using PkgState[pkg->ID] because passing "pkg" needs + // apt_cache_file initialised + if (is_auto_installed(PkgState[pkg->ID])) + pkg_state.previously_auto_package = true; + candver=section.FindS("Version"); pkg_state.selection_state=(pkgCache::State::PkgSelectedState) section.FindI("State", pkgCache::State::Unknown); diff --git a/src/generic/apt/aptcache.h b/src/generic/apt/aptcache.h index 33935e3d..3fe3e301 100644 --- a/src/generic/apt/aptcache.h +++ b/src/generic/apt/aptcache.h @@ -1,7 +1,7 @@ // aptcache.h -*-c++-*- // // Copyright 1999-2005, 2007-2009, 2011 Daniel Burrows -// Copyright 2015-2016 Manuel A. Fernandez Montecelo +// Copyright 2015-2017 Manuel A. Fernandez Montecelo // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by commit 5cc039a845582fe5e7e54e6db9fcfc5f969c23be Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Sat Feb 18 20:33:56 2017 +0100 Fix reading tag and their classification in subtrees (Closes: #853037) Newline characters were added to the last tag (or the only one), and it caused extra problems like classifying the tag in their own subtree due to the new-line mismatch in the tag name. diff --git a/NEWS b/NEWS index 04193e73..ea4a8a04 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,12 @@ Version 0.8.6 UNRELEASED Using a stricter mask to capture only the operators, as per the documentation of the enum (lower 4 bits). + * Fix reading tag and their classification in subtrees (Closes: #853037) + + Newline characters were added to the last tag (or the only one), and it + caused extra problems like classifying the tag in their own subtree due to + the new-line mismatch in the tag name. + - Translation updates: * ru.po: Russian translation by Lev Lamberov (Closes: #855329) diff --git a/src/generic/apt/tags.cc b/src/generic/apt/tags.cc index cb72d753..50eab31a 100644 --- a/src/generic/apt/tags.cc +++ b/src/generic/apt/tags.cc @@ -2,7 +2,7 @@ // // Copyright (C) 2005, 2007-2008, 2010 Daniel Burrows // Copyright (C) 2014 Daniel Hartwig -// Copyright (C) 2016 Manuel A. Fernandez Montecelo +// Copyright (C) 2016-2017 Manuel A. Fernandez Montecelo // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as @@ -243,6 +243,10 @@ static bool load_tags_from_debtags(OpProgress *progress) const char *tagend = tagstart; while((*tagend) != '\0') ++tagend; + // remove last position, which is a newline (\n), and was later used as + // part of the tag string causing different problems -- see bug #853037 + if (tagend > tagstart) + --tagend; tag_list ts(tagstart, tagend); for(tag_list::const_iterator t = ts.begin(); diff --git a/src/generic/apt/tags.h b/src/generic/apt/tags.h index 41ac5835..b95dd87c 100644 --- a/src/generic/apt/tags.h +++ b/src/generic/apt/tags.h @@ -2,7 +2,7 @@ // // Copyright (C) 2005, 2007, 2010 Daniel Burrows // Copyright (C) 2014 Daniel Hartwig -// Copyright (C) 2016 Manuel A. Fernandez Montecelo +// Copyright (C) 2016-2017 Manuel A. Fernandez Montecelo // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as commit 81eec1ba9a2c9e1c34d9a2180dfa4043c9a8f109 Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Fri Feb 17 21:52:30 2017 +0100 Use a more strict mask for comparison of dependency operators (Closes: #836567, #837946, #849370) Modified NEWS entry to also close #837946. diff --git a/NEWS b/NEWS index 58529ba6..04193e73 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,7 @@ Version 0.8.6 UNRELEASED - Bug fixes: * Use a more strict mask for comparison of dependency operators, thanks to - Aaron M. Ucko for the initial patch (Closes: #836567, #849370) + Aaron M. Ucko for the initial patch (Closes: #836567, #837946, #849370) Recently apt started to use more values in an enum used for dependency operator comparisons, which causes some problems because aptitude's code commit c191b226eb8ec2ca6aec7158790fe085d0aab82f Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Fri Feb 17 21:51:34 2017 +0100 Declaring variable as static const diff --git a/src/generic/apt/apt.cc b/src/generic/apt/apt.cc index 68c0e49c..fc318741 100644 --- a/src/generic/apt/apt.cc +++ b/src/generic/apt/apt.cc @@ -1143,7 +1143,7 @@ static bool subsumes(const pkgCache::DepIterator &d1, // the lower 4 bits are the actual operator (from documentation of the // data type) - int comp_mask = 0xf; + static const int comp_mask = 0xf; pkgCache::Dep::DepCompareOp t1 = (pkgCache::Dep::DepCompareOp) (d1->CompareOp & comp_mask); pkgCache::Dep::DepCompareOp t2 = (pkgCache::Dep::DepCompareOp) (d2->CompareOp & comp_mask); commit 867141bbd4c2ba26c7c3f86923b7177958ac3d9b Author: Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> Date: Thu Feb 16 23:40:03 2017 +0100 Use a more strict mask for comparison of dependency operators (Closes: #836567, #849370) Use a more strict mask for comparison of dependency operators, thanks to Aaron M. Ucko for the initial patch (Closes: #836567, #849370) Recently apt started to use more values in an enum used for dependency operator comparisons, which causes some problems because aptitude's code from many years ago, which did not expect new values. Using a stricter mask to capture only the operators, as per the documentation of the enum (lower 4 bits). diff --git a/NEWS b/NEWS index f22ea692..58529ba6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,18 @@ [2017-01-xx] Version 0.8.6 UNRELEASED +- Bug fixes: + + * Use a more strict mask for comparison of dependency operators, thanks to + Aaron M. Ucko for the initial patch (Closes: #836567, #849370) + + Recently apt started to use more values in an enum used for dependency + operator comparisons, which causes some problems because aptitude's code + from many years ago, which did not expect new values. + + Using a stricter mask to capture only the operators, as per the + documentation of the enum (lower 4 bits). + - Translation updates: * ru.po: Russian translation by Lev Lamberov (Closes: #855329) diff --git a/src/generic/apt/apt.cc b/src/generic/apt/apt.cc index 1850825d..68c0e49c 100644 --- a/src/generic/apt/apt.cc +++ b/src/generic/apt/apt.cc @@ -1141,8 +1141,11 @@ static bool subsumes(const pkgCache::DepIterator &d1, if(!d2.TargetVer()) return false; - pkgCache::Dep::DepCompareOp t1 = (pkgCache::Dep::DepCompareOp) (d1->CompareOp &~ pkgCache::Dep::Or); - pkgCache::Dep::DepCompareOp t2 = (pkgCache::Dep::DepCompareOp) (d2->CompareOp &~ pkgCache::Dep::Or); + // the lower 4 bits are the actual operator (from documentation of the + // data type) + int comp_mask = 0xf; + pkgCache::Dep::DepCompareOp t1 = (pkgCache::Dep::DepCompareOp) (d1->CompareOp & comp_mask); + pkgCache::Dep::DepCompareOp t2 = (pkgCache::Dep::DepCompareOp) (d2->CompareOp & comp_mask); int cmpresult = _system->VS->DoCmpVersion(d1.TargetVer(), d1.TargetVer()+strlen(d1.TargetVer()), d2.TargetVer(), d2.TargetVer()+strlen(d2.TargetVer()));