Re: what packages/files are in an ostree repo



On Wed, Jan 21, 2015, at 12:38 PM, Chris Murphy wrote:
Is there a way to find out what packages or files are in an ostree
repo without downloading the contents? 

Not...conveniently at the moment, but it is possible.  If you want just the RPM database
from a remote repo, it's stored in /usr/share/rpm, and it is possible
to use "ostree pull" to pull just that subpath:

Note you can run all of this as non-root, assuming you made an archive-z2 (or bare-user) repo like this:
$ mkdir repo
$ ostree --repo=repo init --mode=archive-z2
$ ostree --repo=repo remote add --set=gpg-verify=false localrhel http://127.0.0.1/repo
$ ostree --repo=repo pull --subpath=/usr/share/rpm localrhel rhel-atomic-host/7/x86_64/standard
7 metadata, 13 content objects fetched; 5862 KiB transferred in 1 seconds

(This webserver is localhost, but as you can see we just downloaded 5MB)


$ ostree --repo=repo ls -R rhel-atomic-host/7/x86_64/standard /usr/share/rpm
d00755 0 0      0 /usr/share/rpm
-00644 0 0 1196032 /usr/share/rpm/Basenames
-00644 0 0   8192 /usr/share/rpm/Conflictname
-00644 0 0 319488 /usr/share/rpm/Dirnames
-00644 0 0   8192 /usr/share/rpm/Group
-00644 0 0  12288 /usr/share/rpm/Installtid
-00644 0 0  24576 /usr/share/rpm/Name
-00644 0 0   8192 /usr/share/rpm/Obsoletename
-00644 0 0 17735680 /usr/share/rpm/Packages
-00644 0 0 1437696 /usr/share/rpm/Providename
-00644 0 0 143360 /usr/share/rpm/Requirename
-00644 0 0  40960 /usr/share/rpm/Sha1header
-00644 0 0  24576 /usr/share/rpm/Sigmd5
-00644 0 0   8192 /usr/share/rpm/Triggername
$ ostree --repo=repo checkout -U --subpath=/usr/share/rpm rhel-atomic-host/7/x86_64/standard rpmdb
$ rpm --dbpath=$(pwd)/rpmdb -qa|grep release
redhat-release-atomic-host-beta-7.1-20150113.0.atomic.el7.4.x86_64
$

For example
http://rpm-ostree.cloud.fedoraproject.org/repo/ I just see a bunch of
*filez objects but I have no idea if python-blivet is in the tree.

That repository is very old, and I'll likely delete it soon.  Use the Fedora Atomic 21 repository (and cloud 
image) as a reference.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]