Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #853424

Travis CI: Unsafe apt use?

Added by Marko Lindqvist over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Bootstrap
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Seen on Travis CI output when script installs packages with apt

"WARNING: apt does not have a stable CLI interface. Use with caution in scripts."

Is it so that apt-get has been deprecated, and apt is not yet stable?

travis_dep.patch (3.49 KB) travis_dep.patch Sveinung Kvilhaugsvik, 2019-12-24 03:18 AM

History

#1 Updated by Jacob Nevins over 2 years ago

My impression was that apt-get isn't going away, but its interface has been stabilised for low-level script use; and apt is the recommended human-facing tool (and they want freedom to make backward-incompatible changes in future).

From apt(8) on my system:

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
       The apt(8) commandline is designed as an end-user tool and it may
       change behavior between versions. While it tries not to break backward
       compatibility this is not guaranteed either if a change seems
       beneficial for interactive use.

       All features of apt(8) are available in dedicated APT tools like apt-
       get(8) and apt-cache(8) as well.  apt(8) just changes the default value
       of some options (see apt.conf(5) and specifically the Binary scope). So
       you should prefer using these commands (potentially with some
       additional options enabled) in your scripts as they keep backward
       compatibility as much as possible.

#2 Updated by Marko Lindqvist over 2 years ago

Interesting... when my Debian was initially updated after Buster release, there was some problems with 'apt-get' not working properly, and discussions about the solution I found had many comments that people simply shouldn't be using outdated apt-get any more, but should have migrated to apt already. But I don't what is the position of those people in the Debian project, or how well informed they are.

#3 Updated by Sveinung Kvilhaugsvik over 2 years ago

Is there a reason for installing dependencies in the build script rather than using travis' addons: apt: packages? If not we could move depependency installation there and have travis handle apt vs apt-get

#4 Updated by Marko Lindqvist over 2 years ago

Sveinung Kvilhaugsvik wrote:

Is there a reason for installing dependencies in the build script rather than using travis' addons: apt: packages?

Not that I know.

#5 Updated by Sveinung Kvilhaugsvik over 2 years ago

  • File travis_dep.patch travis_dep.patch added
  • Category set to Bootstrap
  • Status changed from New to Resolved
  • Assignee set to Sveinung Kvilhaugsvik
  • Sprint/Milestone set to 3.1.0

Marko Lindqvist wrote:

Sveinung Kvilhaugsvik wrote:

Is there a reason for installing dependencies in the build script rather than using travis' addons: apt: packages?

Not that I know.

In that case I'm moving it. This will also allow optimizing jobs by removing dependencies in the future.

#6 Updated by Sveinung Kvilhaugsvik over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF