Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: zypper & yast

  1. #1
    stockersky NNTP User

    Default zypper & yast

    Hello,

    My name's Guillaume, former french - so excuse my English - , I am not a new Linux user, however i just started to use opensuse and it sounds great.
    I used Debian for years and decided to just give a try to something different.

    My question is about packages management.
    I understand you can use zypper (that i prefer - i'll compare it to debian apt) or yast (the graphical - i'll compare it to the ubuntu graphical stuff.).

    Recently i wanted to use banshee to put my media collection and it bugged. It appears there is a bug on banshee 1.4.1.
    So i added the banshee repo (with yast). Then zypper refresh and the zypper up banshee-1.
    And everything it said nothing to update.
    Then i started the yast graphical software manager and i can see many update available...

    I really don't understand ???? i know there something about upgrading patch or package (i red the doc) but i'm a bit lost in there....
    Can u giv me some help please???

  2. #2
    stockersky NNTP User

    Default Re: zypper & yast

    Hello,

    i just did the upgrade with yast : it upgraded many stuff .
    now banshee is 1.4.3-1.2.1 and i first sight, i works.

    But it still don't understand this zypper/yast stuff.
    for me yast seemed to be the front end to zypper. Like apt/aptitude with ubuntu....

    Someone could explain me?

  3. #3
    Join Date
    Jun 2008
    Location
    wichita
    Posts
    921

    Default Re: zypper & yast

    Run
    Code:
    zypper ref
    to refresh/update the repos before you try to update.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: zypper & yast

    Actually YaST and zypper are front-ends to the libzypp library. You can do the same things in zypper as in YaST, but as pointed out, you have to do all the things that YaST does too to get the same result, in this case a refresh. Some things happen asynchronously, so it could be that the first time you did a refresh, it wasn't ready for you yet.

  5. #5

    Default Re: zypper & yast

    Quote Originally Posted by ken_yap View Post
    ...but as pointed out, you have to do all the things that YaST does too to get the same result, in this case a refresh.
    Nope, a zypper up/dup automatically takes care of the refresh and updates the repos if new metadata is available.

    Code:
    # zypper dup
    Retrieving repository 'Packman repository (openSUSE_11.1)' metadata [done]
    Building repository 'Packman repository (openSUSE_11.1)' cache [done]
    Loading repository data...
    Reading installed packages...
    Computing distribution upgrade...
    Works for me™ (openSUSE 11.1).

  6. #6

    Default Re: zypper & yast

    Quote Originally Posted by Akoellh View Post
    Nope, a zypper up/dup automatically takes care of the refresh and updates the repos if new metadata is available.
    Each repo has an "autorefresh" parameter. zypper up will only refresh the repos that are configured to do so.
    And...
    # LC_ALL=C zypper ar -r 'http://download.opensuse.org/repositories/Banshee/openSUSE_11.1/Banshee.repo'
    Adding repository 'Banshee Media Player (openSUSE_11.1)' [done]
    Repository 'Banshee Media Player (openSUSE_11.1)' successfully added
    Enabled: Yes
    Autorefresh: No
    URI: Index of /repositories/Banshee/openSUSE_11.1
    I'm not sure if it's also disabled by default if you add it through other ways.

    But YaST should also refresh ONLY the repositories configured to do so. If it's refreshing all of them it's a bug.


    So yes, YaST and zypper should behave equal. The thing is "zypper up" will not update to any newer version available.
    For a package to be updated through zypper up:
    - A newer version must be available.
    - This version must have the same Vendor.
    - The repository where the new version is available must have an equal or greater priority than the repository from where the installed version is available.

    Note that zypper dup ignores the Vendor condition. But it's different, it isn't supposed to be used for normal updates.

  7. #7

    Default Re: zypper & yast

    There is also a timing parameter to be considered:

    Code:
    ##
    ## Amount of time in minutes that must pass before another refresh.
    ##
    ## Valid values: Integer
    ## Default value: 10
    ##
    ## If you have autorefresh enabled for a repository, it is checked for
    ## up-to-date metadata not more often than every <repo.refresh.delay>
    ## minutes. If an automatic request for refresh comes before <repo.refresh.delay>
    ## minutes passed since the last check, the request is ignored.
    ##
    ## A value of 0 means the repository will always be checked. To get the oposite
    ## effect, disable autorefresh for your repositories.
    ##
    ## This option has no effect for repositories with autorefresh disabled, nor for
    ## user-requested refresh.
    ##
    # repo.refresh.delay = 10

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: zypper & yast

    Quote Originally Posted by Akoellh View Post
    Nope, a zypper up/dup automatically takes care of the refresh and updates the repos if new metadata is available.
    You are assuming that zypper is always run as root. Some zypper operations can be run as a normal user. If you do a zypper lu, and the repo cache is out of date it will warn you. But if it is not out of date you can get useful information out of it.

    Not everything has to be run as root all the time. People get stuck into this mentality that e.g. you have to run ifconfig, route or arp as root, because they are in /sbin, or they have only ever seen it run as root. In fact, a good subset of the functionality is available to ordinary users.

  9. #9

    Default Re: zypper & yast

    Quote Originally Posted by ken_yap View Post
    You are assuming that zypper is always run as root. Some zypper operations can be run as a normal user.
    Well, I explicitly mentioned zypper up/dup and running those commands as non-root would not really make sense.

    There is also a weakness or how shall I call it about some zyppper commands not being run as root, especially "zypper se"-commands.

    At some time (I really couldn't figure out which time span) after the last refresh, I don't get a warning any more but zypper even refuses to perform zypper se as non-root user and just exits with a remark that the metadata is too old.

    //Edit:

    I'm not talking about this here:

    Code:
     zypper se -s compal-laptop-kmp-default
    Repository 'openSUSE-11.1-Update-test' is out-of-date. You can run 'zypper refresh' as root to update it.
    Loading repository data...
    Reading installed packages...
    
    S | Name                      | Type    | Version                 | Arch   | Repository                                   
    --+---------------------------+---------+-------------------------+--------+----------------------------------------------
    i | compal-laptop-kmp-default | package | 0.2.9_2.6.27.21_0.1-1.1 | x86_64 | Akoellh's Home Project (openSUSE_11.1_Update)
    v | compal-laptop-kmp-default | package | 0.2.9_2.6.27.21_0.1-1.1 | i586   | Akoellh's Home Project (openSUSE_11.1_Update)
    this is the "normal" warning when metadata is out of date.

    I will post the respective message when I get the behaviour described above.


    But of course using root only when absolutely necessary should be "best practice" with all commands.

  10. #10
    stockersky NNTP User

    Question Re: zypper & yast

    Hello and thanks to all these replies!!!

    Yes i fugure out that zypper is the CLI and yast the GUI and they use the same libraries but look at this :

    stocker:~ # zypper ref
    Repository 'repBanshee' is up to date.
    Repository 'NVIDIA Repository' is up to date.
    Repository 'openSUSE-11.1-Non-Oss' is up to date.
    Repository 'openSUSE-11.1-Oss' is up to date.
    Repository 'openSUSE-11.1-Update' is up to date.
    Repository 'VideoLan Repository' is up to date.
    Repository 'Packman Repository' is up to date.
    All repositories have been refreshed.
    stocker:~ # zypper lr -P
    # | Alias | Name | Enabled | Refresh | Priority
    ---+-----------------+-----------------------+---------+---------+---------
    8 | repo-update | openSUSE-11.1-Update | Yes | Yes | 20
    2 | repBanshee | repBanshee | Yes | Yes | 98
    1 | openSUSE 11.1-0 | openSUSE 11.1-0 | No | No | 99
    3 | repo | NVIDIA Repository | Yes | Yes | 99
    9 | repo_1 | VideoLan Repository | Yes | Yes | 99
    10 | repo_2 | Packman Repository | Yes | Yes | 99
    4 | repo-debug | openSUSE-11.1-Debug | No | No | 100
    5 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | Yes | 100
    6 | repo-oss | openSUSE-11.1-Oss | Yes | Yes | 100
    7 | repo-source | openSUSE-11.1-Source | No | No | 100
    stocker:~ # zypper up
    Loading repository data...
    Reading installed packages...
    Nothing to do.


    ====> conclusion : everythin is up to date!!! ... at least for zypper...

    But if i use Yast and go to "software manager" (i'm french so i translate) and look at the middle column (updates) i can find 21 updates available!!!
    And everything is in the aut-refresh mode!!! in the CLI and the GUI. I actually managed to add the new repo and option with the GUI and do the other task with the CLI...

    So what???

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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