Hide Forgot
Description of problem: When we use rpm-ostree pkg-add a non-exists RPM package, the rpm-ostree will download metadata firstly, it will take several minutes, and then user got a expected result "error: No package 'XXX' found", we should change the logic design of pkg-add packages and check if the RPM package exists firstly. Version-Release number of selected component (if applicable): [cloud-user@atomic-00 ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Atomic Host release 7.2 [cloud-user@atomic-00 ~]$ atomic host status State: idle Deployments: ● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard Version: 7.2.6-1 (2016-08-18 16:01:03) Commit: dae35767902aad07b087d359be20f234d244da79fdd4734cd2fbc3ee39b12cf8 OSName: rhel-atomic-host Unlocked: development [cloud-user@atomic-00 ~]$ rpm -q rpm-ostree-client ostree rpm-ostree-client-2016.9-1.atomic.el7.x86_64 ostree-2016.10-1.atomic.el7.x86_64 How reproducible: always Steps to Reproduce: 1. atomic host unlock 2. download rpm-ostree-client, ostree and time RPM packages and install them 3. time rpm-ostree pkg-add foobar Actual results: [cloud-user@atomic-00 ~]$ sudo time rpm-ostree pkg-add foobar Downloading metadata: [=================================================================================================================================================================] 100% error: No package 'foobar' found 0.00user 0.00system 9:54.15elapsed 0%CPU (0avgtext+0avgdata 7156maxresident)k 0inputs+0outputs (0major+1930minor)pagefaults 0swaps Expected results: Additional info: and the metadata eats about 300M disk space, how to clean up it? it's relationship w/ bug 1377516.
(In reply to Alex Jia from comment #0) > Description of problem: > When we use rpm-ostree pkg-add a non-exists RPM package, the rpm-ostree will > download metadata firstly, it will take several minutes, and then user got a > expected result "error: No package 'XXX' found", we should change the logic > design of pkg-add packages and check if the RPM package exists firstly. Or is it necessary to download metadata for checking if a RPM package exists? could we check it w/ remote ostree repo?
I don't believe it is possible to determine if a package does not exsit without querying the repo and downloading the metadata. It is similar to using yum/dnf where there has to be some metadata in place before you can determine if the package exists.
Based on Micah's comments setting as NOTABUG.