Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866135 - sys-apps/portage: empty $CATEGORY/$PN directories being created in the current directory
Summary: sys-apps/portage: empty $CATEGORY/$PN directories being created in the curren...
Status: RESOLVED DUPLICATE of bug 864160
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-23 11:32 UTC by Albert W. Hopkins
Modified: 2022-08-23 15:32 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 Albert W. Hopkins 2022-08-23 11:32:45 UTC
There has been an ongoing issue (a few months now) that I thought had to do with "emerge --sync"/rsync but seems not to be.  I'll get up one day and discover, e.g. "dev-util", "sys-apps", etc directories in my home directory, owned by root. Normally I don't have time to investigate so I "sudo rm -rf" those directories.  I figure it's some weird bug in portage or something strange about my config.

This morning I had a terminal window open and happend to have a nautilus window in my home directory at the same time.  I needed to pull in a package so I did this:

```
$ sudo emerge -1va media-libs/gst-rtsp-server
Password: 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[binary  N     ] dev-util/ninja-1.11.0-7::gentoo  USE="-doc -emacs -test -vim-syntax" 0 KiB
[binary  N     ] sys-devel/autoconf-wrapper-20220130-7::gentoo  0 KiB
[binary  N     ] sys-devel/automake-wrapper-11-r1-4::gentoo  0 KiB
[binary  N     ] sys-devel/autoconf-2.71-r1-7:2.71::gentoo  USE="-emacs" 0 KiB
[binary  N     ] dev-util/meson-0.63.1-2::gentoo  USE="(-test)" PYTHON_TARGETS="python3_10 python3_11 -python3_8 -python3_9" 0 KiB
[binary  N     ] dev-util/meson-format-array-0-9::gentoo  PYTHON_TARGETS="python3_10 python3_11 -python3_8 -python3_9" 0 KiB
[binary  N     ] virtual/perl-JSON-PP-4.70.0-1::gentoo  9 KiB
[binary  N     ] dev-util/glib-utils-2.72.3-1::gentoo  PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9 -python3_11" 0 KiB
[binary  N     ] app-portage/elt-patches-20211104-6::gentoo  0 KiB
[binary  N     ] sys-devel/automake-1.16.5-6:1.16::gentoo  USE="-test" 0 KiB
[binary  N     ] sys-devel/libtool-2.4.7-7:2::gentoo  USE="-vanilla" 0 KiB
[ebuild  N     ] net-libs/libsrtp-2.3.0-r1:2/1::gentoo  USE="-debug -doc -nss -openssl -static-libs -test" 619 KiB
[ebuild  N     ] media-plugins/gst-plugins-srtp-1.20.2:1.0::gentoo  USE="-test" 0 KiB
[ebuild  N     ] media-libs/gst-rtsp-server-1.20.2:1.0::gentoo  USE="introspection nls -examples -static-libs -test" 352 KiB

Total: 14 packages (14 new, 11 binaries), Size of downloads: 980 KiB

Would you like to merge these packages? [Yes/No]
```

Just as soon as I pressed enter a "virtual" directory shows up in my home directory. Inside of "virtual" there is a "perl-JSON-PP" directory.  That directory is empty. And from my occasional browsing that's always been the case: {CAT}/{PN} is an empty directory.

The weird thing is it does not create directories for every package on the list of packages to install.  Only some of them. I can't seem to figure out the pattern.  In the above case it only create "virtual/perl-JSON-PP".

I use a local binhost and local portage "mirror".  On another machine, I typically run "emerge" from the root directory so these directories usually appear in the root directory.  So it seems to always be whatever my current directory is.

```
$ emerge --info
Portage 3.0.35 (python 3.11.0-candidate-1, default/linux/amd64/17.1/no-multilib, gcc-12.2.0, glibc-2.35-r8, 5.19.3 x86_64)
=================================================================
System uname: Linux-5.19.3-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-1260P-with-glibc2.35
KiB Mem:    15999644 total,   8464120 free
KiB Swap:   23488508 total,  23488508 free
Timestamp of repository gentoo: Tue, 23 Aug 2022 09:04:46 +0000
Timestamp of repository marduk: Fri, 19 Aug 2022 11:52:08 +0000
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-lang/perl:             5.36.0::gentoo
dev-lang/python:           3.10.6_p2::gentoo, 3.11.0_rc1::gentoo
dev-util/meson:            0.63.1::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.4::gentoo
sys-devel/autoconf:        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/gcc:             12.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.19::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://gbp/repos/lighthouse/gentoo
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: False
    sync-rsync-verify-jobs: 1

marduk
    location: /var/db/repos/marduk
    sync-type: rsync
    sync-uri: rsync://gbp/repos/lighthouse/marduk
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: False

Binary Repositories:

binhost
    priority: 10
    sync-uri: https://gbp/binpkgs/lighthouse

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="     -O3     -march=native     -mtune=alderlake     -pipe "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="     -O3     -march=native     -mtune=alderlake     -pipe "
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="     --autounmask=n     --binpkg-changed-deps     --binpkg-respect-use     --buildpkg     --changed-deps=y     --color=y     --getbinpkg     --jobs=4     --keep-going     --oneshot     --quiet-build     --quiet-unmerge-warn     --rebuilt-binaries=y     --verbose-conflicts     --with-bdeps=n "
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 binpkg-multi-instance buildpkg buildpkg-live cgroup config-protect-if-modified distlocks fixlafiles ipc-sandbox mount-sandbox multilib-strict network-sandbox news noinfo notitles parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms skiprocheck strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/doc"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="     --jobs=5     --load-average=5.64 "
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS=""
PORTAGE_COMPRESS_FLAGS=""
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="acl aes amd64 asm avx avx2 f16c fma3 glamor introspection ipv6 jpeg2k libglvnd mmx mmxext nls nptl opentype pam pclmul popcnt rdrand seccomp sha split-usr sse sse2 sse3 sse4_1 sse4_2 ssse3 systemd udev unicode urandom utf8 vaapi vulkan wayland xattr zstd" ABI_X86="64" APACHE2_MODULES="auth_digest authn_core authn_file authz authz_core authz_groupfile authz_host authz_user dav dav_fs dir group_file mime socache_shmcb unixd" APACHE2_MPMS="prefork" CAMERAS="*" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" FFTOOLS="*" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore" LUA_SINGLE_TARGET="lua5-4" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_11" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="intel i965 iris"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
```

Let me know what else I can do to debug.
Comment 1 Albert W. Hopkins 2022-08-23 11:34:53 UTC
Actually if you look at the above output, perl-JSON-PP appears to be the only package from the list that is both a binary package *and* needs to be pulled from the binhost. So perhaps that's *part* of the pattern. But that can't be the only pattern as it would happen more frequently than it does.
Comment 2 Andreas Sturmlechner gentoo-dev 2022-08-23 12:19:00 UTC
I've seen the same recently in some /etc/portage/package.* directory, very puzzling.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-08-23 15:32:58 UTC

*** This bug has been marked as a duplicate of bug 864160 ***