On Fri, Jun 19, 2015 at 04:39:26AM +1000, [email protected] wrote:
> and _____BEFORE______ doing any dist-upgrade I ALWAYS check what will
> happen using dselect as unlike aptitude it will display every change
> that will be done.

that's what 'apt-get -d -u dist-upgrade' is for.  it not only limits apt-get
to just downloading (and not installing/upgrading/removing packages) it
lists every package that is going to be changed.  if you want more details
then use '-V' as well as '-d -u'


> IMPORTANT point here apt and dselect use different package lists both
> these need to be updated separately to keep the system in sync.

please stop saying this because it's not true.  

apt-get, aptitude, dselect, dpkg and even the GUI versions of same *ALL* use
/var/lib/dpkg/status and /var/lib/dpkg/available.

this is because they are all wrappers around dpkg - they may have
different methods for *deciding* what to do, but they ALL use dpkg to do
the work. so they all have to use the same package lists as dpkg.

what differs is how they use the information in those files and what
decisions are made (e.g. is Recommends: treated as a Depends: or not -
this is an option with apt-get, Recommends=Depends by default but is
easily changed by putting 'APT { Install-Recommends "False";};' in an
apt.conf file) )


> Russell Coker said,
>
> >I've had ongoing problems with aptitude insisting on removing things
> >I want.
>
> I have checked this out and apt appears not te be aware of some
> packages. as previously stated in one of my cases "blender", apt
> wanted to remove it due to two missing dependencies, both packages
> were installed and dselect was aware of them apt was not.

if this actually happened as you remember it, then it was most likely due to
versioned dependencies.  a dependency can be declared not just on a package
name, but on a specific version of a package or a range of versions...so if
blender depends on a specific version of a library but some other package
depends on a different version (which is available and to be installed) then
that can trigger removal of blender.

dependency resolution can be complicated, especially with tens of
thousands of packages and their dependencies to resolve. small
differences in the algorithms used by the resolving program (e.g.
apt-get vs aptitude) can result in huge differences in outcome.  you can
see this yourself with aptitude which will sequentially offer several different
resolutions, just keep saying No to what it proposes.


> From my experience the more dist-upgrades are done the more debians package
> system gets itself into a twist. 

nonsense.

the more you try to second-guess apt (etc) and try to force override
it, the more problems you have...especially if you don't bother to
understand how dpkg/apt/etc work and believe rubbish like 'apt and
dselect use different package lists'

timing is also crucial, especially if you track sid or testing - a
dist-upgrade today may want to remove hundreds of packages because of
one missing dependency, but tomorrow will work fine because that one
dependency is no longer missing.

so, if dist-upgrade wants to remove packages that you don't want to
remove, you have a few options, including:

1. wait a day or so until your mirror is updated, the "problem" may have
resolved itself.

2. mark the package as held so it wont be removed (or upgraded)
automatically - you can do this in dselect, using the 'dpkg-hold'
command in my dlocate package, or 'aptitude hold'

3. run 'apt-get upgrade' instead of 'dist-upgrade'. the difference is
that upgrade installs new and upgraded packages but will never remove
a package - so if blender depends on libfoo <= 1.0 and libfoo 1.5 is
available, 'dist-upgrade' might remove blender and install the new
libfoo but 'upgrade' never will.

eventually, though, you will need to run a dist-upgrade, otherwise
you'll be stuck with old versions of stuff that can't be installed
because it requires removing old versions of other packages.

see for example, the difference between 'dist-upgrade' and 'upgrade' on
one of my machines just now:


# apt-get -d -u dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and 
are no longer required:
  atomicparsley flvstreamer id3v2 imagemagick-common libbs2b0 libcdio-cdda1 
libcdio-paranoia1 libdirac-decoder0 libdirac-encoder0 libid3-3.8.3c2a 
liblavfile-2.1-0 liblavjpeg-2.1-0
  liblavplay-2.1-0 liblqr-1-0 libmagickcore-6.q16-2 libmagickwand-6.q16-2 
libmjpegutils-2.1-0 libmp3-info-perl libmpeg2encpp-2.1-0 libmpg123-0 
libmplex2-2.1-0 libplist2 libqt4-declarative
  libqt4-designer libqt4-help libqt4-scripttools libqt4-svg libqt4-test 
libqtassistantclient4 libquicktime2 libquvi-scripts libvorbisidec1 
linux-headers-4.0.0-1-amd64
  linux-headers-4.0.0-1-common mjpegtools mythlogserver python-bs4 
python-html5lib python-lxml python-mysqldb python-mythtv python-qt4 python-sip 
transcode-doc twolame
Use 'apt-get autoremove' to remove them.
Done
The following packages will be REMOVED:
  curl get-iplayer gimp gnupg2 libavformat56 libcmis-0.5-5 libcurl3-gnutls 
libgegl-0.2-0 libgpgme11 libhogweed2 libnettle4 libquvi7 libraptor2-0 
librasqal3 librdf0 libreoffice
  libreoffice-avmedia-backend-gstreamer libreoffice-base libreoffice-base-core 
libreoffice-base-drivers libreoffice-calc libreoffice-core libreoffice-draw 
libreoffice-gtk
  libreoffice-help-en-us libreoffice-impress libreoffice-math 
libreoffice-report-builder-bin libreoffice-sdbc-hsqldb libreoffice-writer 
librtmp1 mplayer2 mutt mythes-en-us mythmusic
  mythtv-frontend python-cupshelpers python-pycurl python3-uno qarte rtmpdump 
smplayer smplayer-l10n smplayer-themes steam-launcher system-config-printer 
system-config-printer-udev transcode
  vlc vlc-nox vlc-plugin-notify
The following NEW packages will be installed:
  flvstreamer libmpg123-0 libsnappy1 linux-headers-4.0.0-2-amd64 
linux-headers-4.0.0-2-common
The following packages will be upgraded:
  chromium dnsmasq-base evince-common evince-gtk gcc-4.8-base gcc-5-base 
gcc-5-base:i386 geoip-database libatomic1 libboost-iostreams1.54.0 libcilkrts5 
libdebconfclient0 libegl1-mesa
  libevdocument3-4 libevview3-3 libgbm1 libgcc1 libgcc1:i386 libgfortran3 
libgl1-mesa-dri libgl1-mesa-dri:i386 libgl1-mesa-glx libgl1-mesa-glx:i386 
libglapi-mesa libglapi-mesa:i386
  libgnutls-deb0-28 libgnutls-openssl27 libgomp1 libitm1 liblsan0 
libpam-systemd libquadmath0 libseccomp2 libselinux1 libsemanage1 libstdc++6 
libstdc++6:i386 libsystemd0 libtsan0 libubsan0
  libudev1 libudev1:i386 libustr-1.0-1 libwayland-egl1-mesa libwww-perl 
libxatracker2 linux-compiler-gcc-4.9-x86 linux-headers-amd64 linux-libc-dev 
mesa-vdpau-drivers notification-daemon
  python-apt python-apt-common python-selinux python3-apt screen systemd 
systemd-sysv tzdata tzdata-java udev xfsprogs
62 upgraded, 5 newly installed, 51 to remove and 0 not upgraded.
Need to get 0 B/72.9 MB of archives.
After this operation, 167 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.



# apt-get -d -u upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is 
no longer required:
  libplist2
Use 'apt-get autoremove' to remove it.
Done
The following packages have been kept back:
  chromium libgnutls-deb0-28 libgnutls-openssl27 linux-headers-amd64
The following packages will be upgraded:
  curl dnsmasq-base evince-common evince-gtk gcc-4.8-base gcc-5-base 
gcc-5-base:i386 geoip-database libatomic1 libboost-iostreams1.54.0 libcilkrts5 
libcurl3-gnutls libdebconfclient0
  libegl1-mesa libevdocument3-4 libevview3-3 libgbm1 libgcc1 libgcc1:i386 
libgfortran3 libgl1-mesa-dri libgl1-mesa-dri:i386 libgl1-mesa-glx 
libgl1-mesa-glx:i386 libglapi-mesa
  libglapi-mesa:i386 libgomp1 libgpgme11 libitm1 liblsan0 libpam-systemd 
libquadmath0 libseccomp2 libselinux1 libsemanage1 libstdc++6 libstdc++6:i386 
libsystemd0 libtsan0 libubsan0 libudev1
  libudev1:i386 libustr-1.0-1 libwayland-egl1-mesa libwww-perl libxatracker2 
linux-compiler-gcc-4.9-x86 linux-libc-dev mesa-vdpau-drivers 
notification-daemon python-apt python-apt-common
  python-selinux python3-apt screen systemd systemd-sysv tzdata tzdata-java 
udev xfsprogs
61 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 594 kB/28.9 MB of archives.
After this operation, 168 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

if i had to guess, i'd say that the new version of chromium probably
depends on a new version of some library - which all the other packages
that depend upon it haven't been compiled against yet. in a day or so
they'll be recompiled for the new lib version and everything will be
fine - as long as i don't fuck things up by panicing and/or trying to
second-guess apt or dpkg.

i don't particularly want all those packages removed so i'll run
'apt-get upgrade' rather than dist-upgrade or, more likely, just wait
until at least tomorrow - whatever missing package is triggering the
removals will probably have turned up in my debian mirror by then.



my systems usually run sid and I use all three of the above methods
(as well as 'manually' installing individual packages with apt-get
as required).  I've run hundreds, if not thousands, of 'apt-get
dist-upgrades' over the years, without my systems 'get[ting] itself into
a twist.'

that's because running 'apt-get dist-upgrade' (and upgrade) is USING THE
SYSTEM AS IT IS DESIGNED TO BE USED. it's normal operation and if it
didn't work, that would be a bug - a serious one that would get fixed.






> I will do this this time once I am sure all packages needed are in my
> local mirror. A remaining problem here is that apt and dpkg/dselect
> usually have a different idea on what one has on the system, dselect
> always showing more packages are installed. Note: I THINK this is
> because dselect will track old packages still installed apt appears
> not to be able to do that.

again, this is nonsense. apt and dpkg and dselect use exactly the same
package lists (dpkg's lists in /var/lib/dpkg).

craig

-- 
craig sanders <[email protected]>
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to