Re: how to get a specfile from an RPM

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

 



Jonathan Dieter wrote:
> On Wed, 2007-08-15 at 16:59 +0800, Ed Greshko wrote:
>> Jos Vos wrote:
>>> On Wed, Aug 15, 2007 at 08:16:36AM +0800, Ed Greshko wrote:
>>>
>>>> And you can do it simply by...
>>>>
>>>> rpm2cpio whatever-package.src.rpm | cpio -i *spec
>>> Correct, but better quote it (use '*.spec'), as there might be files
>>> matching *spec in your current directory and then it mostly won't
>>> work as expected ;-).
>> I don't think the quotes are needed, although they couldn't hurt.  The *spec
>> is a parameter to cpio telling it what files to extract so I don't think
>> having another .spec in your directory will hurt.  In fact, I tried it both
>> quoted and unquoted with another spec file in my current directory and the
>> results are the same.  Care to share your concern?
>>
> I think the concern is that if you have foo.spec in your current
> directory and you try doing:
> 
> rpm2cpio bar.src.rpm | cpio -i *spec
> 
> bash will turn *spec into foo.spec, which cpio will then try to extract
> from the archive (which wouldn't exist in this example).
> 
> If you don't have any .spec files in the current directory, bash will
> just send *spec to cpio, which will handle it the expected way.

Ooops...  You know you are right.  I had the above as an alias and didn't
check the alias to notice that indeed it I had quoted it, as a variable.

Duh....


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux