On Thu, Apr 11, Michael Andres wrote:

> Sorry, but I don't get if you are actually interested in downloading all 
> these 
> rpms, or if it would be sufficient to parse the todo list from zyppers xml 
> output:
> 
>     # create an 'empty system' /tmp/foo
>     rm -rf /tmp/foo
>     mkdir /tmp/foo
> 
>     # add your repos to /tmp/foo
>     zypper --root /tmp/foo ar \
>       http://download.opensuse.org/distribution/12.2/repo/oss oss
> 
>     # install
>     zypper --root /tmp/foo --xml install --dry-run bash... 
> 
> Unless you actually installed packages below /tmp/foo, the system there is 
> empty and the xml output contains a <to-install> node which conatins a list 
> of <solvable> nodes for all items to be installed:
> 
> <to-install>
>   <solvable type="package" name="bash" edition="4.2-51.6.1" arch="x86_64"
>             summary="The GNU Bourne-Again Shell">description</solvable>
>   ...
> </to-install>

Thanks, that goes into the right direction.

I want the reuse the files from installed packages. For this its
required to know what other installed packages 'bash' for example needs.

This way I get to the list I would like to have, with an empty --root:

env -u LANG LC_ALL=C zypper \
        --root $PWD/tmp/root \
        --reposd-dir /etc/zypp/repos.d \
        --cache-dir tmp/cache-dir \
        --pkg-cache-dir tmp/pkg_cache_dir \
        --gpg-auto-import-keys \
        --non-interactive \
        --xml \
        install \
        --auto-agree-with-licenses \
        --dry-run \
        bash | awk '/^.solvable/ { print $3}' | cut -f 2 -d '"'
bash
bash-doc
bundle-lang-common-en
filesystem
glibc
info
libbz2-1
liblzma5
libncurses5
libreadline6
libzio
ncurses-utils
readline-doc
terminfo-base
zlib


Is there an easy way to get the same list of packages with just the rpm
database?

Olaf
-- 
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to