Okay, so it's kind of late (early?) to be looking for gurus, but here's the bit. I'm trying to fabricate my own YaST-style package selection list (dren.sel). I started the Eval CD, and did: # rpm -qa > dren.sel Which is what I wanted to start with, 'cause it has a good selection of packages I want, and not too many that I don't want. Then I sorted it: # sort eval.sel > dren.sel Later on, I'll add the necessary header information, but for now, I need to strip the extra RPM version data from the file. It has a list of RPMs like this: WindowMaker-0.64.0-63 a2ps-4.13-74 aaa_base-2001.5.22-0 But I need a list like this: WindowMaker a2ps aaa_base So I need a quick and dirty way to strip every line of every "-[0,9]*" and keep the rest of the name intact. It's a bit tricker since some packages don't use underscores but hyphens to seperate parts of the package name, such as alsa-devel, which means you can't just strip everything past the first hypen. Whaddayathink? ===== -- -=|JP|=- Hit me! - http://www.xanga.com/cowboydren/ Jon Pennington | Debian 2.3 -o) cowboydren @ yahoo . com | Auto Enthusiast /\\ Kansas City, MO, USA | ICQ UIN 69 67 29 31 _\_V __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
On Thu, Oct 18, 2001 at 11:42:37PM -0700, Jon Pennington wrote:
Okay, so it's kind of late (early?) to be looking for gurus, but here's the bit. I'm trying to fabricate my own YaST-style package selection list (dren.sel). I started the Eval CD, and did:
# rpm -qa > dren.sel
Which is what I wanted to start with, 'cause it has a good selection of packages I want, and not too many that I don't want. Then I sorted it:
# sort eval.sel > dren.sel
Later on, I'll add the necessary header information, but for now, I need to strip the extra RPM version data from the file. It has a list of RPMs like this:
WindowMaker-0.64.0-63 a2ps-4.13-74 aaa_base-2001.5.22-0
But I need a list like this:
WindowMaker a2ps aaa_base
So I need a quick and dirty way to strip every line of every "-[0,9]*" and keep the rest of the name intact. It's a bit tricker since some packages don't use underscores but hyphens to seperate parts of the package name, such as alsa-devel, which means you can't just strip everything past the first hypen. Whaddayathink?
Kinda challenging thing. According to /sbin/conf.d/SuSEconfig.alljava even SuSE does not know how to do it properly, as the mentioned script chokes on IBMJava2-SDK truncating it to IBMJava2... -Kastus
===== -- -=|JP|=- Hit me! - http://www.xanga.com/cowboydren/ Jon Pennington | Debian 2.3 -o) cowboydren @ yahoo . com | Auto Enthusiast /\\ Kansas City, MO, USA | ICQ UIN 69 67 29 31 _\_V
--- "Konstantin (Kastus) Shchuka"
Kinda challenging thing. According to /sbin/conf.d/SuSEconfig.alljava even SuSE does not know how to do it properly, as the mentioned script chokes on IBMJava2-SDK truncating it to IBMJava2...
That script is fascinating, but I could write down on a Post-It note what I know about BASH. Is there a string in this script that can help me; I'm not above a little manual line fixing, but I don't feel like doing the whole thing by hand: sparkplug:~ # wc dren.sel 723 723 13191 dren.sel That's a lot of hand-work... ===== -- -=|JP|=- Hit me! - http://www.xanga.com/cowboydren/ Jon Pennington | Debian 2.3 -o) cowboydren @ yahoo . com | Auto Enthusiast /\\ Kansas City, MO, USA | ICQ UIN 69 67 29 31 _\_V __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
This will return just the package name without the version: $ rpm -q --queryformat=%{NAME} bind9 Jon Pennington writes:
Okay, so it's kind of late (early?) to be looking for gurus, but here's the bit. I'm trying to fabricate my own YaST-style package selection list (dren.sel). I started the Eval CD, and did:
# rpm -qa > dren.sel
Which is what I wanted to start with, 'cause it has a good selection of packages I want, and not too many that I don't want. Then I sorted it:
# sort eval.sel > dren.sel
Later on, I'll add the necessary header information, but for now, I need to strip the extra RPM version data from the file. It has a list of RPMs like this:
WindowMaker-0.64.0-63 a2ps-4.13-74 aaa_base-2001.5.22-0
But I need a list like this:
WindowMaker a2ps aaa_base
So I need a quick and dirty way to strip every line of every "-[0,9]*" and keep the rest of the name intact. It's a bit tricker since some packages don't use underscores but hyphens to seperate parts of the package name, such as alsa-devel, which means you can't just strip everything past the first hypen. Whaddayathink?
===== -- -=|JP|=- Hit me! - http://www.xanga.com/cowboydren/ Jon Pennington | Debian 2.3 -o) cowboydren @ yahoo . com | Auto Enthusiast /\\ Kansas City, MO, USA | ICQ UIN 69 67 29 31 _\_V
__________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
-- Jesse Marlin Intec Telecom Systems Software Engineer Main 404-705-2800 Ph 404-705-2912 Fax 404-705-2805 Email jesse.marlin@intec-telecom-systems.com
participants (3)
-
Jesse Marlin
-
Jon Pennington
-
Konstantin (Kastus) Shchuka