Re: Fedora 7 Update: vim-7.1.12-1.fc7

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

 



Tim wrote:
Tim:
Don could parse the whole update message.
Don Russell:
Yes, I'm giving that some thought... I'm not sure of exactly how to parse the text after the checksum.... the dash (-) is not a consistent delimiter between package name, version, release. That's why I did not try to parse the subject line in the first place, the body has things spelled out near the beginning... alas, it's describing the SOURCE... :-(

Don't you need the whole name "vim-whatever", not just "whatever"?

So, if I can grab thelist of packages at the end of the e-mail, then perhaps parse right to left, by dash, into three parts....
i.e. vim-enhanced-v.v.v-r.r.r
Break that into (right to left: r.r.r, v.v.v and what ever is left after that is the package name to see if I have it installed.

Looking at some of the message contents:

8220d63dc07defafcd8c2f669685ee9643233a8a vim-debuginfo-7.1.12-1.fc7.i386.rpm

How about, presuming all the checksums are the same length, there's a
blank space between it and package names, using the whole packagename.

Of course you'd need to look for lines with them both together.

I need to determine where the package name ends, and the version/release begins:
Ref your example: vim-debuginfo-7.1.12-1.fc7.i386.rpm

I want to issue "rpm -q vim-debuginfo" to determine whether this item matters to me.

The first dash (left to right) can't be relied upon to indicate the end of the name... that would get me "vim" in this case, instead of the desired "vim-debuginfo".

However, there always seems to be three pieces: name-version-release, where "name" includes zero or more dashes. Since the version and release do not contain dashes, parsing right to left should solve the problem:

right to left, stopping at the dash gets me the release -> 1.fc7.i386.rpm
continuing to the next dash gets the version -> 7.1.12
everything else (right to left to the space ending the checksum) is the name to use with rpm -q. vim-debuginfo



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

  Powered by Linux