Another package management question when using script - opensuse 12.3

Hello.
I use Adobe reader as sample for my question.
For this sample both methods use a local repo on my laptop.
In a script, when I use this command :

package-manager --install /full/path/to/AdbeRdr9.5.4-1_i486linux_enu.rpm

I get a question about installing some missing libraries (about 20). And if I accept, the installation goes to the end of the install process with success.
If I use :

zypper in --repo zypper_local  --force-resolution  AdobeReader_enu

I get a warning for one missing lib (probably first encountered) and the process stops.
It seems, at first impression, that the first method is better?
Is it possible to give to zypper the same behaviour?

So both YaST and Zypper use the same backend libzypp and so its the same guy is doing both tasks. The two commands are not the same as the first loads a local rpm file in which the required files can be found in your repositories. In the second, you are loading a file from a specific repository. If you just used “zypper in application_name”, you might find this works OK as well. I suggest you are not comparing apples to apples with these two command strings, but in all cases, stick with what works is always my suggestion.

Thank You,

the difference between the commands is that the latter ONLY looks in the repo zypper_local for all packages. if one of the missing libs isn’t there, install fails. change “–repo zyper_local” to “–from zypper_local” and it should work as you’d expect.


man zypper
(.....)
-r, --repo <alias|name|#|URI>
              Work  only with the repository specified by the alias, name, number or URI. This option can
              be used multiple times.

--from <alias|name|#|URI>
              Select packages from specified repository. If strings specified as arguments to the install
              command match packages in repositories specified in this option, they will  be  marked  for
              installation. This option currently implies --name, but allows using wildcards for specify-
              ing packages.

Thank you for your help.