• Bug#1091472: Please provide an apt.conf option equivalent to -U

    From Josh Triplett@21:1/5 to All on Fri Dec 27 11:40:02 2024
    Package: apt
    Version: 2.9.19
    Severity: wishlist
    X-Debbugs-Cc: josh@joshtriplett.org

    apt-get and apt support a -U option to update before running the
    command. Please consider providing an option in apt.conf to always act
    as if this option were provided. That would allow (for instance) CI
    systems to make `apt install xyz` Just Work.

    I would suggest an `Apt::Get::Update` option, with possible values
    "true", "false", and (perhaps in the future) "binaries" (to update only
    binary repos and not source repos).

    -- System Information:
    Debian Release: trixie/sid
    APT prefers unstable
    APT policy: (500, 'unstable'), (1, 'experimental')
    Architecture: amd64 (x86_64)
    Foreign Architectures: arm64

    Kernel: Linux 6.12.6-amd64 (SMP w/12 CPU threads; PREEMPT)
    Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)

    Versions of packages apt depends on:
    ii adduser 3.137
    ii base-passwd 3.6.5
    ii debian-archive-keyring 2023.4
    ii libapt-pkg6.0t64 2.9.19
    ii libc6 2.40-4
    ii libgcc-s1 14.2.0-11
    ii libseccomp2 2.5.5-2
    ii libssl3t64 3.3.2-2
    ii libstdc++6 14.2.0-11
    ii libsystemd0 257.1-4
    ii sqv 1.2.1-4

    Versions of packages apt recommends:
    ii ca-certificates 20241223

    Versions of packages apt suggests:
    pn apt-doc <none>
    ii aptitude 0.8.13-6.1
    ii dpkg-dev 1.22.11
    ii gnupg 2.2.45-2
    pn powermgmt-base <none>

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Andres Klode@21:1/5 to Josh Triplett on Fri Dec 27 13:30:01 2024
    On Fri, Dec 27, 2024 at 02:36:51AM -0800, Josh Triplett wrote:
    Package: apt
    Version: 2.9.19
    Severity: wishlist
    X-Debbugs-Cc: josh@joshtriplett.org

    apt-get and apt support a -U option to update before running the
    command. Please consider providing an option in apt.conf to always act
    as if this option were provided. That would allow (for instance) CI
    systems to make `apt install xyz` Just Work.

    I would suggest an `Apt::Get::Update` option, with possible values
    "true", "false", and (perhaps in the future) "binaries" (to update only binary repos and not source repos).

    This is controllable by the APT::Update option. All command-line options
    are just syntactic sugar for apt.conf options. As the feature is experimental, and not working correctly (it doesn't acquire and hold the locks
    throughout but behaves exactly like update&&upgrade), it's not documented.

    The goal is to fix the locking issue, add a separate stamp file, and
    then switch the default to automatically update on missing sources or
    if we haven't updated in 7 days.
    --
    debian developer - deb.li/jak | jak-linux.org - free software dev
    ubuntu core developer i speak de, en

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Kalnischkies@21:1/5 to All on Fri Dec 27 14:50:02 2024
    Am Fri, Dec 27, 2024 at 02:36:51AM -0800, schrieb Josh Triplett:
    apt-get and apt support a -U option to update before running the
    command. Please consider providing an option in apt.conf to always act

    Given how command line parsing works in apt, this already has a config option… `APT::Update` (but Julian was faster than I was; lets sent the
    mail anyway).


    as if this option were provided. That would allow (for instance) CI
    systems to make `apt install xyz` Just Work.

    At the expense of just breaking mirrors as there is no cooldown or
    anything that would stop apt from asking the mirror every time even if
    you chain hundreds of install calls together like most people do in CI.

    It is also kinda likely to break scripts or surprise you in other clever
    ways as it quiet literally does what it says in the man page… so it e.g. effects also an innocent "apt install --dry-run foo" call. And the man
    page mentions other problems.

    In my eyes, this needs more work before we can let that loose on the
    general public, but obviously, that wasn't my call to make.

    I wonder if you wouldn't be better served by a "if lists/ is empty, call
    update first" rather than a "call it all the time" – to at least trim
    away some of problems this "magic update call" causes.


    "true", "false", and (perhaps in the future) "binaries" (to update only binary repos and not source repos).

    Unlikely as they tend to come in pairs (or the deb-src as an addendum to
    the deb if you prefer to look at it this way), but are secured by the
    same Release file, so you can't just "half"-update from the repository
    as apt wouldn't know anymore which files are current or not. Beside,
    are Components, Icons, Translations, Contents, … and all the other
    potential targets part of your 'binaries' set or not?

    (There are bugs with the existing ways of entering such a "half" update
    state in the form of --no-list-cleanup already that will be hard enough
    to solve without adding more pain)


    Best regards

    David Kalnischkies

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE5sn+Q4uCja/tn0GrMRvlz3HQeIMFAmdurboACgkQMRvlz3HQ eINtBA//b7L7OIVx1OtDSpHLvm5NkVllQXt21fnQN85rcBfEHIcrlaF8BInQbU8x ZWzEovCz2R/njpqur7uGVDUKe81ZzMxTacfYqLkY6cJAJ7G5tXGqSHgxwjOcmlV5 IqDY44XttsFGk91W3MaCDGxPHt1fbNvXVu7OKHOKWk2WqsmxyJ7+eiApVrHcu4wd /BA1RE2YkGLSkcuy0hok523T5bliy3Ci0gmQnyTYEmEsgHthAdKMn/FNF5omyb2f r3SUzfWfsLaEw425gmA+nIizpciOhGmdfFYw0CoNlkCvyDsLr6mT0VxAtJ0LC+kL si+IDpwqYPwo0wMXk9girp3/4SAwEEqAWAJL7k8sGm/VAbOedBsHM0+6HtnXlLZ8 z55GlX86hjy+ZuLU3LSLKZnMAWBnvQcPMU1b6FGr0Re/6gxbzcI4WUwGuJ9x8zAo wSR9GJzEB7GxefgxL5/8MeXAgF8kmkvyLEbNVlyqT/I5X89UgAygDSG8MF0eHP5p 3YjAToNjH2xPgyExXtJbOak2jV2puCJZjWJde9lsD2B8oKlCvnz+m3VWn4OCOF/a V5oPpH0yG1Vg3xQpQpsJ4VxUnRAhGmUF/jiBNiFAuPoX1F9xrHIliyU+FWX9KnRg WVtPw6vGRfpwhJTEk1me+80TuoDAQPevwoW/+MXEt79CW8ar37k=
    =2G0Y
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)