@libzypp-14.21.0 currently abvailable in obs://build.opensuse.org/zypp:Head 


Testing the latest changes regarding 'service handling' I created a local 
service for openSUSE. As it was quite inconvenient to manually edit the file, 
I hacked a simple form of variable substitution into libzypps repoindex 
parser:

 - (key,value) pairs are defined as atributes to the <repoindex> node
 - after definition %{key} occurring in any attribute value is expanded 
 - Within a <repo> additionally %{alias} is available after definition.

It's IMO not that bad, so I'm thinking about leaving this enabled.

Any concerns?




If you want to give it a try:

- create /{SOMEWHERE}/repo/repoindex.xml (see below)
- zypper as dir:///{SOMEWHERE} openSUSE
- zypper ref -s

After editing the repoindex.xml you need an explicit 'zypper ref -s' unless 
you have turned on autorefresh for the openSUSE service.


Note @repo/distro_target: 

If defined, the option hides the repo if it is not matching the currently 
installed distro. Basically you could have repos for "openSUSE-12.3-x86_64" 
and "openSUSE-13.1-x86_64" in one service. Repos without 'distro_target' (or 
an empty one) are visible on all systems. 


Note @migrating to a 13.2:

Without using the 'distro_target' it should simply be
                distver="13.2"
             disttarget=""
Provided 13.2 will use the same repo structure this ('zypper ref -s') will 
switch all repos to 13.2.


With 'distro_target' it's more complicated because before a 'zypper dup' you'd 
need:
                distver="13.2"
             disttarget="openSUSE-13.1-x86_64"
But after the dup again:
                distver="13.2"
             disttarget="openSUSE-%{distver}-x86_64"
(actually after the openSUSE-release package got updated. The 
new /etc/products.d/openSUSE.prod file changes the distro version)

=====[/Local/Service/repo/repoindex.xml]========================================
<repoindex      disturl="http://download.opensuse.org";
                distver="13.1"
             disttarget="openSUSE-%{distver}-x86_64"
            debugenable="false"
           sourceenable="false">

  <repo url="%{disturl}/distribution/%{distver}/repo/oss"
                alias="repo-oss"
                 name="%{alias} (%{distver})"
              enabled="true"
          autorefresh="true"
        distro_target="%{disttarget}"/>

  <repo url="%{disturl}/update/%{distver}"
                alias="repo-oss-update"
                 name="%{alias} (%{distver})"
              enabled="true"
          autorefresh="true"
        distro_target="%{disttarget}"/>


  <repo url="%{disturl}/distribution/%{distver}/repo/non-oss"
                alias="repo-non-oss"
                 name="%{alias} (%{distver})"
              enabled="true"
          autorefresh="true"
        distro_target="%{disttarget}"/>

  <repo url="%{disturl}/update/%{distver}-non-oss"
                alias="repo-non-oss-update"
                 name="%{alias} (%{distver})"
              enabled="true"
          autorefresh="true"
        distro_target="%{disttarget}"/>


  <repo url="%{disturl}/debug/distribution/%{distver}/repo/oss"
                alias="repo-debug"
                 name="%{alias} (%{distver})"
              enabled="%{debugenable}"
          autorefresh="true"
        distro_target="%{disttarget}"/>

  <repo url="%{disturl}/debug/update/13.1"
                alias="repo-debug-update"
                 name="%{alias} (%{distver})"
              enabled="%{debugenable}"
          autorefresh="true"
        distro_target="%{disttarget}"/>

  <repo url="%{disturl}/debug/update/13.1-non-oss"
                alias="repo-debug-update-non-oss"
                 name="%{alias} (%{distver})"
              enabled="%{debugenable}"
          autorefresh="true"
        distro_target="%{disttarget}"/>


  <repo url="%{disturl}/source/distribution/%{distver}/repo/oss"
                alias="repo-source"
                 name="%{alias} (%{distver})"
              enabled="%{sourceenable}"
          autorefresh="true"
        distro_target="%{disttarget}"/>

</repoindex>
=====[/Local/Service/repo/repoindex.xml]========================================

-- 

cu,
    Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862  27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres   SUSE LINUX Products GmbH, Development,   m...@suse.de
GF:Jeff Hawn,Jennifer Guild,Felix Imend├Ârffer, HRB16746(AG N├╝rnberg) 
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to