APT 1.0 released

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

APT 1.0 released

Post by Monsta »

On the April 1st, without any joking, Debian developers released APT version 1.0.

One of the new features is the new apt binary:
The big news for this version is that we included a new “apt” binary that combines the most commonly used commands from apt-get and apt-cache. The commands are the same as their apt-get/apt-cache counterparts but with slightly different configuration options.

Currently the apt binary supports the following commands:
  • list: which is similar to dpkg list and can be used with flags like
    --installed or --upgradable.
  • search: works just like apt-cache search but sorted alphabetically.
  • show: works like apt-cache show but hide some details that people are less likely to care about (like the hashes). The full record is still available via apt-cache show of course.
  • update: just like the regular apt-get update with color output enabled.
  • install,remove: adds progress output during the dpkg run.
  • upgrade: the same as apt-get dist-upgrade –with-new-pkgs.
  • full-upgrade: a more meaningful name for dist-upgrade.
  • edit-sources: edit sources.list using $EDITOR.
Some of you might be aware that Linux Mint already includes the convenient script also named apt that has the same goal: to provide simple access to various apt-related commands.
The difference is:
  • Mint's script resides in /usr/local/bin while Debian's apt binary is in /usr/bin. Since /usr/local/bin usually comes first in the $PATH, when you simply run "apt" in the terminal, Mint's script will be executed.
  • Mint's script has more options.
  • Mint's script uses not only apt-* tools (apt-cache, apt-get) but also aptitude.
News sources:
News article at Phoronix
The official release announcement at the mailing list
The announcement at Michael Vogt's blog
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29510
Joined: Wed Jul 06, 2011 3:58 am

Re: APT 1.0 released

Post by xenopeek »

I'd see it pop up on my news feed, but hadn't read it yet. Looks handy, but as usual Linux Mint developers have already done something to patch the weirdness of needing apt-get/apt-cache/dpkg/aptitude for package management :)
Image
killer de bug

Re: APT 1.0 released

Post by killer de bug »

Monsta wrote: [*] upgrade: the same as apt-get dist-upgrade –with-new-pkgs.
I may be misreading this... but does it mean apt update is performing a dist-upgrade?

Monsta wrote:[*] full-upgrade: a more meaningful name for dist-upgrade.
Changing the name of a well-known command is not that clever. :lol:
killer de bug

Re: APT 1.0 released

Post by killer de bug »

Ok I got an answer in Michael Vogt's blog:
The first is the new parameter “–with-new-pkgs” for the upgrade
command:

# apt-get upgrade --with-new-pkgs

that will install new dependencies on the upgrade but never remove
packages. A typical use-case is a stable system that gets a kernel
with a new kernel ABI package.
So it's no more an apt-get upgrade but it's not a dist-upgrade since it's unable to remove packages :lol:
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

I had been using apt upgrade as a safe way to update everything except the kernel (as kernel updates sometimes upset VBox). Now I am finding the function has changed (Qiana) and the kernel gets updated as it would with dist-upgrade pre- APT 1.0.
killer de bug wrote:Changing the name of a well-known command is not that clever.
Argh!

So I guess the best way to upgrade as before excluding kernel would be to pin the pkgs normally held back previously:

The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic

Or is there a better way?
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: APT 1.0 released

Post by Monsta »

palo wrote:I had been using apt upgrade
Post the output of:

Code: Select all

which apt
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

Monsta wrote:
palo wrote:I had been using apt upgrade
Post the output of:

Code: Select all

which apt
Interesting
Maya - /usr/bin/apt
Qiana - /usr/local/bin/apt
killer de bug

Re: APT 1.0 released

Post by killer de bug »

Monsta wrote:
  • Mint's script resides in /usr/local/bin while Debian's apt binary is in /usr/bin. Since /usr/local/bin usually comes first in the $PATH, when you simply run "apt" in the terminal, Mint's script will be executed.
:wink:
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

killer de bug wrote:
Monsta wrote:
  • Mint's script resides in /usr/local/bin while Debian's apt binary is in /usr/bin. Since /usr/local/bin usually comes first in the $PATH, when you simply run "apt" in the terminal, Mint's script will be executed.
:wink:
Drifting a little off point (for my question anyway) but that statement would appear to be incorrect if (for Maya) "which apt" is saying /usr/bin/apt is being used but there is in fact apt in /usr/local/bin

whereis apt (both Maya and Qiana)
apt: /usr/bin/apt /etc/apt /usr/lib/apt /usr/bin/X11/apt /usr/local/bin/apt /usr/share/apt /usr/share/man/man8/apt.8.gz /usr/share/man/man1/apt.1.gz


I am not really understanding how that relates to the new function of APT 1.0 apt-upgrade and the kernel updates.
killer de bug

Re: APT 1.0 released

Post by killer de bug »

What is important for you to understand is that (for whatever reason) you are not using the same tool anymore. In Maya you were using the official apt tool but now in Qiana you are using the version coming from Linux Mint (which seems logic for me). And the two tools are not working exactly in the same way.

This said, apt upgrade has never been able to install a new kernel (and it is still not if you don't add something to the command) -- it can't install the 3.14 kernel if you have the 3.13 -- but apt upgrade can install a never version of your current kernel -- 3.13.10 if you have 3.13.2...--.
I think that you are confused at the moment, because a few kernel security fixes are available. And that's why you think apt upgrade try to install a new kernel... :wink:
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: APT 1.0 released

Post by Monsta »

palo wrote:Maya - /usr/bin/apt
It shouldn't be so. Did you remove mintSystem, by any chance?
Post the output of:

Code: Select all

apt policy mintsystem

Code: Select all

apt contains /usr/bin/apt
killer de bug wrote:In Maya you were using the official apt tool
APT 1.0 hadn't been released for Maya, so /usr/bin/apt shouldn't be there.
killer de bug

Re: APT 1.0 released

Post by killer de bug »

Palo,

could you please post the content of the apt file you have in Maya (/usr/bin/apt)?
PatH57

Re: APT 1.0 released

Post by PatH57 »

seems it is a new tool and we will need a bit of time to get used to it
as long as I understand what it is doing I can decide to use it or not, just naming convention could have been "better"
killer de bug

Re: APT 1.0 released

Post by killer de bug »

On a normal Linux Mint system, this tool should not be easily usable. We have already a home made 'apt' and it's more powerful ;)

if you want to understand what is apt, read this: http://forums.linuxmint.com/viewtopic.p ... 66#p658469
Last edited by killer de bug on Sat Jul 26, 2014 6:40 am, edited 1 time in total.
PatH57

Re: APT 1.0 released

Post by PatH57 »

totally agree it just the naming does remind some MS stuff and I'm sure I "would click" on it and then complain after :lol:
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

killer de bug wrote:What is important for you to understand is that (for whatever reason) you are not using the same tool anymore.
Got it. Maya uses APT 0.8.16 and Qiana uses Apt 1.0.1 - The frustration/confusion lies in the fact that the command I used to update everything but the kernel does not do that anymore (best alternative wanted).
killer de bug wrote:This said, apt upgrade has never been able to install a new kernel (and it is still not if you don't add something to the command) -- it can't install the 3.14 kernel if you have the 3.13 -- but apt upgrade can install a never version of your current kernel -- 3.13.10 if you have 3.13.2...--.
If I said anything about "install a new kernel" it was a slip - this is about updating.

In Maya my kernel is 3.2.0.23.25 and the newer version 3.2.0.67.79 is held back if I run apt upgrade.
In Qiana my kernel is 3.13.0-24.46 and the newer version 3.13.0-24.47 will be updated if I run apt upgrade.
killer de bug wrote:I think that you are confused at the moment
Yep. Thankfully there are some around here able and willing to set me straight.

The question remains - best way to get the same results with the new tool.
Monsta wrote:
palo wrote:Maya - /usr/bin/apt
It shouldn't be so. Did you remove mintSystem, by any chance?
Post the output of:

Code: Select all

apt policy mintsystem

Code: Select all

apt contains /usr/bin/apt
killer de bug wrote:In Maya you were using the official apt tool
APT 1.0 hadn't been released for Maya, so /usr/bin/apt shouldn't be there.
I did not remove mintSystem.

apt policy mintsystem
mintsystem:
Installed: 7.8.3
Candidate: 7.8.3
Version table:
*** 7.8.3 0
700 http://mirror.metrocast.net/linuxmint-packages/ maya/main i386 Packages
100 /var/lib/dpkg/status

apt contains /usr/bin/apt
dpkg-query: no path found matching pattern /usr/bin/apt.
killer de bug wrote:Palo,

could you please post the content of the apt file you have in Maya (/usr/bin/apt)?
That is a link - /etc/alternatives/apt
killer de bug

Re: APT 1.0 released

Post by killer de bug »

palo wrote: That is a link - /etc/alternatives/apt
Then, can you please post the output of this new file?
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

killer de bug wrote:
palo wrote: That is a link - /etc/alternatives/apt
Then, can you please post the output of this new file?

That links to /usr/lib/jvm/java-7-oracle/bin/apt and this is what that looks like to me:
killer de bug

Re: APT 1.0 released

Post by killer de bug »

palo wrote: That links to /usr/lib/jvm/java-7-oracle/bin/apt and this is what that looks like to me:
This is rather unexpected and interesting... I guess you installed Java 7 and it provides a script to update itself? Monsta we need your knowledge here :D
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: APT 1.0 released

Post by palo »

I think the apt upgrade command is working in Qiana as it was in Maya with pinning as described in the Blocking packages with APT/DPKG section here. So I now have this output:

Code: Select all

pat-M17Xfce2 ~ # apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
  linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
The following packages will be upgraded:
  base-files dbus dbus-x11 gir1.2-gudev-1.0 grub-common grub-pc grub-pc-bin
  grub2-common libdbus-1-3 libegl1-mesa libegl1-mesa-drivers libgbm1
  libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles2-mesa libgudev-1.0-0
  libopenvg1-mesa libpam-systemd libsystemd-daemon0 libsystemd-login0 libudev1
  libwayland-egl1-mesa libxatracker2 linux-firmware linux-libc-dev
  systemd-services udev upstart xserver-xorg-video-ati
  xserver-xorg-video-radeon
31 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 33.2 MB of archives.
After this operation, 5,721 kB of additional disk space will be used.
Do you want to continue? [Y/n]
The linux-image-extra-x-generic is something new to me but then it may have been there after Maya. This also blocks those updates from showing in the Update Manager so I guess level 4&5 updates can be checked and the kernel can be untouched.

Still feeling my way around this.

Edit: killer you are correct about Java

Update: I tried other methods of doing the same and found that holding packages in the Update Manager is a bit odd. After opening Update Manager I can mark packages to hold as an unprivileged user (ie no authentication required). Password is required only to perform the updates - this seems flawed. I would have expected to need a password to do anything in the Update Manager.
Locked

Return to “Chat about Linux”