Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693790 - sys-apps/portage: emerge --depclean only sometimes wants to remove vala
Summary: sys-apps/portage: emerge --depclean only sometimes wants to remove vala
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 155723 706142
  Show dependency tree
 
Reported: 2019-09-08 14:12 UTC by Nikos Chantziaras
Modified: 2020-04-21 07:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge -pv --depclean (doesn't unmerge) (1.txt,874.36 KB, text/plain)
2019-09-08 14:24 UTC, Nikos Chantziaras
Details
emerge -pv --depclean (wants to unmerge) (2.txt,873.82 KB, text/plain)
2019-09-08 14:25 UTC, Nikos Chantziaras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2019-09-08 14:12:40 UTC
For about a month now, portage will emerge dev-lang/vala-0.44.7 when doing 'emerge -uDN @world' only to unmerge it again when doing 'emerge --depclean'. The depclean step only sometimes wants to unmerge it though. These are two consecutive runs of 'emerge --depclean'. There are no other commands in between:

======================================

$ emerge -p --depclean

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run 
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> No packages selected for removal by depclean
>>> To see reverse dependencies, use --verbose
Packages installed:   1312
Packages in world:    157
Packages in system:   43
Required packages:    1312
Number to remove:     0

$ emerge -p --depclean

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run 
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 dev-lang/vala
    selected: 0.44.7 
   protected: none 
     omitted: 0.42.7 

All selected packages: =dev-lang/vala-0.44.7

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Packages installed:   1312
Packages in world:    157
Packages in system:   43
Required packages:    1311
Number to remove:     1

======================================

Nothing changed between these two invocations. 'emerge --depclean' is erratic on whether to unmerge this package or not.
Comment 1 Nikos Chantziaras 2019-09-08 14:13:09 UTC
$ emerge --info portage
Portage 2.3.75 (python 3.6.9-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r5, 4.19.71-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.71-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.6
KiB Mem:    16392384 total,  12049848 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sun, 08 Sep 2019 13:26:02 +0000
Head commit of repository gentoo: 2519a79436037eca5198f5a5337110a80182969b

Head commit of repository flatpak-overlay: 4b1f8e2f46cdb9217c8f77384ca9d23930ecfd8e

sh bash 5.0_p11
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p11::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/cmake:           3.15.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r5::gentoo
Repositories:

gentoo
    location: /mnt/Data/gentoo/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

abendbrot
    location: /var/lib/layman/abendbrot
    masters: gentoo
    priority: 50

flatpak-overlay
    location: /usr/local/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

interactive-fiction
    location: /var/lib/layman/interactive-fiction
    masters: gentoo
    priority: 50

seden
    location: /var/lib/layman/seden
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

vapoursynth
    location: /var/lib/layman/vapoursynth
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 9999999

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
DISTDIR="/mnt/Data/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--backtrack=200"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo http://gentoo.mirrors.ovh.net/gentoo-distfiles http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j4"
PKGDIR="/mnt/Data/gentoo/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac accessibility acl acpi activities amd64 berkdb bzip2 cairo cli crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc linguas_en linguas_en_US lto mad mng mp3 mp4 mpeg multilib ncurses nptl nvidia offensive ogg opengl openmp pam pango pcre pdf pgo phonon plasma png policykit ppds pulseaudio qml qt5 readline seccomp spell split-usr ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis vulkan wayland widgets wxwidgets xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.3.75-r1::gentoo was built with the following:
USE="(ipc) native-extensions rsync-verify xattr -build -doc -epydoc -gentoo-dev (-selinux)" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -pypy -python3_5 -python3_7"
Comment 2 Nikos Chantziaras 2019-09-08 14:24:31 UTC
Created attachment 589446 [details]
emerge -pv --depclean (doesn't unmerge)

This is the verbose log of 'emerge -pv --depclean' when it comes up empty and doesn't want to remove vala.
Comment 3 Nikos Chantziaras 2019-09-08 14:25:26 UTC
Created attachment 589448 [details]
emerge -pv --depclean (wants to unmerge)

And this is the verbose log of when it does want to unmerge vala.
Comment 4 Zac Medico gentoo-dev 2019-09-08 21:56:54 UTC
The dev-lang/vala-0.44.7 instance is optional, pulled in by dependencies like this from vala.eclass $(vala_depend):

> || ( dev-lang/vala:0.46[vapigen(+)] dev-lang/vala:0.44[vapigen(+)] dev-lang/vala:0.42[vapigen(+)] dev-lang/vala:0.40[vapigen(+)] dev-lang/vala:0.36[vapigen(+)] )

Meanwhile the dev-lang/vala-0.42.7 instance is required by gnome-base/dconf-editor-3.30.2 since it constrains $(vala_depend) like this:

> VALA_MIN_API_VERSION="0.40"
> VALA_MAX_API_VERSION="0.42"
> || ( dev-lang/vala:0.42 dev-lang/vala:0.40 )
Comment 5 Zac Medico gentoo-dev 2020-01-19 07:30:18 UTC
The changes for bug 701996 may have influenced the behavior for vala dependencies, given reports like bug 702806 and bug 705700.
Comment 6 Zac Medico gentoo-dev 2020-02-01 07:23:18 UTC
This should be fixed by the patch for bug 707108.
Comment 7 Larry the Git Cow gentoo-dev 2020-02-01 21:09:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d77d933b4a9cb2b830e661806a2a8689ffbac0ef

commit d77d933b4a9cb2b830e661806a2a8689ffbac0ef
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-02-01 04:53:45 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-02-01 20:54:11 +0000

    depclean: do not eliminate upgrades (bug 707108)
    
    For depclean actions, prefer choices where all packages have been
    pulled into the graph, except for choices that eliminate upgrades.
    This solves the test case for bug 707108, where depclean eliminated
    a new slot of python that had been pulled in by a world update.
    This should also prevent non-deterministic elimination of the
    latest vala slot that was reported in bug 693790.
    
    NOTE: There's a common perception (expressed in bug 705700) that
    emerge is pulling in an "unecessary" python slot in cases when that
    python slot is not enabled in PYTHON_TARGETS. However, the so-called
    "unnecessary" slot is practically indistinguishable from a desirable
    upgrade such as the missed llvm slot upgrade that was reported in
    bug 706278. Therefore, be advised that emerge must pull in the
    highest visible slot (regardless of PYTHON_TARGETS) in order to
    ensure that a desirable upgrade is not missed.
    
    Fixes: f7d83d75c6b0 ("dep_zapdeps: adjust || preference for slot upgrades (bug 706278)")
    Bug: https://bugs.gentoo.org/707108
    Bug: https://bugs.gentoo.org/706278
    Bug: https://bugs.gentoo.org/705700
    Bug: https://bugs.gentoo.org/693790
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dep/dep_check.py                  | 23 +++++++++++++----------
 lib/portage/tests/resolver/test_or_choices.py |  4 ++--
 2 files changed, 15 insertions(+), 12 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2020-02-01 22:13:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f78a86ac5ba0150aa679c7feaf64a5ad67316ef

commit 4f78a86ac5ba0150aa679c7feaf64a5ad67316ef
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-02-01 22:03:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-02-01 22:13:24 +0000

    sys-apps/portage: Bump to version 2.3.87
    
     #691798 emerge: treat GLEP 81 acct-* categories like virtual
     #693790 depclean sometimes wants to remove latest vala slot
     #707108 depclean: do not eliminate upgrades
    
    Bug: https://bugs.gentoo.org/706142
    Bug: https://bugs.gentoo.org/693790
    Closes: https://bugs.gentoo.org/707108
    Package-Manager: Portage-2.3.87, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.87.ebuild | 260 +++++++++++++++++++++++++++++++++
 2 files changed, 261 insertions(+)