[Bug 1057640] New: Custom variables not recognized
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640 Bug ID: 1057640 Summary: Custom variables not recognized Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.3 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp Assignee: zypp-maintainers@forge.provo.novell.com Reporter: antoine.mechelynck@gmail.com QA Contact: qa-bugs@suse.de Found By: Community User Blocker: --- I don't know if this is a program bug or a documentation bug (i.e. a lack of clarity in the documentation). I tried to create a custom variable for use by zypper, as explained in the output of "man zypper" under "Custom Variables", as follows: 1. Create a file named /etc/zypp/vars.d/server 2. Make the first line of that file equal to ftp.halifax.rwth-aachen.de/opensuse (with no blanks at left). 3. In /etc/repos.d/all.repo (the only *.repo I have in that directory) replace every instance of the above string on the baseurl= lines (one per repo except Packman and the DVD) by ${server} the idea being to replace that one line by download.opensuse.org when the present outage will be _completely_ a thing of the past, so that all URLs will be reassigned in one fell swoop. (Then run "zypper ref" again to make sure it's OK.) Then try "zypper ref" I expected zypper to resolve my custom variable, refresh all repositories, and tell me that they were now up to date. Instead, I got an error message in red telling me that ${server} was an unknown variable. If the above behaviour is expected, then the manpage is unclear; conversely, if what I did was right, then there is a bug in zypper. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c1
Michael Andres
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c2
--- Comment #2 from Michael Andres
<repoindex disturl="http://download.opensuse.org" distsub="leap/" distver="42.3" debugenable="false" sourceenable="false">
<repo url="%{disturl}/distribution/%{distsub}%{distver}/repo/oss" alias="repo-oss" name="%{alias} (%{distver})" enabled="true" autorefresh="true"/>
<repo url="%{disturl}/distribution/%{distsub}%{distver}/repo/non-oss" alias="repo-non-oss" name="%{alias} (%{distver})" enabled="true" autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/oss" alias="update-oss" name="%{alias} (%{distver})" enabled="true" autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/non-oss" alias="upadte-non-oss" name="%{alias} (%{distver})" enabled="true" autorefresh="true"/>
<repo url="%{disturl}/debug/distribution/%{distsub}%{distver}/repo/oss" alias="debug-oss" name="%{alias} (%{distver})" enabled="%{debugenable}" autorefresh="true"/>
<repo url="%{disturl}/debug/distribution/%{distsub}%{distver}/repo/oss" alias="debug-non-oss" name="%{alias} (%{distver})" enabled="%{debugenable}" autorefresh="true"/>
<repo url="%{disturl}/source/distribution/%{distsub}%{distver}/repo/oss" alias="source-oss" name="%{alias} (%{distver})" enabled="%{sourceenable}" autorefresh="true"/>
<repo url="%{disturl}/source/distribution/%{distsub}%{distver}/repo/non-oss" alias="source-non-oss" name="%{alias} (%{distver})" enabled="%{sourceenable}" autorefresh="true"/> </repoindex> %{VAR} always refers to the value defined in the <repoindex > tag (reserved names are 'ttl' and 'alias'). %{alias} which is available within a <repo > tag after the alias was defined.
- Given the file is located at '/somewhere'/repo/repoindex.xml then add the service by
zypper sa /somewhere openSUSE
- manually refresh the service (incl. the repos) with
zypper refs -r Refreshing the service will evaluate the repoindex.xml and adjust the Services repos accordingly. The repos alias will be prefixed by the service name: # | Alias | Name | Enabled | GPG Check | Refresh ---+-------------------------+-----------------------+---------+-----------+-------- 9 | openSUSE:debug-non-oss | debug-non-oss (42.3) | No | ---- | ---- 10 | openSUSE:debug-oss | debug-oss (42.3) | No | ---- | ---- 11 | openSUSE:repo-non-oss | repo-non-oss (42.3) | Yes | (r ) Yes | Yes 12 | openSUSE:repo-oss | repo-oss (42.3) | Yes | (rp) Yes | Yes 13 | openSUSE:source-non-oss | source-non-oss (42.3) | No | ---- | ---- 14 | openSUSE:source-oss | source-oss (42.3) | No | ---- | ---- 15 | openSUSE:upadte-non-oss | upadte-non-oss (42.3) | Yes | (rp) Yes | Yes 16 | openSUSE:update-oss | update-oss (42.3) | Yes | (rp) Yes | Yes
- After editing the repoindex.xml (e.g. disturl=) you must manually refresh the service to takeover the changes, or you turn on autorefresh for the service (depends on how often you chnage the content)
zypper ms -r openSUSE
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c3
--- Comment #3 from Tony Mechelynck
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c4
--- Comment #4 from Tony Mechelynck
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c8
--- Comment #8 from Tony Mechelynck
Fixed in libzypp-17.0.2 (TW/CODE15) libzypp-16.17.5 (Leap 42.2/3, SLE12-SP2/3)
The fix seems noy yet to have been compiled and uploaded: linux-2iyu:~ # zypper lr -u Repository priorities in effect: (See 'zypper lr -P' for details) 99 (default priority) : 8 repositories 140 (lowered priority) : 1 repository 150 (lowered priority) : 4 repositories # | Alias | Name | Enabled | GPG Check | Refresh | URI ---+---------+------------------------------------+---------+-----------+---------+------------------------------------------------------------------------- 1 | DVD | boot:Leap-42.3-DVD | Yes | (r ) Yes | No | iso:///?iso=openSUSE-Leap-42.3-DVD-x86_64.iso&url=dir%3A%2Fboot%2Fiso 2 | NOSS | SUSE:Leap-42.3-NonOSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/42.3/repo/non-oss/ 3 | OSS | SUSE:Leap-42.3-OSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/42.3/repo/oss/ 4 | dbNO | SUSE:Leap-42.3-Debug-NonOSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/debug/distribution/leap/42.3/repo/non-oss/ 5 | dbO | SUSE:Leap-42.3-Debug-OSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/debug/distribution/leap/42.3/repo/oss/ 6 | dbuNO | SUSE:Leap-42.3-Debug-Update-NonOSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/debug/update/leap/42.3/non-oss/ 7 | dbuO | SUSE:Leap-42.3-Debug-Update-OSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/debug/update/leap/42.3/oss/ 8 | packman | RWTH:Leap-42.3-Packman | Yes | (r ) Yes | Yes | http://ftp.halifax.rwth-aachen.de/packman/suse/openSUSE_Leap_42.3/ 9 | sNOSS | SUSE:Leap-42.3-Source-NonOSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/source/distribution/leap/42.3/repo/non-oss/ 10 | sOSS | SUSE:Leap-42.3-Source-OSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/source/distribution/leap/42.3/repo/oss/ 11 | uNOSS | SUSE:Leap-42.3-Update-NonOSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/42.3/non-oss/ 12 | uOSS | SUSE:Leap-42.3-Update-OSS | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/42.3/oss/ 13 | uT | SUSE:Leap-42.3-Update-Test | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/42.3-test/ linux-2iyu:~ # zypper ref Repository 'boot:Leap-42.3-DVD' is up to date. Repository 'SUSE:Leap-42.3-NonOSS' is up to date. Repository 'SUSE:Leap-42.3-OSS' is up to date. Repository 'SUSE:Leap-42.3-Debug-NonOSS' is up to date. Repository 'SUSE:Leap-42.3-Debug-OSS' is up to date. Repository 'SUSE:Leap-42.3-Debug-Update-NonOSS' is up to date. Repository 'SUSE:Leap-42.3-Debug-Update-OSS' is up to date. Repository 'RWTH:Leap-42.3-Packman' is up to date. Repository 'SUSE:Leap-42.3-Source-NonOSS' is up to date. Repository 'SUSE:Leap-42.3-Source-OSS' is up to date. Repository 'SUSE:Leap-42.3-Update-NonOSS' is up to date. Repository 'SUSE:Leap-42.3-Update-OSS' is up to date. Repository 'SUSE:Leap-42.3-Update-Test' is up to date. All repositories have been refreshed. linux-2iyu:~ # zypper info libzypp Loading repository data... Reading installed packages... Information for package libzypp: -------------------------------- Repository : SUSE:Leap-42.3-Update-OSS Name : libzypp Version : 16.15.6-12.1 Arch : x86_64 Vendor : openSUSE Installed Size : 7.4 MiB Installed : Yes Status : up-to-date Source package : libzypp-16.15.6-12.1.src Summary : Package, Patch, Pattern, and Product Management Description : Package, Patch, Pattern, and Product Management -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640
http://bugzilla.opensuse.org/show_bug.cgi?id=1057640#c11
--- Comment #11 from Tony Mechelynck
participants (1)
-
bugzilla_noreply@novell.com