Code Monkey home page Code Monkey logo

eselect-repository's People

Contributors

brausepulver avatar mgorny avatar thesamesam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eselect-repository's Issues

feature request: add option to use `curl` instead of `wget`

i'm currently using this:

diff --git a/app-eselect/eselect-repository/eselect-repository-9.ebuild b/app-eselect/eselect-repository/eselect-repository-9.ebuild
index b0b71d29e52..e3aa6be425a 100644
--- a/app-eselect/eselect-repository/eselect-repository-9.ebuild
+++ b/app-eselect/eselect-repository/eselect-repository-9.ebuild
@@ -13,6 +13,7 @@ SRC_URI="https://github.com/mgorny/eselect-repository/archive/v${PV}.tar.gz -> $
 LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
+IUSE="+curl"
 REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
 RDEPEND="${PYTHON_DEPS}
@@ -20,7 +21,19 @@ RDEPEND="${PYTHON_DEPS}
 	$(python_gen_cond_dep '
 		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
 	')
-	net-misc/wget"
+	!curl? ( net-misc/wget )
+	curl? ( net-misc/curl )
+"
+
+src_prepare() {
+	if use curl; then
+		sed -i repository.eselect.in \
+			-e 's/wget -N -P/curl -LO --create-dirs --output-dir/' \
+		|| die
+	fi
+
+	default
+}
 
 src_compile() {
 	MAKEARGS=(

but may be you can add option to do this through Makefile

Add some tests

It shouldn't be hard to add a sample .xml and test the Python counterpart, at least.

Set sync-depth and clone-depth to 1 by default.

I haven't needed to keep the git commit history of overlays.

Thus, I manually write overlays in /etc/portage/repos.conf/overlays.conf instead of using eselect-repository.

/etc/portage/repos.conf/overlays.conf

[crocket-overlay]
location = /var/db/repos/crocket-overlay
sync-type = git
sync-uri = https://github.com/crocket/crocket-overlay.git
clone-depth = 1
sync-depth = 1

[guru]
location = /var/db/repos/guru
sync-type = git
sync-uri = https://anongit.gentoo.org/git/repo/proj/guru.git
clone-depth = 1
sync-depth = 1

It should be possible to disable remote repository fetching for offline use cases

In a disconnected environment it may still be convenient to use eselect repository create to automate the creation of a local ebuild repository.

Currently there does not appear to be a convenient way to skip the fetch of known repositories.

Suggestion: Both a command-line flag e.g. --offline and a configuration file option should exist to enable this use case.

Feature request - create/initialize local repo from scratch

Hello,

I think it would be great if eselect-repository could aid the user in setting up a local repo, now that so many files have to (or should be) added to make that happen. Here's the doc they're following now: https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/CustomTree#Defining_a_custom_ebuild_repository

For example, "eselect repository create iamben-overlay" would create /var/db/repos/iamben/overlay/ and a corresponding repos.conf entry for it, and also populate metadata/layout.conf, profiles/repo_name, and maybe some other files I'm missing.

Thanks for your consideration!

Feature request: default repos.conf options

It would be nice if you could control which options get set automatically. For example, a git.repos.conf file could contain something like

sync-git-env=...
sync-git-verify-commit-signature=...

which then gets copied onto the end of the config block created by eselect-repository (for repos that sync using git).

eselect-repository should have a git USE flag

Most (or at least many) user repositories use git to sync the repository data.
However, app-eselect/eselect-repository does not pull in dev-vcs/git and therefore repositories using git do not work.

One has to manually emerge dev-vcs/git (and therefore add it to /var/lib/portage/world), which feels wrong because this is not a "user desired" application but more of a dependency.

app-portage/layman which basically does the same thing as eselect-repository and is it's predecessor (in spirit?) has USE=git and it is enabled by default. This is in my opinion how it should be handled

Currently, I only care about git but other source code version control systems (like subversion or cvs) could be implemented with their use flags as well, to pull in the necessary dependencies

Regards

Enhancement: Make it possible to create a per repo file in repos.conf

There is the REPOS_CONF_SUBFILE variable, where the file can be defined, where new repos are placed, if repos.conf is a directory.

My workflow was to add one file per repo. It would be nice if you adjust the script, so that one can specify this variable on a per repo basis, e.g. introduce a variable: REPO_NAME so that REPOS_CONF_SUBFILE can be defined as:

REPOS_CONF_SUBFILE=${REPOS_CONF}/${REPO_NAME}.conf

that would result with e.g.:

eselect repository enable kde

in

REPOS_CONF_SUBFILE=/etc/portage/repos.conf/kde.conf

zsh completion failure

Hello,

first, thanks a lot for this simple and lightweight layman replacement (especially when seeing all the stuff that layman pulls). When trying to complete eselect repository under zsh, I get _values:compvalues:10: invalid value definition: disable [-f] (<name>|<index>)... Disable specified repositories without removing their contents.
I don't know if I should take it to https://github.com/gentoo/gentoo-zsh-completions, but since it's the only eselect module failing, I'll try here first.

Using eselect-repository-2 and app-shells/gentoo-zsh-completions-20150103

feature request: Disable overlay, but keep it synced

One feature I am missing after migration from layman is the possibility to have overlays automatically synced, but not "visible" for portage. This allowed me to switch between multiple repositories that offered the same ebuilds but with varying quality or recency. It also allowed me to pick only some ebuilds from an otherwise too large overlay by simply symlinking it to my personal overlay.
It seems like there is no way to achieve this with eselect-repository right now, am I right?

Putting each repository to it's own file

It would be great if eselect-repository could write each repository congiruration to it's own file. This way it would be more consistent with current practice of populating repos.conf/ .

TypeError: strxfrm() argument 1 must be str, not None

I get the following error with the list command:

eselect repository list 
Available repositories:
Traceback (most recent call last):
  File "/usr/lib/eselect-repo/eselect-repo-helper", line 145, in <module>
    main()
  File "/usr/lib/eselect-repo/eselect-repo-helper", line 135, in main
    do_list(args)
  File "/usr/lib/eselect-repo/eselect-repo-helper", line 37, in do_list
    key=lambda x: locale.strxfrm(x.findtext('name'))):
  File "/usr/lib/eselect-repo/eselect-repo-helper", line 37, in <lambda>
    key=lambda x: locale.strxfrm(x.findtext('name'))):
TypeError: strxfrm() argument 1 must be str, not None
!!! Error: helper failed to run
exiting

emerge-info.txt
repository.conf.txt

Feature Suggestion: Having an overlay depend on another overlay for a specific ebuild

It has happened to me a couple of times that my personal overlay makes use of packages that are present in other overlays (that are not in the main gentoo or even guru tree)
As far as I am concerned, the best way to handle this situation is to copy the necessary ebuild. However this approach has a couple of problems:

  1. Having to sync the copied ebuild
  2. There are 2 ebuilds that do the same thing, which can get out of sync fairly easily

My humble suggestion:
Having an optional parameter on the profiles directory called dependecies. Said file could be a list of names / links to the overlays that the selected overlay depends on. This does imply an update to the overlay standard; however it should be backwards compatible (if the file is not present, then it is assumed that it is self contained)

Would this cause any problems?
Are there any technical limitations?
Does this feature already exist?
Is my approach of copying and pasting ebuild wrong?

Thanks in advance!

PS: Thank you gorny for all of your work! I'm a big fan of the eselect repository tool

`create` fails if /etc/portage/repos.conf does not exist (e.g. fresh install)

When using eselect repository create on an untarred stage3, it'll fail because repos.conf does not yet exist. It succeeds after running mkdir.

Could eselect-repository create it for us in such a case?

stable-ab7a99280a5c23d0 ~ # eselect repository create local
!!! Error: /etc/portage/repos.conf does not exist; wrong path?
Call stack:
    * get_config (repository.eselect:34)
    * do_create (repository.eselect:225)
    * check_do (core.bash:24)
    * do_action (core.bash:105)
    * main (eselect:181)
exiting
stable-ab7a99280a5c23d0 ~ # mkdir /etc/portage/repos.conf
stable-ab7a99280a5c23d0 ~ # eselect repository create local
--2021-08-21 01:01:00--  https://qa-reports.gentoo.org/output/repos/repositories.xml
Resolving qa-reports.gentoo.org... 151.101.18.137, 2a04:4e42:f::649
Connecting to qa-reports.gentoo.org|151.101.18.137|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 261577 (255K) [application/xml]
Saving to: ‘/root/.cache/eselect-repo/repositories.xml’

repositories.xml                                    100%[=================================================================================================================>] 255.45K  --.-KB/s    in 0.06s

2021-08-21 01:01:01 (4.04 MB/s) - ‘/root/.cache/eselect-repo/repositories.xml’ saved [261577/261577]

Adding local to /etc/portage/repos.conf/eselect-repo.conf ...
Repository local created and added
stable-ab7a99280a5c23d0 ~ #

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.