10158 Commits

Author SHA1 Message Date
Julian Andres Klode
dccfe14ffb Release 2.5.3 2022-09-28 17:34:34 +02:00
Julian Andres Klode
f8497bb5e4 Merge branch 'pu/phased-updates-fixes-2022-09-23' into 'main'
phased update improvements

See merge request apt-team/apt!262
2022-09-28 15:13:12 +00:00
Julian Andres Klode
5f5a8deedf full-upgrade: Mark phased upgrades for keep before anything else
By marking them at the end, we might make other decisions that
depend on the new phased updates, confusing the solver. Run the
marking at the start too.

The EDSP test file from Jeremy was modified to include Machine-ID
and Phased-Update-Percentage fields and then filtered to mostly
exclude packages irrelevant to the test case by running

    grep-dctrl   \( -FRequest "EDSP 0.5" -o -FInstalled yes \
                    -oFPhased-Update-Percentage 10  \)  \
                -a --not -FArchitecture i386

LP: #1990586
2022-09-28 16:32:44 +02:00
Julian Andres Klode
f93a5aa2da Check state of dependency, not dependee in dependency keep back
When iterating over I's dependencies (which are called Pkg), we
accidentally checked if I was Protected() instead of Pkg when deciding
whether Pkg can be kept back.

LP: #1990684
2022-09-28 16:32:44 +02:00
Julian Andres Klode
28e44a3cd8 edsp: Add support for phased updates (test in LP#1990586)
Add Machine-ID to the first stanza, and copy Phased-Update-Percentage
to package stanzas.

This will be tested at a later state by the EDSP test case for
bug 1990586.
2022-09-28 16:32:34 +02:00
Julian Andres Klode
8d35404027 Merge branch 'fix/install-pkg-order' into 'main'
Respect users pkg order on `apt install` for resolving

See merge request apt-team/apt!256
2022-09-21 10:48:54 +00:00
Julian Andres Klode
1689dedd18 Merge branch 'musl' into 'main'
apt-pkg/contrib/fileutl.h  Explicitly include sys/stat.h

See merge request apt-team/apt!255
2022-09-21 10:43:35 +00:00
Julian Andres Klode
6bc11782ab Merge branch 'clang15' into 'main'
typecast time_t and suseconds_t from std::chrono

See merge request apt-team/apt!259
2022-09-21 10:42:58 +00:00
Khem Raj
81a5256298 interactive-helper: Undefine _FORTIFY_SOURCE
This ensures that it compiles when clang compiler is passing
-DFORTIFY_SOURCES=2

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-16 20:07:40 -07:00
Khem Raj
66b305f86f typecast time_t and suseconds_t from std::chrono
This fixes build on some architectures like mips
progress.cc:125:31: error: non-constant-expression cannot be narrowed from type 'std::chrono::duration<long long>::rep' (aka 'long long') to '__time_t' (aka 'long') in initializer list [-Wc++11-narrowing]
   struct timeval NowTime = { Now_sec.count(), Now_usec.count() };

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-16 20:07:40 -07:00
David Kalnischkies
e1f332324f Respect users pkg order on apt install for resolving
The command line is evaluated in two steps: First all packages given
are marked for install and as a second step the resolver is started on
all of them in turn to get their dependencies installed.

This is done so a user can provide a non-default choice on the command
line and have it respected regardless of where on the command line it
appears.

On the other hand, the order in which dependencies are resolved can
matter, so instead of using a "random" order, we now do this in the
order given on the command line, so if you e.g. have a meta package
pulling in non-default choices and mention it first the choices are
respected predictably instead of depending on first appearance of the
package name while creating the binary cache.

I might have "broken" this more than a decade ago while introducing the
reworked command line parsing for Multi-Arch, which also brought in the
split into the two steps mentioned above which was the far more
impactful 'respect user choice' change. This one should hardly matter in
practice, but as the tests show, order can have surprising side effects.
2022-09-02 23:37:58 +02:00
David Kalnischkies
009cf61122 Avoid triggering unused variable ‘State’ in doAutoInstall
Reported-By: gcc
Gbp-Dch: Ignore
2022-09-02 22:32:59 +02:00
lancethepants
54925a6d39 apt-pkg/contrib/fileutl.h Explicitly include sys/stat.h
This fixes compatibility with musl C library.
2022-08-26 11:13:29 -06:00
Hideki Yamane
6499f7dc84 Fix typo in Japanese program translation
See merge request apt-team/apt!252
2022-08-21 13:24:03 +02:00
David Kalnischkies
5c046cf4f6 Don't reuse filename for in-tree builds of apt
A temporary filename is used as a workaround for bugs/missing features
in other software dealing with /dev/stdin, but nobody said I have to use
the exact same filename….

However in-tree builds are not generally recommended.

References:
 aa4a4326d0
 fb0561efc4
Regression-Of: 701a501fb1
Reported-By: Lance Fredrickson <lancethepants@gmail.com>
2022-08-08 10:22:58 +02:00
David Kalnischkies
dc25210d88 Keep color disabled if APT::Color was set to false
Support for envvar NO_COLOR was added in 2.3.11, but with our own
options we can also be a tiny bit more sensible in not overriding
an explicit choice to disable colors.

References: 400a689556
2022-08-08 10:22:50 +02:00
Julian Andres Klode
7d10b39f7a Merge branch 'doc-explain-apt-download-authenticity' into 'main'
doc: Explain that apt-get download ensures package authenticity

See merge request apt-team/apt!251
2022-08-07 12:45:17 +00:00
Povilas Kanapickas
5e4d241e27 doc: Explain that apt-get download ensures package authenticity
The documentation currently does not specify whether `apt-get download`
verifies the authenticity of downloaded packages or not. The underlying
code does verify the authenticity of packages as usual and would fail if
the package signature is invalid. Therefore it makes sense to make this
guarantee explicit in the documentation, because without it
security-conscious users will likely want to recheck the signatures or
checksums manually which is not necessary in this case and just wastes
time.
2022-08-06 15:43:46 +03:00
Julian Andres Klode
2d87af57ea Release 2.5.2 2022-07-24 18:00:08 +02:00
Julian Andres Klode
b31829210e Merge branch 'pu/upgrade-other-binaries' into 'main'
Upgrade all binaries in a source package

See merge request apt-team/apt!247
2022-07-24 15:00:47 +00:00
Julian Andres Klode
c28fc7366c Add NEWS entry 2022-07-24 16:29:59 +02:00
Julian Andres Klode
518746f7e0 Add flag to disable upgrade by source and test case 2022-07-24 15:44:13 +02:00
Julian Andres Klode
c4bab3c935 Avoid recursion by looping of other binaries twice
First mark them for upgrade without autoInst, so we don't call
their "mark other binaries loop"; then call them again with it.

Without this change, each binary package would upgrade the next
one in the list, recursively.
2022-07-24 15:27:18 +02:00
Julian Andres Klode
119a8d0ed1 Upgrade all binaries in a source package
Schedule all other binaries in the source package for upgrade if
the candidate version belongs to the same source version as the
package we are upgrading.

This will significantly reduce the risk of partial upgrades and
should make life a lot easier.
2022-07-24 15:27:18 +02:00
Julian Andres Klode
b141ce0d35 Merge branch 'pu/upgrade-broken-depends' into 'main'
Mark broken reverse depends for upgrade

See merge request apt-team/apt!248
2022-07-24 13:05:48 +00:00