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

Thread: zypper inr -- huh?

  1. #1
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Question zypper inr -- huh?

    Hello.

    I was reading through https://en.opensuse.org/SDBypper_usage when i found the info about:
    install-new-recommends or inr

    This command finds and installs newly added recommended packages for packages you have already installed. This provides an easy way to get new language bundles for your software or drivers for newly added hardware.
    Curious, i tried it in my Tower's 20170904 TW snapshot. I am quite amazed by the result:
    Code:
    gooeygirl@linux-Tower:~> zypper inr                                                                                                                               
    Loading repository data...                                                                                                                                       
    Reading installed packages...                                                                                                                                    
    Resolving package dependencies...                                                                                                                                
                                                                                                                                                                     
    The following 8 NEW packages are going to be installed:                                                                                                          
      clutter-gtk-lang clutter-lang folks-lang goocanvas-lang libgoocanvas-2_0-9 libgtop-2_0-11 libgtop-lang python3-ndg-httpsclient                                 
    
    
    8 new packages to install.
    Overall download size: 930.7 KiB. Already cached: 0 B. After the operation, additional 4.5 MiB will be used.
    Continue? [y/n/...? shows all options] (y): 
    Retrieving package clutter-gtk-lang-1.8.4-2.1.noarch                                                                        (1/8),  22.3 KiB (  1.8 KiB unpacked)
    Retrieving: clutter-gtk-lang-1.8.4-2.1.noarch.rpm .........................................................................................................[done]
    Retrieving package clutter-lang-1.26.2-2.1.noarch                                                                           (2/8), 415.1 KiB (  2.4 MiB unpacked)
    Retrieving: clutter-lang-1.26.2-2.1.noarch.rpm ..............................................................................................[done (231.2 KiB/s)]
    Retrieving package folks-lang-0.11.4-2.1.noarch                                                                            (3/8), 169.6 KiB (1020.1 KiB unpacked)
    Retrieving: folks-lang-0.11.4-2.1.noarch.rpm ..................................................................................................[done (4.5 KiB/s)]
    Retrieving package python3-ndg-httpsclient-0.4.0-2.1.noarch                                                                 (4/8),  49.5 KiB (181.9 KiB unpacked)
    Retrieving: python3-ndg-httpsclient-0.4.0-2.1.noarch.rpm ........................................................................................[done (968 B/s)]
    Retrieving package libgoocanvas-2_0-9-2.0.3-1.1.x86_64                                                                      (5/8), 108.2 KiB (308.5 KiB unpacked)
    Retrieving: libgoocanvas-2_0-9-2.0.3-1.1.x86_64.rpm .........................................................................................[done (143.2 KiB/s)]
    Retrieving package libgtop-2_0-11-2.38.0-1.1.x86_64                                                                         (6/8),  53.1 KiB (113.4 KiB unpacked)
    Retrieving: libgtop-2_0-11-2.38.0-1.1.x86_64.rpm ..........................................................................................................[done]
    Retrieving package goocanvas-lang-2.0.3-1.1.noarch                                                                          (7/8),  46.4 KiB (250.6 KiB unpacked)
    Retrieving: goocanvas-lang-2.0.3-1.1.noarch.rpm .................................................................................................[done (977 B/s)]
    Retrieving package libgtop-lang-2.38.0-1.1.noarch                                                                           (8/8),  66.5 KiB (242.0 KiB unpacked)
    Retrieving: libgtop-lang-2.38.0-1.1.noarch.rpm ..............................................................................................[done (139.1 KiB/s)]
    Checking for file conflicts: ..............................................................................................................................[done]
    Warning: Checking for file conflicts requires not installed packages to be downloaded in advance in order to access their file lists. See option '--download-in-advance' in the zypper manual page for details.
    
    
    The following 8 packages had to be excluded from file conflicts check because they are not yet downloaded:
      clutter-gtk-lang clutter-lang folks-lang python3-ndg-httpsclient libgoocanvas-2_0-9 libgtop-2_0-11 goocanvas-lang libgtop-lang
    
    
    Retrieving package clutter-gtk-lang-1.8.4-2.1.noarch                                                                        (1/8),  22.3 KiB (  1.8 KiB unpacked)
    (1/8) Installing: clutter-gtk-lang-1.8.4-2.1.noarch ......................................................................................................[error]
    Installation of clutter-gtk-lang-1.8.4-2.1.noarch failed:
    Error: Subprocess failed. Error: RPM failed: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Inappropriate ioctl for device)
    
    
    
    
    Abort, retry, ignore? [a/r/i] (a):
    I can't get my mind around the practical purpose of this command. It thinks it identifies missing packages, warns me it cannot pre-assess their compatibility, downloads them & tries to install them but then discovers that in fact they are incompatible, necessitating me to abort. So, what's the point? It seems to have been an entirely useless thing to bother with this command. What am i misunderstanding? Is it, maybe, a command intended for Leap not TW?

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,699
    Blog Entries
    1

    Default Re: zypper inr -- huh?

    I don't mess around with that particular option. I generally just install the required package and any dependencies that may come with it. I don't come to the same conclusion that you did though....


    Code:
    Warning: Checking for file conflicts requires not installed packages to be downloaded in advance in order to access their file lists. See option '--download-in-advance' in the zypper manual page for details.
    
    
    The following 8 packages had to be excluded from file conflicts check because they are not yet downloaded:
      clutter-gtk-lang clutter-lang folks-lang python3-ndg-httpsclient libgoocanvas-2_0-9 libgtop-2_0-11 goocanvas-lang libgtop-lang
    
    
    Retrieving package clutter-gtk-lang-1.8.4-2.1.noarch                                                                        (1/8),  22.3 KiB (  1.8 KiB unpacked)
    (1/8) Installing: clutter-gtk-lang-1.8.4-2.1.noarch ......................................................................................................[error]
    Installation of clutter-gtk-lang-1.8.4-2.1.noarch failed:
    Error: Subprocess failed. Error: RPM failed: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Inappropriate ioctl for device)
    This just means that zypper needed to download the packages listed in order for the solver to determine if there will be any incompatibilities. Of course, you never followed through....

  3. #3
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: zypper inr -- huh?

    OK, thank you.

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,699
    Blog Entries
    1

    Default Re: zypper inr -- huh?

    I do find this message misleading (contradictory) though, as they are downloaded already at the time the message comes...that would be a bug IMHO
    Code:
    The following 8 packages had to be excluded from file conflicts check because they are not yet downloaded:
       clutter-gtk-lang clutter-lang folks-lang python3-ndg-httpsclient libgoocanvas-2_0-9 libgtop-2_0-11 goocanvas-lang libgtop-lan

  5. #5
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: zypper inr -- huh?

    Code:
    zypper inr
    is useful when installing nvidia drivers (TW finally got an official nvidia driver) and you're not sure what driver you need (G02 G03 or G04)
    personally I do not use it as it might pull recommended packages I've uninstalled it does it's job good and it's a must on some systems

  6. #6
    Join Date
    Sep 2012
    Posts
    7,096

    Default Re: zypper inr -- huh?

    Quote Originally Posted by GooeyGirl View Post
    tries to install them but then discovers that in fact they are incompatible, necessitating me to abort
    Where have you got this idea from? It tries to install and gets error creating lock file. This is not surprising seeing that you run zypper as non-root user. I would actually expect it to fail earlier though, when it downloads packages, but well, I do not openSUSE at hand to check directory permissions.

  7. #7
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: zypper inr -- huh?

    Quote Originally Posted by arvidjaar View Post
    Where have you got this idea from? It tries to install and gets error creating lock file. This is not surprising seeing that you run zypper as non-root user. I would actually expect it to fail earlier though, when it downloads packages, but well, I do not openSUSE at hand to check directory permissions.
    Oh? The error msg denotes nothing more significant than non-root privileges? I had no idea that this:
    Code:
    [error]
    Installation of clutter-gtk-lang-1.8.4-2.1.noarch failed:
    Error: Subprocess failed. Error: RPM failed: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Inappropriate ioctl for device)
    ...had such a trivial meaning. Why does the msg not MUCH more explicitly indicate this? For example, here's what occurs if i try two commonplace zypper commands sans-sudo:
    Code:
    gooeygirl@linux-Tower:~> zypper refresh
    Root privileges are required for refreshing system repositories.
    gooeygirl@linux-Tower:~> 
    
    
    gooeygirl@linux-Tower:~> zypper in vivaldi-stable
    Root privileges are required for installing or uninstalling packages.
    gooeygirl@linux-Tower:~>
    The difference is chalk & cheese; not only are there unambiguous explanatory words, but they are additionally coloured red for even more obvious focus on the root-cause. Furthermore, in those two examples the clear feedback of a user-error occurs ONE line later, ie, it is "instant", whereas in the case i posted about, the first feedback given to the user of an error she made is not until THIRTY NINE lines after the initial command.

    Yes, it is true that i carelessly ran "zypper inr" without sudo [because i forgot], but when it responded without the anticipated msg, & seemed to be proceeding, i then assumed [wrongly] that for whatever reason it was happy without sudo [which i agree would have been very strange].

    So, yes, i made an error... but zypper's behaviour did not help me like [IMO] it should, & like would be consistent with its other commands.

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,699
    Blog Entries
    1

    Default Re: zypper inr -- huh?

    Quote Originally Posted by GooeyGirl View Post
    Yes, it is true that i carelessly ran "zypper inr" without sudo [because i forgot], but when it responded without the anticipated msg, & seemed to be proceeding, i then assumed [wrongly] that for whatever reason it was happy without sudo [which i agree would have been very strange].

    So, yes, i made an error... but zypper's behaviour did not help me like [IMO] it should, & like would be consistent with its other commands.
    The downloading requires no root privileges, but to install obviously does. I agree that message could be a little more explicit, but ultimately it's a reflection of the failure that occurs when attempting to write to /var/lib/rpm/.rpm.lock due to file permissions...
    Code:
    ls -l /var/lib/rpm/.rpm.lock
    -rw-r--r-- 1 root root 0 Oct 30  2015 /var/lib/rpm/.rpm.lock
    FWIW, running 'zypper inr' as user in openSUSE Leap 42.3 gives the following slightly different message...
    Code:
    Error: Subprocess failed. Error: RPM failed: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)

  9. #9

    Default Re: zypper inr -- huh?

    There's a few options for zypper inr that were missed in this thread. sudo zypper inr -D does a "dry run", -d will download only, --details will show you the detailed installation summary, among other options:

    Code:
    @localhost:~> sudo zypper inr --help
    install-new-recommends (inr) [options]
    
    Install newly added packages recommended by already installed packages. This can typically be used to install new language packages or drivers for newly added hardware.
    
      Command options:
    -r, --repo <alias|#|URI>    Load only the specified repositories.
    -D, --dry-run               Test the installation, do not actually install.
        --details               Show the detailed installation summary.
        --download              Set the download-install mode. Available modes:
                                only, in-advance, in-heaps, as-needed
    -d, --download-only         Only download the packages, do not install.
    
      Solver options:
    
        --debug-solver          Create a solver test case for debugging.
        --force-resolution      Force the solver to find a solution (even an
                                aggressive one) rather than asking.
        --no-force-resolution   Do not force the solver to find solution, let it
                                ask.

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,699
    Blog Entries
    1

    Default Re: zypper inr -- huh?

    That's because the thread wasn't concerned about the options available. The OP was specifically querying the error messages produced, including the one that comes from running it as user.

Page 1 of 2 12 LastLast

Posting Permissions

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