Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923925 - Introduce proper checks for eselect repository add
Summary: Introduce proper checks for eselect repository add
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-06 12:24 UTC by Martin Mokrejš
Modified: 2024-02-06 12:25 UTC (History)
1 user (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 Martin Mokrejš 2024-02-06 12:24:37 UTC
Hi,
  I wonder why the runtime help is incomplete and why does it automagically infer protocol from the URL. Below I rewrote the paths to use ${prefix} to make them more redable.

$ eselect repository
Usage: eselect repository <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  add <name> <sync-type> <sync-uri>
                            Add a custom repository
    <name>                    Name of the repository to add
    <sync-type>               Syncer to use (e.g. git, rsync, svn...)
    <sync-uri>                Sync URI
...

$ eselect repository add stefantalpalaru https https://github.com/stefantalpalaru/gentoo-overlay
Adding stefantalpalaru to ${prefix}/etc/portage/repos.conf/eselect-repo.conf ...
Repository stefantalpalaru added
$ eselect repository add jgenco https https://github.com/jgenco/jgenco-overlay
Adding jgenco to ${prefix}/etc/portage/repos.conf/eselect-repo.conf ...
Repository jgenco added
$

$ emerge dev-python/virtualenv
!!! Repository 'stefantalpalaru' has sync-type attribute set to unsupported value: 'https'
!!! Installed sync-types are: '['cvs', 'git', 'mercurial', 'rsync', 'svn', 'webrsync']'
!!! Repository 'jgenco' has sync-type attribute set to unsupported value: 'https'
!!! Installed sync-types are: '['cvs', 'git', 'mercurial', 'rsync', 'svn', 'webrsync']'
!!! Section 'stefantalpalaru' in repos.conf has location attribute set to nonexistent directory: '${prefix}/var/db/repos/stefantalpalaru'
!!! Section 'jgenco' in repos.conf has location attribute set to nonexistent directory: '${prefix}/var/db/repos/jgenco'
!!! Repository 'science' is missing masters attribute in '${prefix}/var/db/repos/science/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
WARNING: One or more repositories have missing repo_name entries:

        ${prefix}/var/db/repos/stefantalpalaru/profiles/repo_name
        ${prefix}/var/db/repos/jgenco/profiles/repo_name
        ${prefix}/var/db/repos/science/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.

...

1. The runtime help output by "eselect repository" should list all supported values, by showing the allowed values directly from some global variable. The message "Syncer to use (e.g. git, rsync, svn...)" is definitely insufficient and there is no proper check of allowed values present.

2. If the source URL includes https:// why doesn't it fill in webrsync automagically? Some firewalls block svn/git/mercurial/rsync so IMO webrsync is the only safe option in general.

3. Why weren't the $prefix/var/db/repos/$reponame/profiles/repo_name files created automagically? I keep seeing these messages for about 5-7 years and honestly I don't care about them. Maybe bug #703958 already?
Comment 1 Martin Mokrejš 2024-02-06 12:25:12 UTC
$ emerge --info
!!! Section 'stefantalpalaru' in repos.conf has location attribute set to nonexistent directory: '/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/stefantalpalaru'
!!! Section 'jgenco' in repos.conf has location attribute set to nonexistent directory: '/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/jgenco'
!!! Repository 'science' is missing masters attribute in '/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/science/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
WARNING: One or more repositories have missing repo_name entries:

	/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/science/profiles/repo_name
	/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/stefantalpalaru/profiles/repo_name
	/auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/jgenco/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


Portage 3.0.59 (python 3.11.4-final-0, default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+, gcc-13, glibc-2.37-r4, 5.10.0-13-amd64 x86_64)
=================================================================
System uname: Linux-5.10.0-13-amd64-x86_64-Intel-R-_Xeon-R-_Platinum_8260_CPU_@_2.40GHz-with-glibc2.37
KiB Mem:  3169357408 total,1433568888 free
KiB Swap:   16383996 total,  16151804 free
Timestamp of repository gentoo: Tue, 06 Feb 2024 11:30:01 +0000
Head commit of repository gentoo: 66047e8c963570a5883c069eab9d72b45e83cd84
sh bash 5.2_p21
ld GNU ld (Gentoo 2.40 p6) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r1::gentoo
dev-build/cmake:           3.27.7::gentoo
dev-build/libtool:         2.4.7-r1::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.4::gentoo, 3.12.0_beta4_p1::gentoo
dev-lang/rust:             1.71.0::gentoo
dev-lang/rust-bin:         1.71.0::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-devel/binutils:        2.40-r7::gentoo, 2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r4::gentoo
Repositories:

gentoo
    location: /auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1

science
    location: /auto/vestec1-elixir/projects/biocev/gentoo/var/db/repos/science
    sync-type: webrsync
    sync-uri: https://gitweb.gentoo.org/proj/sci.git
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 NPSL RAR Intel-SDP fasta vienna-rna unafold GRL MSttfEULA hplip-plugin meme mRNAmarkup ApE ICS ipw3945 finchtv modeller gmap abyss swiss-prot Aladdin AVASYS pyvcf Non-profit-OSL-3.0 estscan bcca_2010 oncotator Adobe blat staden CeCILL-1.1 phrap STRIDE cctbx-2.0 bh-luxi ARIADNE unRAR all-rights-reserved trf annovar_personal_only stampy-academic BSD-BroadInstitute UPennState freedist free-noncomm blasr sun-jlfgr FLI-Jena PSTT netperf sun-jsr67 xv vim.org OSGi-Specification-2.0 colt google-chrome ACE AFL churchill genscan no-source-code ISSL JSON MPEG-4 Apache-2.0 BSD MIT BSD-2 FSFAP unicode Subversion PSF-2.4 merlin android julius CROSSOVER-3 lha PUEL-11 WPS-EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/auto/vestec1-elixir/projects/biocev/gentoo/etc /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/auto/vestec1-elixir/projects/biocev/gentoo/etc/env.d /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"
CONFIG_SHELL="/auto/vestec1-elixir/projects/biocev/gentoo/bin/bash"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/auto/vestec1-elixir/projects/biocev/gentoo/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j64"
PKGDIR="/auto/vestec1-elixir/projects/biocev/gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/auto/vestec1-elixir/projects/biocev/gentoo/"
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="/auto/vestec1-elixir/projects/biocev/gentoo/var/tmp"
SHELL="/auto/vestec1-elixir/projects/biocev/gentoo/bin/bash"
USE="X a52 aac acl acpi alsa amd64 amr amrenc aom apache apache2 archive armadillo asm audit av1 avx avx2 berkdb blas bluray bmp boost bz2 bzip2 cairo caps cdda cdio cdr cdrom cgi chromium cli codec2 coin cpudetection cracklib crypt cryptlib cryptsetup cups curl cxx dav1d dbus device-mapper directfb directx dri dri3 drm dvbpsi dvd dvda dxf dxva2 egl elogind emboss encode eselect-ldso exif faad fax fbcon fdk ffmpeg fftw flac fontconfig foomatic fortran gbm gcrypt gd gdal gdbm geoip geolocation georeferencer geos gimp glpk gml gmp gnutls gps grass gstreamer gtk gtk3 gui h.264 h.265 h264 h265 hal haptic hdf5 heif hevc hpijs hwdb iconv icu id3tag imaging innodb inotify iproute2 ipv6 java javafx javascript jbig jce jpeg jpeg2k jpg js jscript kdrive keymap kms ladspa lapack laptop las lcms libaom libdrm libkms libnotify librtmp libsoxr libtesseract libtirpc libv4l libxml2 live lm-sensors lm_sensors lz4 lzma mad mariadb matroska mjpeg mmal mmx mp3 mpeg mysql ncurses netcdf nfs nls nptl nptlonly nscd nss ntfsprogs nvenc objc ocr odbc ogdi ogg openal opencl opengl openh264 openmp openssl opus parport pbs pcre pcre16 pcsc-lite pdal pdf perl php png polar polkit postgres ppds pppd prefix python qemu qml qt3support qt4 qt5 qt6 rav1e readline rendering resolvconf romio rubberband scanner seccomp server session sha slideshow smartcard sndfile sndio split-usr sqlite srt sse sse2 sse3 sse4_1 sse4_2 ssh ssl sslv3 ssse3 startup-notification suexec svg svt-av1 tcl tcpd test-rust threads tiff tk tkip tools truetype twolame udev unicode unwind upnp usb v4l v4l2 vaapi vidstab vim-syntax virtualbox vmaf vnc vorbis vp8 vp9 vpx vulkan wavpack wayland webp widgets x11 x264 x265 xa xcb xephyr xft xls xml xmp xorg xrandr xv xvfb xvid xvmc zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 avx2 avx512f avx512dq avx512cd avx512bw avx512vl f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python2_7 python3_9 python3_10 python3_11" RUBY_TARGETS="ruby31 ruby32 ruby33" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LANG, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS