Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #228207 > unrolled thread
| Started by | Ram Ramesh <rramesh2400@gmail.com> |
|---|---|
| First post | 2020-10-25 18:40 +0100 |
| Last post | 2020-10-27 22:10 +0100 |
| Articles | 7 — 5 participants |
Back to article view | Back to linux.debian.user
aptitude safe-upgrade vs apt-get upgrade. Ram Ramesh <rramesh2400@gmail.com> - 2020-10-25 18:40 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. Joe <joe@jretrading.com> - 2020-10-25 22:10 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-10-26 15:20 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. John Hasler <jhasler@newsguy.com> - 2020-10-26 16:00 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-10-27 14:10 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. David Wright <deblis@lionunicorn.co.uk> - 2020-10-27 19:10 +0100
Re: aptitude safe-upgrade vs apt-get upgrade. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-10-27 22:10 +0100
| From | Ram Ramesh <rramesh2400@gmail.com> |
|---|---|
| Date | 2020-10-25 18:40 +0100 |
| Subject | aptitude safe-upgrade vs apt-get upgrade. |
| Message-ID | <B3S9Q-3R8-1@gated-at.bofh.it> |
Hi,
I am trying to upgrade the current setup and I am unable to
understand the differences between aptitude vs. apt-get usage.
When I do apt-get -s upgrade, I get
> myth2 [rramesh] 100 > sudo apt-get -s upgrade
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Calculating upgrade... Done
> The following packages have been kept back:
> gstreamer1.0-gl gstreamer1.0-plugins-bad gstreamer1.0-plugins-base
> gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libasound2-plugins
> libavcodec58 libavformat58 libavresample4 libavutil56 libchromaprint1
> libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
> libgstreamer-plugins-base1.0-0 libswresample3 libswscale5
> linux-image-amd64
> mythtv-frontend
> 0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Clearly nothing is going to be done. However aptitude -s safe-upgrade
shows that it will install these.
> myth2 [rramesh] 101 > sudo aptitude -s safe-upgrade
> Resolving dependencies...
> The following NEW packages will be installed:
> libcdio19{a} libfaac0{a} libfdk-aac2{a} libilbc2{a} libkvazaar4{a}
> liblrdf0{a} libmfx1{a} libopenh264-5{a} libx264-157{a} libx265-176{a}
> linux-image-4.19.0-12-amd64{a}
> The following packages will be REMOVED:
> libcdio18{u} libcrystalhd3{u} libssh-gcrypt-4{u} libvpx5{u}
> libx264-155{u} libx265-165{u}
> The following packages will be upgraded:
> gstreamer1.0-gl gstreamer1.0-plugins-bad gstreamer1.0-plugins-base
> gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libasound2-plugins
> libavcodec58 libavformat58 libavresample4 libavutil56 libchromaprint1
> libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
> libgstreamer-plugins-base1.0-0 libswresample3 libswscale5
> linux-image-amd64
> 17 packages upgraded, 11 newly installed, 6 to remove and 1 not upgraded.
> Need to get 72.9 MB of archives. After unpacking 270 MB will be used.
>
> Note: Using 'Simulate' mode.
> Do you want to continue? [Y/n/?]
> Would download/install/remove packages.
This makes me wonder if it is better to use aptitude over apt-get. Why
these differences? What is the correct way to maintain a working system
and still keep the system up to date.
Regards
Ramesh
[toc] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2020-10-25 22:10 +0100 |
| Message-ID | <B3Vr3-5XZ-3@gated-at.bofh.it> |
| In reply to | #228207 |
On Sun, 25 Oct 2020 12:12:19 -0500
Ram Ramesh <rramesh2400@gmail.com> wrote:
> Hi,
>
> I am trying to upgrade the current setup and I am unable to
> understand the differences between aptitude vs. apt-get usage.
> When I do apt-get -s upgrade, I get
> > myth2 [rramesh] 100 > sudo apt-get -s upgrade
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > Calculating upgrade... Done
> > The following packages have been kept back:
> > gstreamer1.0-gl gstreamer1.0-plugins-bad gstreamer1.0-plugins-base
> > gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
> > libasound2-plugins libavcodec58 libavformat58 libavresample4
> > libavutil56 libchromaprint1 libgstreamer-gl1.0-0
> > libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
> > libswresample3 libswscale5 linux-image-amd64
> > mythtv-frontend
> > 0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
> Clearly nothing is going to be done. However aptitude -s
> safe-upgrade shows that it will install these.
> > myth2 [rramesh] 101 > sudo aptitude -s safe-upgrade
> > Resolving dependencies...
> > The following NEW packages will be installed:
> > libcdio19{a} libfaac0{a} libfdk-aac2{a} libilbc2{a} libkvazaar4{a}
> > liblrdf0{a} libmfx1{a} libopenh264-5{a} libx264-157{a}
> > libx265-176{a} linux-image-4.19.0-12-amd64{a}
> > The following packages will be REMOVED:
> > libcdio18{u} libcrystalhd3{u} libssh-gcrypt-4{u} libvpx5{u}
> > libx264-155{u} libx265-165{u}
> > The following packages will be upgraded:
> > gstreamer1.0-gl gstreamer1.0-plugins-bad gstreamer1.0-plugins-base
> > gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
> > libasound2-plugins libavcodec58 libavformat58 libavresample4
> > libavutil56 libchromaprint1 libgstreamer-gl1.0-0
> > libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
> > libswresample3 libswscale5 linux-image-amd64
> > 17 packages upgraded, 11 newly installed, 6 to remove and 1 not
> > upgraded. Need to get 72.9 MB of archives. After unpacking 270 MB
> > will be used.
> >
> > Note: Using 'Simulate' mode.
> > Do you want to continue? [Y/n/?]
> > Would download/install/remove packages.
> This makes me wonder if it is better to use aptitude over apt-get.
> Why these differences? What is the correct way to maintain a working
> system and still keep the system up to date.
To begin with, which distribution is it? In general, with Stable, it
pretty much doesn't matter which tool is used. The kind of problems you
have indicate Unstable or Testing.
First, apt is pretty much apt-get, with different syntax and a few
extra features. Aptitude can generally do a better job of resolving
'difficult' dependencies, but if used with a great many packages (>100)
is likely to be very slow. With more than about 500 packages to deal
with, it may grind to a halt. Don't use it on an Unstable which hasn't
been upgraded for six months. Don't use it for a version upgrade of
Stable, unless the release notes for the upgrade explicitly recommend
it.
Synaptic, the GUI tool, is a front end to apt-get. All the apt tools
are a front end to dpkg, which does all the work but does no dependency
checking and is therefore not safe to be used directly.
All of the tools have a 'safe' mode which is guaranteed not to remove
packages. However, many upgrades do require the removal of some
packages, so the safe mode will only get you so far in these cases.
If you are using Stable, there should never be any real problem in
upgrading. With Testing or Unstable, problems do occur, and you need to
be willing to understand and solve them. Generally, if you keep the
system up to date regularly, aptitude will usually do a good job.
With Unstable or Testing, it is often the case that new versions of a
few packages from a large related set become available before the rest.
The new packages will be mostly incompatible with the existing set, so
upgrading them will cause the removal of some of the rest of the set,
along with other applications which depend on them. If you see that
half your applications are about to be removed, say 'no'. If you do
this with apt-get or apt in safe mode, then packages will be 'held
back'. Aptitude full-upgrade will usually give you a number of options,
with decreasing numbers of removals proposed. If you keep declining
options, it will eventually get to 'keep everything as it is', but you
may find one of the options worth doing.
Generally time will sort this problem out, as the rest of the set is
released. It is usually possible to upgrade some packages which do not
include the problem ones. This can be done with any of the tools, but
on a graphical system I prefer Synaptic. Other methods may involve a lot
of typing.
--
Joe
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2020-10-26 15:20 +0100 |
| Message-ID | <B4bvQ-7iT-13@gated-at.bofh.it> |
| In reply to | #228218 |
[Multipart message — attachments visible in raw view] — view raw
On Du, 25 oct 20, 21:00:03, Joe wrote: > > Synaptic, the GUI tool, is a front end to apt-get. All the apt tools > are a front end to dpkg, which does all the work but does no dependency > checking and is therefore not safe to be used directly. dpkg does its own dependency checking, in addition to APT (the software, not the command), and will prevent any inconsistencies unless you use one of the --force switches. In my opinion this is pretty safe ;) APT, aptitude and others are more than just front ends to dpkg as they are also the ones working with your configured repositories. > All of the tools have a 'safe' mode which is guaranteed not to remove > packages. However, many upgrades do require the removal of some > packages, so the safe mode will only get you so far in these cases. > > If you are using Stable, there should never be any real problem in > upgrading. 'apt-get upgrade' is insufficient even on a stable system, e.g. due to the kernel package changing names, it's better to just use 'apt upgrade' (or 'aptitude safe-upgrade') instead. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | John Hasler <jhasler@newsguy.com> |
|---|---|
| Date | 2020-10-26 16:00 +0100 |
| Message-ID | <B4c8x-7wg-1@gated-at.bofh.it> |
| In reply to | #228243 |
Andrei writes: > dpkg does its own dependency checking, in addition to APT (the > software, not the command), and will prevent any inconsistencies > unless you use one of the --force switches. What it does not do is resolve dependencies. Apt recursively resolves dependencies, installing them as required. It also detects conflicts and offers to resolve them as well as breaking loops. Dpkg is safe but can be rather frustrating. -- John Hasler jhasler@newsguy.com Elmwood, WI USA
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2020-10-27 14:10 +0100 |
| Message-ID | <B4wTD-3xq-1@gated-at.bofh.it> |
| In reply to | #228248 |
[Multipart message — attachments visible in raw view] — view raw
On Lu, 26 oct 20, 09:55:00, John Hasler wrote: > Andrei writes: > > dpkg does its own dependency checking, in addition to APT (the > > software, not the command), and will prevent any inconsistencies > > unless you use one of the --force switches. > > What it does not do is resolve dependencies. Apt recursively resolves > dependencies, installing them as required. It also detects conflicts > and offers to resolve them as well as breaking loops. dpkg can only work with the set of .deb files that were passed on the command line. If all dependencies are included (or already installed), fine, otherwise it will bail out as it doesn't (by design) have the capability to search for them in repositories and download them (if this is what you mean by resolving). I believe someone demonstrated quite recently on list that dpkg has some limits in the number and/or combination of packages it can deal with at once, so APT might have to pass them in smaller chunks and/or specific order (in case of Pre-Depends: maybe?). > Dpkg is safe but can be rather frustrating. As far as I'm concerned it does just fine what it was designed to do. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2020-10-27 19:10 +0100 |
| Message-ID | <B4BzX-6qH-1@gated-at.bofh.it> |
| In reply to | #228290 |
On Tue 27 Oct 2020 at 15:05:36 (+0200), Andrei POPESCU wrote: > On Lu, 26 oct 20, 09:55:00, John Hasler wrote: > > Andrei writes: > > > dpkg does its own dependency checking, in addition to APT (the > > > software, not the command), and will prevent any inconsistencies > > > unless you use one of the --force switches. > > > > What it does not do is resolve dependencies. Apt recursively resolves > > dependencies, installing them as required. It also detects conflicts > > and offers to resolve them as well as breaking loops. > > dpkg can only work with the set of .deb files that were passed on the > command line. > > If all dependencies are included (or already installed), fine, otherwise > it will bail out as it doesn't (by design) have the capability to search > for them in repositories and download them (if this is what you mean by > resolving). > > I believe someone demonstrated quite recently on list that dpkg has some > limits in the number and/or combination of packages it can deal with at > once, so APT might have to pass them in smaller chunks and/or specific > order (in case of Pre-Depends: maybe?). > > > Dpkg is safe but can be rather frustrating. > > As far as I'm concerned it does just fine what it was designed to do. Years ago, I used to do mega installs with dpkg, copying the contents of /var/cache/apt/archives/ from one machine onto a caddy, and then installing them all on another. I'm probably the person who recently demonstrated dpkg's (in)ability to cleanly install 1558 packages simultaneously without help: https://lists.debian.org/debian-user/2020/07/msg00032.html (its References are all dead links because they fall in the previous month.) This followed a demonstration of apt-get's reversibility: specifying 271 "top-level" packages that resulted in 1558 being installed altogether, and all 1558 being cleanly purged again. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2020-10-27 22:10 +0100 |
| Message-ID | <B4Eo9-87f-1@gated-at.bofh.it> |
| In reply to | #228312 |
[Multipart message — attachments visible in raw view] — view raw
On Ma, 27 oct 20, 13:03:32, David Wright wrote: > On Tue 27 Oct 2020 at 15:05:36 (+0200), Andrei POPESCU wrote: > > On Lu, 26 oct 20, 09:55:00, John Hasler wrote: > > > > I believe someone demonstrated quite recently on list that dpkg has some > > limits in the number and/or combination of packages it can deal with at > > once, so APT might have to pass them in smaller chunks and/or specific > > order (in case of Pre-Depends: maybe?). > > > > > Dpkg is safe but can be rather frustrating. > > > > As far as I'm concerned it does just fine what it was designed to do. > > Years ago, I used to do mega installs with dpkg, copying the contents > of /var/cache/apt/archives/ from one machine onto a caddy, and then > installing them all on another. > > I'm probably the person who recently demonstrated dpkg's (in)ability > to cleanly install 1558 packages simultaneously without help: > > https://lists.debian.org/debian-user/2020/07/msg00032.html > (its References are all dead links because they fall in the previous month.) Indeed, this is the experiment I was thinking of. > This followed a demonstration of apt-get's reversibility: > specifying 271 "top-level" packages that resulted in 1558 being > installed altogether, and all 1558 being cleanly purged again. Somehow I'm still under the impression that this is supposed to work with dpkg only. You might want to post your findings to debian-dpkg for further investigation. Kind regard, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web