View previous topic :: View next topic |
Author |
Message |
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sat May 20, 2017 2:23 pm Post subject: [solved] q* utilites stopped working |
|
|
Hey!
In the nearly 15 years I've been using Gentoo, I haven't run into this one yet...
(at least) qsearch and qlist don't return anything anymore. No errors. They exit 0.
Code: |
me@aragorn ~ $ qsearch plasma ; echo $?
0
me@aragorn ~ $ quse -D X ; echo $?
0
|
Obviously those are very very common search terms that ought to return something. equery works
Code: |
me@aragorn ~ $ equery l -p portage
* Searching for portage ...
[-P-] [ ] sys-apps/portage-2.2.28:0
[-P-] [ ] sys-apps/portage-2.3.0:0
[-P-] [ ] sys-apps/portage-2.3.3:0
[-P-] [ ~] sys-apps/portage-2.3.4:0
[IP-] [ ] sys-apps/portage-2.3.5:0
[-P-] [ ~] sys-apps/portage-2.3.6:0
[-P-] [ -] sys-apps/portage-9999:0
|
So it doesn't seem to be a local portage tree issue, or a cache issue. However, some q* utilities do work. For instance:
Code: |
me@aragorn ~ $ qlop -l portage-utils | tail -n3
Mon Apr 11 08:44:18 2016 >>> app-portage/portage-utils-0.62
Thu May 11 13:21:55 2017 >>> app-portage/portage-utils-0.62
Sat May 20 10:18:27 2017 >>> app-portage/portage-utils-0.62
|
(so, yes, I did just try to re-emerge to see if that fixed qsearch and quse)
Again, as I've never run into this, I'm not exactly sure where to start digging. Especially since there's no output and they exit zero indicating "no problem".
EDIT:
I just realized that qsearch isn't 100% broke.
Code: |
me@aragorn ~ $ qsearch -a | wc -l
251
|
But..... I'm thinking that there's more than 251 packages in the entire portage tree...
Thank you!
M. _________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie
Last edited by Xanadu on Sun May 21, 2017 5:50 pm; edited 1 time in total |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Sat May 20, 2017 3:03 pm Post subject: |
|
|
try `qsearch -e -a`
If that works, the problem is in the "portage cache"
"-e" uses the portage ebuild tree as its source database |
|
Back to top |
|
|
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sat May 20, 2017 8:18 pm Post subject: |
|
|
cboldt wrote: | try `qsearch -e -a`
If that works, the problem is in the "portage cache"
"-e" uses the portage ebuild tree as its source database |
(sorry for the delay... life... )
I get the same result:
Code: |
me@aragorn ~ $ qsearch -e -a | wc -l
251
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
And in case I get asked:
Code: |
me@aragorn ~ $ emerge --info
Portage 2.3.5 (python 3.4.5-final-0, default/linux/x86/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r3, 4.9.16-gentoo i686)
=================================================================
System uname: Linux-4.9.16-gentoo-i686-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-gentoo-2.3
KiB Mem: 3107036 total, 244200 free
KiB Swap: 4205276 total, 3865988 free
Timestamp of repository gentoo: Sat, 20 May 2017 11:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash: 4.3_p48-r1::gentoo
dev-java/java-config: 2.2.0-r3::gentoo
dev-lang/perl: 5.24.1-r1::gentoo
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake: 3.7.2::gentoo
dev-util/pkgconfig: 0.28-r2::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.26.2::gentoo
sys-apps/sandbox: 2.10-r3::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.26.1::gentoo
sys-devel/gcc: 5.4.0-r3::gentoo
sys-devel/gcc-config: 1.7.3::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc: 2.23-r3::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
local-repo
location: /usr/local/portage/local-overlay
masters: gentoo
priority: 0
go-overlay
location: /usr/local/portage/layman/go-overlay
masters: gentoo
priority: 50
hnaparst
location: /usr/local/portage/layman/hnaparst
masters: gentoo
priority: 50
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Ofast -march=native -fomit-frame-pointer -pipe -w"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/share/config /usr/share/config/kdm /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/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Ofast -march=native -fomit-frame-pointer -pipe -w"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --fail-clean n --jobs=1 --load-average=2 --autounmask-keep-masks --alert y --alphabetical"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/local/portage/packages"
PORTAGE_COMPRESS="bzip2"
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="/usr/local/portage/tmpdir"
USE="X a52 aac acl acoustid acpi ads afp alsa amr apache2 attica autoipd avahi bash-completion berkdb bluetooth bluray branding bs2b btrfs bzip2 cacert cairo cdda cddb cdparanoia cdr chardet cli client cloudprint connman consolekit cracklib crypt css cups cxx dbus declarative dga directfb dolphin dri dts dv dvd dvdr emboss encode evdev exceptions exif extensions f2fs faac faad facebook fam fbcon fbcondecor fbsplash fdk ffmpeg firefox firmware flac fontconfig foomaticdb fortran fortune frei0r ftp fuse gbm gd gdbm geoclue geoip geolocation geonames gif git glamor glib gnutls go google gpm groupwise gtk gtkstyle highlight hostip iconv icu idn imagemagick infinality initramfs ipv6 javascript jpeg jpeg2k kde kerberos kipi ladspa lame lcms ldap libcanberra libinput libnotify live lm_sensors logrotate lua lzma lzo mad manual md5sum meanwhile mercurial midi mikmod mjpeg mms mmx mmxext mng mod modules mp3 mp4 mpeg mtp musicbrainz nas ncurses network networkmanager nfs nls nominatim nptl ntfs ntp nvidia odbc offensive offlinehelp ogg openexr opengl openmp orientation osmesa pam pango pcre pdf phonon php plasma plugins pm-utils png policykit postproc ppds printsupport prison pulseaudio python qml qt3support qt5 quicktime rar rdp readline realtime rtmp rtsp s3tc samba schroedinger script sddm sdl search-domains seccomp session sftp shout slp smbkrb5passwd smi smp sndfile snmp sox spell sqlite squashfs sse sse2 sse3 ssl ssse3 startup-notification subversion svg symlink tcpd telepathy themes theora thumbnail tidy tiff timidity tools truetype twitter udev udisks unicode upnp upower usb utils v4l vaapi vcd vdpau vhosts vidix vlc vnc vorbis wavpack webchannel webp webready widgets wifi winbind wmf wxwidgets x264 x86 xattr xcb xcomposite xfs xinerama xml xpm xrandr xscreensaver xv xvid xvmc yahoo-geo zeroconf zip zlib" ABI_X86="32" ALSA_CARDS="hda-intel hpet" 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 dav proxy proxy_fcgi unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink2 sipix_web2 sipix_blink smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 st2205 sx330z template topfield toshiba_pdrm11 tp6801" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 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" INPUT_DEVICES="evdev joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau nvidia" XFCE_PLUGINS="clock multiload-nandhp power trash" 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_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
|
_________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie |
|
Back to top |
|
|
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sat May 20, 2017 8:35 pm Post subject: |
|
|
Also, just for grins, I just did
Code: |
root@aragorn ~ # emerge --regen
(snip)
root@aragorn ~ # qsearch -e -a | wc -l
251
root@aragorn ~ # emerge --sync
(snip)
root@aragorn ~ # qsearch -e -a | wc -l
251
root@aragorn ~# emerge --metadata --verbose
>>> Updating Portage cache
100% [=======================================================================>]
root@aragorn /usr/lib # qsearch -e -a | wc -l
251
|
_________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Sat May 20, 2017 10:37 pm Post subject: |
|
|
Maybe there is a clue in what those 251 entries are.
I wonder if there is some sort of permissions issue (although I have no idea how that could possibly materialize out of the blue) that hides most of the portage tree. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat May 20, 2017 10:49 pm Post subject: |
|
|
"emerge -p --depclean" will wind up with a very nice count of packages, packages in world, and packages in system without actually doing anything (-p = pretend) Code: | Packages installed: 855
Packages in world: 129
Packages in system: 44
Required packages: 845
Number to remove: 10
|
|
|
Back to top |
|
|
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sun May 21, 2017 1:27 pm Post subject: |
|
|
I figured out what is going on.
The 251 packages that qsearch sees are everything in the couple overlays I have installed. Interesting...
Looooooong story short, In /etc/portage/repos.conf/gentoo.conf, I had commented everything out so portage would just use the "built in defaults". That's fine and grate, but, that meant that the repos' configs were now the only ones "available" to some of the tools. A normal "emerge --sync" pulled everything - gentoo included. Tools like qsearch and qlist *ONLY* read what repos are defined and seem to not fall back to the "default" definition of the "gentoo" repo when one isn't defined.
This is wrong because the overlay repos defined "gentoo" as the "master" repo - which some q tools seem to ignore.
After uncommenting my /etc/portage/repos.conf/gentoo.conf:
Code: |
me@aragorn /usr/local/portage $ qsearch -e -a | wc
19442 153986 1322909
|
Personally, I'd call this a pretty big bug. A user should not be FORCED to define a "gentoo repo" when they add an overlay. The portage tuils should see that the "master" is gentoo and pull from defualt if a user override is not present.
M. _________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun May 21, 2017 2:20 pm Post subject: |
|
|
Xanadu wrote: | This is wrong because the overlay repos defined "gentoo" as the "master" repo |
No, this is correct. "master" only means that eclasses (and perhaps a few metadata information) are taken from that repository. |
|
Back to top |
|
|
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sun May 21, 2017 5:49 pm Post subject: |
|
|
mv wrote: | Xanadu wrote: | This is wrong because the overlay repos defined "gentoo" as the "master" repo |
No, this is correct. "master" only means that eclasses (and perhaps a few metadata information) are taken from that repository. |
Fair enough. I'll agree with you there. However, if emerge --sync falls back to the default "gentoo repo" when a local gentoo repo is not defined in repos.conf, why then did it not build a cache of the same repo it just sync'd from? One of those situations is wrong behavior. Either:
1) All portage utilities should always fall back to using /usr/share/portage/config/repos.conf
2) They should never
Again, if --sync used /usr/share/portage/config/repos.conf when a local definition of "gentoo repo" was not present, why wasn't the cache built using /usr/share/portage/config/repos.conf also?
M. _________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Sun May 21, 2017 7:23 pm Post subject: |
|
|
I have two files in /etc/portage/repos.conf One of those files defines the "default" repository, the gentoo portage tree, and my local repository. The other file is managed by layman, and keeps any other repositories.
The file containing gentoo and local repositories uses the words "DEFAULT" and "main-repo" to define the primary repository. It does not use the word "master" at all.
Code: | # /etc/portage/repos.conf/gentoo.conf
# `man portage` for variables in repos.conf
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://gentoo/gentoo-portage
auto-sync = yes
priority = 100
[local]
location = /usr/local/portage
auto-sync = no
priority = 9999 |
`man portage` does describe an attribute "masters" which can be assigned to any or all repositories, and recommends against setting this attribute. The example "repos.conf" settings shows the use of "masters =" and briefly describes the effect and consequences. |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Sun May 21, 2017 7:31 pm Post subject: |
|
|
To the more general point, if I recall correctly, Gentoo now requires that the portage tree be defined as a repository somewhere around /etc/portage/repos.conf. There is no default, except by maintaining resort to some deprecated environment variable PORTDIR in /etc/portage/make.conf.
from `man make.conf` ...
Code: | PORTDIR = [path]
Defines the location of main repository. This variable is deprecated in favor of settings in repos.conf. If you change this, you must update your /etc/portage/make.profile symlink accordingly.
Defaults to /usr/portage. |
|
|
Back to top |
|
|
Xanadu Guru
Joined: 10 Oct 2002 Posts: 335 Location: Hour West of Philly (USA)
|
Posted: Sun May 21, 2017 8:22 pm Post subject: |
|
|
cboldt wrote: | To the more general point, if I recall correctly, Gentoo now requires that the portage tree be defined as a repository somewhere around /etc/portage/repos.conf. |
(emphasis mine) I disagree.
Code: |
me@aragorn ~ $ equery b /usr/share/portage/config/repos.conf
* Searching for /usr/share/portage/config/repos.conf ...
sys-apps/portage-2.3.5 (/usr/share/portage/config/repos.conf)
|
Which contains:
Code: |
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
# for daily squashfs snapshots
#sync-type = squashdelta
#sync-uri = mirror://gentoo/../snapshots/squashfs
|
That is the "default Gentoo repo". You can override that by putting a config in /etc/portage/repos.conf. HOWEVER, what I've uncovered is that if you put any config there - even if only for overlays - not all of the portage utilities honor that. I was still able to sync the "Gentoo repo" because emerge --sync fell back to using /usr/share/portage/config/repos.conf to find where to pull the official portage tree from. The problem is that portage was not building the local cache that also included that - even though it clearly knows about it, IT JUST SYNC'D FROM IT. The local cache for use by things like qsearch and qlist only contained packages explicitly defined in /etc/portage/repos.conf - which were only my overlays.
~~~~~~~~~
cboldt wrote: | Code: | PORTDIR = [path]
Defines the location of main repository. This variable is deprecated in favor of settings in repos.conf. If you change this, you must update your /etc/portage/make.profile symlink accordingly.
Defaults to /usr/portage. |
|
Right. PORTDIR is where the sync'd tree lives on your machine, not where to sync that tree from. Aside, because I didn't have the "Gentoo repo" defined in /etc/portage/repos.conf, portage fell back to using the default repo definition (see above) and my PORTDIR variable in make.conf.
M. _________________ I'm not a prophet or a stone-age man
I'm just a mortal with potential of a super man
-David Bowie |
|
Back to top |
|
|
|