Displaying information on non-installed RPM package?

后端 未结 7 1468
广开言路
广开言路 2021-01-30 19:40

I googled for this, but couldn\'t find how to query a non-installed RPM file for its information:

# rpm -qa blackfin-jtag-tools-09r1.1-2.i386.rpm
# 
# rpm -qi bl         


        
相关标签:
7条回答
  • 2021-01-30 19:55

    Related - Display Infos For Installed Package :

    rpm -qi InstalledPackageName
    
    0 讨论(0)
  • 2021-01-30 19:59

    @crazyscot did answer the question. Thanks.

    Additionally, I found that specific querytags can also be leveraged this way, which wasn't obvious from reading the man page. So, for example, I found I can do the following:

        rpm -qp --queryformat '%{ARCH}\n' foo.rpm
    

    or, even:

        xyz="ARCH";  rpm -qp --qf %{${xyz}}  foo.rpm; echo ""
    

    This works nicely for RPM's that are not installed, and leveraging the available querytags in the installed rpm

    Here is more information about tags

    0 讨论(0)
  • 2021-01-30 20:01

    When rpm is not-installed then (this will list the complete info, plus the list of contents in the package);

    rpm -qipl <rpm_name.rpm> 
    

    When rpm is installed then;

    rpm -qi <rpm_name.rpm>
    

    For more on rpm-queries. For more on handy-queries.

    0 讨论(0)
  • 2021-01-30 20:02

    there are lot of -i option used in above answers , best way to check :

    For one rpms,

    rpm -qlp <rpm-name>.rpm

    For all rpms , search for your file with grep :

    rpm -qpl *.rpm|grep <string or file name>

    0 讨论(0)
  • 2021-01-30 20:13
    less <rpm_name.rpm>
    

    Displays all that I need, same as 'rpm -qlpv'.
    Very good resource: https://blog.packagecloud.io/eng/2015/10/13/inspect-extract-contents-rpm-packages/ .

    0 讨论(0)
  • 2021-01-30 20:15

    rpm -qip foo.rpm

    0 讨论(0)
提交回复
热议问题