Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870229 - sys-apps/portage-3.0.36 quickpkg fails building dev-libs/glib-2.72.3 pkg in gpkg format
Summary: sys-apps/portage-3.0.36 quickpkg fails building dev-libs/glib-2.72.3 pkg in g...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 871561
  Show dependency tree
 
Reported: 2022-09-15 13:41 UTC by Frank Krömmelbein
Modified: 2022-09-23 03:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Krömmelbein 2022-09-15 13:41:08 UTC
I tried the new gpkg format for bin pkgs but quickpkg "*/*" failed at 

 * Building package for dev-libs/glib-2.72.3 ...Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/quickpkg", line 427, in <module>
    retval = quickpkg_main(options, args, eout)
  File "/usr/lib/python-exec/python3.10/quickpkg", line 341, in quickpkg_main
    quickpkg_extended_atom(options, infos, atom, eout)
  File "/usr/lib/python-exec/python3.10/quickpkg", line 298, in quickpkg_extended_atom
    quickpkg_atom(options, infos, atom, eout)
  File "/usr/lib/python-exec/python3.10/quickpkg", line 198, in quickpkg_atom
    excluded_config_files = dblnk.quickpkg(
  File "/usr/lib/python3.10/site-packages/portage/dbapi/vartree.py", line 2199, in quickpkg
    gpkg_file._quickpkg(contents, metadata, settings["ROOT"], protect=protect)
  File "/usr/lib/python3.10/site-packages/portage/gpkg.py", line 1287, in _quickpkg
    *self._check_pre_quickpkg_files(contents, root_dir)
  File "/usr/lib/python3.10/site-packages/portage/gpkg.py", line 2037, in _check_pre_quickpkg_files
    file_stat = os.lstat(path)
  File "/usr/lib/python3.10/site-packages/portage/__init__.py", line 281, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
FileNotFoundError: [Errno 2] No such file or directory: b'/usr/lib/gio/modules/giomodule.cache'

I was able to build the pkg in the old tbz2 format with portage 3.0.36:

 * Building package for dev-libs/glib-2.72.3 ...                                                                                                                                                                                                                                    [ ok ]

 * Packages now in '/mnt/win_drv_d/packages':
 * dev-libs/glib-2.72.3: 4.8M

The problem probably occurs with more packages when gpkg is used.

ebuild   R    ] dev-libs/glib-2.72.3:2::gentoo  USE="dbus elf (mime) xattr -debug -fam -gtk-doc (-selinux) -static-libs -sysprof -systemtap -test -utils" ABI_X86="32 (64) (-x32)" 0 KiB

Portage 3.0.36 (python 3.10.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.3.0, glibc-2.35-r8, 5.19.8-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.19.8-gentoo-x86_64-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.35
KiB Mem:    32784568 total,  16985316 free
KiB Swap:   36863996 total,  36863996 free
Timestamp of repository gentoo: Thu, 15 Sep 2022 06:46:54 +0000
Head commit of repository gentoo: 767f727e75f606d842a089844728f8d370e96fdc

Timestamp of repository steam-overlay: Wed, 07 Sep 2022 08:26:00 +0000
Head commit of repository steam-overlay: 78208ca83614c4cc031ca8f8ec9b023a5c9c3b1e

sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.10.6_p4::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/cmake:            3.23.3::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.6-r1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

mylocal
    location: /usr/local/portage
    masters: gentoo
    priority: 0

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

Installed sets: @esteam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=sandybridge -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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"
CXXFLAGS="-march=sandybridge -O2 -pipe"
DISTDIR="/mnt/win_drv_d/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j16"
PKGDIR="/mnt/win_drv_d/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"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities alsa amd64 bluetooth bluray branding bzip2 cairo cdda cdr cec chm cli corefonts crypt cryptsetup css cups dav1d dbus declarative device-mapper djvu dmraid dri dts dvb dvd dvdr ebook elogind encode epub exif ffmpeg flac fortran fuse gdbm gif google gpg gphoto2 gpm gtk gui heif iconv icu idn ipv6 jpeg kde kwallet lcms libglvnd libnotify libtirpc lirc lm-sensors logrotate lvm lz4 lzma lzo mad mdadm mjpeg mng mobi modemmanager mp3 mp4 mpeg mtp multilib multimedia ncurses networkmanager nfs nls nptl ntfs ogg opencl openexr opengl openmp opus pam pango pcre pdf pim pipewire plasma plymouth png policykit postscript ppds pulseaudio qml qt5 rar raw readline rtmp samba scanner screencast sdl seccomp semantic-desktop sftp share smartcard speech spell spice split-usr ssl startup-notification svg taglib thumbnail thunderbolt tiff touchpad truetype udev udf udisks unicode upower usb v4l vaapi vcd vdpau vnc vorbis vpx vulkan wayland webp widgets wifi wmf wxwidgets x264 x265 xattr xcb xfs xml xpm xv xvid xvmc yubikey zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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="author braindump flow karbon kexi plan sheets stage 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 greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 efi-32 emu pc qemu" INPUT_DEVICES="evdev joystick synaptics libinput" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel vesa nouveau nvidia i965 radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

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

sys-apps/portage-3.0.36::gentoo was built with the following:
USE="(ipc) native-extensions rsync-verify xattr -apidoc -build -doc -gentoo-dev (-selinux) -test" ABI_X86="(64)" PYTHON_TARGETS="python3_10 (-pypy3) (-python3_11) -python3_8 -python3_9"
FEATURES="usersync userpriv unknown-features-warn strict distlocks ipc-sandbox binpkg-dostrip buildpkg-live sfperms network-sandbox merge-sync multilib-strict protect-owned userfetch pid-sandbox usersandbox binpkg-logs qa-unresolved-soname-deps parallel-fetch ebuild-locks fixlafiles unmerge-logs binpkg-docompress news sandbox config-protect-if-modified unmerge-orphans buildpkg assume-digests xattr preserve-libs"


Reproducible: Always
Comment 1 Sheng Yu 2022-09-15 14:04:45 UTC
That is because /usr/lib/gio/modules/giomodule.cache not exists, but recorded in the package CONTENTS.
quickpkg when using xpak use old logic that will ignore files that not exists. New gpkg will give error.

So why that file not in there but in CONTENTS. And should we just ignore missing files when do quickpkg?
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-15 15:21:56 UTC
It seems like it should be generated in pkg_preinst:

pkg_preinst() {
    [...]

    multilib_pkg_preinst() {
        # Make giomodule.cache belong to glib alone
        local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"

        if [[ -e ${EROOT}${cache} ]]; then
            cp "${EROOT}"${cache} "${ED}"${cache} || die
        else
            touch "${ED}"${cache} || die
        fi
    }

    # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
    # file due to inability to create it and GIO might not look at any of the modules there
    if ! tc-is-cross-compiler ; then
        multilib_foreach_abi multilib_pkg_preinst
    fi
}

That file definitely exists for me,

$ file /usr/lib/gio/modules/giomodule.cache
/usr/lib/gio/modules/giomodule.cache: ASCII text
$ grep giomodule.cache /var/db/pkg/dev-libs/glib-2.72.3/CONTENTS
obj /usr/lib64/gio/modules/giomodule.cache 118d963a4b0fcf7a57834e9fa6c93e45 1662915370
obj /usr/lib/gio/modules/giomodule.cache d41d8cd98f00b204e9800998ecf8427e 1662915370

So I too am confused as to how this file isn't created. Was it removed? Does it get succesfully created with a rebuild of glib?
Comment 3 Sheng Yu 2022-09-15 15:30:28 UTC
I just rebuild dev-libs/glib and only got 
/usr/lib64/gio/modules/giomodule.cache
without
/usr/lib/gio/modules/giomodule.cache

No error:

>>> Installing (1 of 1) dev-libs/glib-2.72.3::gentoo
 * abi_x86_32.x86: running multilib_pkg_preinst
 * abi_x86_64.amd64: running multilib_pkg_preinst
 * Updating GSettings schemas ...                         [ ok ]
 * Updating GSettings schemas ...                         [ ok ]
 * abi_x86_32.x86: running multilib_pkg_postinst
 * Updating GIO modules cache ...                         [ ok ]
 * abi_x86_64.amd64: running multilib_pkg_postinst
 * Updating GIO modules cache ...                         [ ok ]

 * GNU info directory index is up-to-date.
Comment 4 Larry the Git Cow gentoo-dev 2022-09-20 03:39:28 UTC
The bug has been referenced in the following commit(s):

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

commit 355b6598225e3ffa921d2fb6646539bcbcc694a7
Author:     Sheng Yu <syu.os@protonmail.com>
AuthorDate: 2022-09-15 15:52:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-20 03:39:23 +0000

    GPKG quickpkg allow missing files
    
    Bug: https://bugs.gentoo.org/870229
    Signed-off-by: Sheng Yu <syu.os@protonmail.com>
    Closes: https://github.com/gentoo/portage/pull/900
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/gpkg.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-09-23 03:30:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=041d1f125384dd935d058b555a0fcb6b260260cb

commit 041d1f125384dd935d058b555a0fcb6b260260cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-23 03:27:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-23 03:27:14 +0000

    sys-apps/portage: add 3.0.37
    
    Closes: https://bugs.gentoo.org/866197
    Closes: https://bugs.gentoo.org/869470
    Closes: https://bugs.gentoo.org/870229
    Closes: https://bugs.gentoo.org/870283
    Closes: https://bugs.gentoo.org/870310
    Closes: https://bugs.gentoo.org/871561
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.37.ebuild | 273 +++++++++++++++++++++++++++++++++
 2 files changed, 274 insertions(+)