Results 1 to 7 of 7

Thread: What's the zypper command to rename a repository name?

  1. #1
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default What's the zypper command to rename a repository name?

    What's the zypper command to rename a repository name?
    Not yast.

  2. #2

    Default Re: What's the zypper command to rename a repository name?

    Hello colao,

    Quote Originally Posted by colao
    What's the zypper command to rename a repository name?
    Not yast.
    This command is literally from the zypper man page:
    Quote Originally Posted by Zypper man page
    renamerepo (nr) <alias|name|#|URI> <new-alias>
    So if you want to rename repo number 2 then you should use this command:
    Code:
    zypper nr 2 NewName
    Good luck!
    Where did I put my coffee cup?
    dir -R /home/* | grep "coffee cup"

  3. #3
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default Re: What's the zypper command to rename a repository name?

    Quote Originally Posted by Edward_Iii View Post
    Hello colao,


    This command is literally from the zypper man page:

    So if you want to rename repo number 2 then you should use this command:
    Code:
    zypper nr 2 NewName
    Good luck!
    This changes the alias not the name under Service name column.
    Try.

  4. #4

    Default Re: What's the zypper command to rename a repository name?

    Hello colao,

    Quote Originally Posted by colao
    This changes the alias not the name under Service name column.
    Try.
    You're right, wrong command.

    You should use this command:
    Code:
    zypper mr -n Name 1
    MR stands for ModifyRepo.
    The -n stands for name, the Name is the new name.
    The 1 is the number of the repo, you could also put the alias, the name or the URI here.

    Good luck!
    Where did I put my coffee cup?
    dir -R /home/* | grep "coffee cup"

  5. #5
    Join Date
    Jun 2008
    Location
    Kansas City, Missouri
    Posts
    114

    Default Re: What's the zypper command to rename a repository name?

    To change the name (alias) of a repository the zypper command is :

    renamerepo (nr) [options] <alias|#|URI> <new-alias>


    I use the repository number when I rename so I do :

    zypper lr

    Example output:

    $ zypper lr
    # | Alias | Name | Enabled | Refresh
    --+-----------------------+-----------------------+---------+--------
    1 | packman | Packman 11.1 | Yes | No
    2 | fate | fate | No | No
    3 | openSUSE-11.1-Updates | Updates for 11.1 | Yes | Yes
    4 | repo-oss | openSUSE-11.1-Oss | Yes | No
    5 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | No
    6 | repo-debug | openSUSE-11.1-Debug | No | No


    Then to rename (alias of) a repository, for example the repository number 4 | repo-oss in the list given by zypper lr above can be changed from "repo-oss" to "OSS" by:

    zypper nr 4 OSS
    " It wouldn't dare! " - Shaggyman



  6. #6
    Join Date
    Jun 2008
    Location
    Kansas City, Missouri
    Posts
    114

    Default Re: What's the zypper command to rename a repository name?

    In my reply I might not be clear on what was asked I guess. Change the alias nr. Change the display name mr.
    Last edited by difficilus; 16-Oct-2010 at 08:20. Reason: Correction.
    " It wouldn't dare! " - Shaggyman



  7. #7
    Carlos E. R. NNTP User

    Default Re: What's the zypper command to rename a repository name?

    On 2010-10-16 17:36, difficilus wrote:
    >
    > In my reply I might not be clear on what was asked I guess. Change the
    > alias nr. Change the display name mr.


    One detail: the directory name where the packages are cached goes after the alias of the repo, not
    the name. I don't know what happens to the contents of the directory if you change the alias.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Posting Permissions

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