Bug 1113384
Summary: | [rfe] repofrompath option to specify ad-hoc repo | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Honza Horak <hhorak> |
Component: | dnf | Assignee: | Michael Mráka <mmraka> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | awood, dcallagh, fedora, hamzy, jonathan.underwood, jsilhan, jzeleny, mmraka, pnemade, ppisar, rholy, tim.lauridsen, vondruch |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dnf-1.0.2-3.fc22 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-08-11 02:08:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Honza Horak
2014-06-26 05:12:47 UTC
Hi Honza, thanks for the reoprt, we'll cosider this. If you take votes, count me in. I agree with the low priority though, at least for now. In https://bugzilla.redhat.com/show_bug.cgi?id=1120899#c18 someone suggested to use dnf. However, this doesn't work for me. [anaconda root@ppc64lehamzytest2 ~]# dnf upgrade anaconda python-blivet Config error: releasever not given and can not be detected from the installroot. [anaconda root@ppc64lehamzytest2 ~]# dnf --releasever=21_Alpha_TC3 upgrade anaconda python-blivet Error: There are no enabled repos. [anaconda root@ppc64lehamzytest2 ~]# dnf --releasever=21_Alpha_TC3 --repofrompath=temp-f21-repo,http://ppc.koji.fedoraproject.org/mash/branched-20140925-Alpha-TC3/21-ppc/ppc64le/os/ --enablerepo=temp-f21-repo upgrade anaconda python-blivet Error: Unknown repo: 'temp-f21-repo' So I would suggest raising the priority of this feature request. :) I wonder whether passing a path to a ".repo" file wouldn't be better since one would be able to specify all the possible repo options. ...but actually I'm often too lazy to create a .repo file for a single command... +1 for this RFE in general, as I used the feature myself quite a few times in the past and would really miss it. (In reply to Radek Holy from comment #5) > ...but actually I'm often too lazy to create a .repo file for a single > command... +1 for this comment as well, as one can hand out commands like "repoquery --repofrompath=repo,http://repos.fedorapeople.org/repos/thl/kernel-vanilla-mainline/fedora-22/x86_64/ --disablerepo=* --enablerepo=repo --qf '%{evr}' -q kernel" to people running Fedora and they will just work (that is a shorter example of the command used in https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories#What_kernel_versions_do_the_repos_currently_contain.3F ) Implemented in https://github.com/rpm-software-management/dnf/pull/296 Another +1 from me - this is invaluable. Here's an example of something I can't do with dnf repoquery... repoquery --repofrompath=this,http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os --repoid=this -s --qf "%{name} %{name}\n" emacs-* | grep -v emacs- | perl -pe 's/^(.+?)-[^-]+-[^-]+$/\1\n/' | uniq | perl -pe 's/^(.+?)-[^-]+-[^-]+$/\1\n/' | fedoradev-pkgowners | sort | column -t dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22 I don't understand why you kept the <repo>, i.e. the name have to be specified? Why you do that so complex? Package dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-1.0.2-3.fc22 hawkey-0.5.9-3.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-12577/dnf-1.0.2-3.fc22,hawkey-0.5.9-3.fc22 then log in and leave karma (feedback). It's necessary to be able to reference repo in other options (--enablerepo/--disablerepo, repository-packages, etc). (In reply to Michael Mráka from comment #12) > It's necessary to be able to reference repo in other options > (--enablerepo/--disablerepo, repository-packages, etc). Do you really believe, that I will invest time to write something like "--reporfrompath=foo,http://.." just to disable it later by --disablerepo? Just to be clear, once I specify this parameter, I really want to use this repo, no matter what the other option says. Most like not for one repo specified on commandline. But there can be multiple --repofrompath e.g. generated by a shell script and it makes sense. Also you can't otherwise reference the repo in repository-packages. (In reply to Michael Mráka from comment #14) > Most like not for one repo specified on commandline. But there can be > multiple --repofrompath e.g. generated by a shell script and it makes sense. If you are speaking about shell script, this can be definitely adjusted to generated such "--repofrompath" parameter only when needed. This script could be probably simpler, since I can't imagine how the "repoid" would be handled. > Also you can't otherwise reference the repo in repository-packages. What is this "repository-packages" command about? I don't think this was one of YUM command nor I don't find it systematic. What is the difference to "--repo" (bug 1193851) parameter. Why/where/when it was introduced? So glad you've implemented this! Just for the benefit of others, I use repofrompath to create an ad hoc repo base on my mock configs. That way I can run repoquery to get an idea of what things look like in my mock environments. For example: #! /bin/zsh mock-repoquery() { local profile="$1" [ -f "$profile" ] || profile="/etc/mock/${1}.cfg" # Take all baseurls in a file and make them into an array # See Parameter Expansion Flags section of the zshexpn man page and # http://unix.stackexchange.com/a/29748 local repo_urls repo_urls=("${(@f)$(sed -n -r 's/.*baseurl=(.*)(\\n|$)/\1/p' $profile | cut -d'\' -f1)}") local repo_args repo_args=() for ((i=1; i <= ${#repo_urls}; i++)); do repo_args+="--repofrompath=r${i},$repo_urls[i]" repo_args+="--repoid=r${i}" done if type dnf; then prefix="dnf" else prefix="" fi $prefix repoquery --disablerepo="*" "${repo_args[@]}" "$@[2,-1]" } mock-repoquery "$@" (In reply to Alex Wood from comment #16) > for ((i=1; i <= ${#repo_urls}; i++)); do > repo_args+="--repofrompath=r${i},$repo_urls[i]" > repo_args+="--repoid=r${i}" > done Alex, thanks for the example. It just demonstrates how useless the <repoid> is. It could be as easy as: for ((i=1; i <= ${#repo_urls}; i++)); do repo_args+="--repofrompath=$repo_urls[i]" done (In reply to Vít Ondruch from comment #15) > What is this "repository-packages" command about? I don't think this was one > of YUM command nor I don't find it systematic. What is the difference to > "--repo" (bug 1193851) parameter. Why/where/when it was introduced? I assume you are able to open YUM's man pages. The difference is that with "repo-pkgs" you are able to ask DNF to install a package from a particular repository while allowing DNF to install required dependencies from other repositories. This is very useful in combination with Copr or other "testing" repositories. It also allows you to easily uninstall all the testing packages once the testing is done. Anyway, please use email or IRC to ask off-topic questions (or to question this answer). dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. |