Results 1 to 4 of 4

Thread: How to use variables in a _service file

  1. #1

    Default How to use variables in a _service file

    Hi all,

    I search through the docs but could not find any info on this.

    Is it possible to use variables (possible from some sourced file) in the _service file?

    for example:
    Code:
    <services>¬
      <service name="download_url">¬
         <param name="host">commondatastorage.googleapis.com</param>¬
         <param name="protocol">https</param>¬
         <param name="path">/chromium-browser-official/chromium-${MY_CURRENT_VER}.tar.xz</param>
       </service>¬
    </services>
    Where MY_CURRENT_VER is a variable stored in another file?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,819
    Blog Entries
    15

    Default Re: How to use variables in a _service file

    Quote Originally Posted by jmandawg View Post
    Hi all,

    I search through the docs but could not find any info on this.

    Is it possible to use variables (possible from some sourced file) in the _service file?

    for example:
    Code:
    <services>¬
      <service name="download_url">¬
         <param name="host">commondatastorage.googleapis.com</param>¬
         <param name="protocol">https</param>¬
         <param name="path">/chromium-browser-official/chromium-${MY_CURRENT_VER}.tar.xz</param>
       </service>¬
    </services>
    Where MY_CURRENT_VER is a variable stored in another file?
    Hi
    You can define your variables in the project config file.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How to use variables in a _service file

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You can define your variables in the project config file.
    Thanks, is there any way to do it at the package level?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,819
    Blog Entries
    15

    Default Re: How to use variables in a _service file

    Quote Originally Posted by jmandawg View Post
    Thanks, is there any way to do it at the package level?
    Hi
    Not that I'm aware of.... But you can just put the version number in the service file?

    I would look here for some info: https://build.opensuse.org/projects/...actory/prjconf esp with macros, defines etc.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •