View previous topic :: View next topic |
Author |
Message |
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
Posted: Tue Mar 26, 2013 9:19 pm Post subject: Perl script for fast package queries. [UPDATE] |
|
|
Gentoo provides gentoolkit and portage-utils which, along with the many options of emerge, consitute a package management system. All run rather slowly on my old hardware, and lack features that I wanted, so I've written a Perl script to fill my needs. It does the following:
- Creates and displays text listfiles of all packages in /usr/portage/, /usr/portage/packages/ and /var/db/pkg/.
- Displays group lists for the same directories.
- Searches for a package name in the lists.
- Creates an HTML synopsis of /var/log/emerge.log with human-readable times and durations.
- Fetches and parses a Znurt Category page into a brief HTML list with clickable links to each Znurt package page.
I've found it very useful during installation and setup of new Gentoo partitions, and thought others might find it equally so. If you'd like to try it, go to:
http://52midnight.com/gentoo/code/g.html
I'm in the final debugging stages, to it's a good time to report any bugs or suggest improvements (within reason - I'm an avid practitioner of the Three Perl Virtues; laziness, impatience, and hubris).
Edit 2014-02-19: Amended URL to new location.
Last edited by 52midnight on Tue Feb 18, 2014 8:00 pm; edited 3 times in total |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Wed Mar 27, 2013 1:30 am Post subject: Re: Perl script for fast package queries. |
|
|
52midnight wrote: | I'm an avid practitioner of the Three Perl Virtues; laziness, impatience, and hubris). |
You would be a great addition to the Perl Team, seriously, they could use your help, ping tove on #gentoo-perl _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
Posted: Wed Mar 27, 2013 1:43 am Post subject: |
|
|
Thanks for the accolade, but at the risk of destroying my new-found celebrity, I'm not sure how to do that. Is it an IRC channel, or a twitter account?
Be happy to help out; my new Gentoo installation is a delight, and immediately more productive than the trusty PCLOS system I've been using for years.
Edit a few minutes later. Think I've got it figured. Logged in at freenode.org to #gentoo-perl and found a 'tove' in the users' list, though whether he's a scion of the infamous Slithy family I'm unsure. Awaiting response.
Last edited by 52midnight on Thu Mar 28, 2013 10:40 pm; edited 1 time in total |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Wed Mar 27, 2013 2:18 am Post subject: |
|
|
52midnight,
Very nice - thanks for sharing _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
Posted: Thu Mar 28, 2013 10:13 pm Post subject: |
|
|
For those who've downloaded it, I've uploaded updates to the script and instructions with bug fixes and improvements. Works OK as far as I can tell.
I won't bother this forum with any more changes; if you've anything further, please email or PM me. Thanks to all interested and who contributed to its development. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Mon Feb 17, 2014 6:25 am Post subject: Re: Perl script for fast package queries. [UPDATE] |
|
|
52midnight wrote: | Gentoo provides gentoolkit and portage-utils which, along with the many options of emerge, consitute a package management system. All run rather slowly on my old hardware, and lack features that I wanted, so I've written a Perl script to fill my needs. It does the following:
- Creates and displays text listfiles of all packages in /usr/portage/, /usr/portage/packages/ and /var/db/pkg/.
- Displays group lists for the same directories.
- Searches for a package name in the lists.
- Creates an HTML synopsis of /var/log/emerge.log with human-readable times and durations.
- Fetches and parses a Znurt Category page into a brief HTML list with clickable links to each Znurt package page.
I've found it very useful during installation and setup of new Gentoo partitions, and thought others might find it equally so. If you'd like to try it, go to:
http://52midnight.com/gentoo/code/g.html
I'm in the final debugging stages, to it's a good time to report any bugs or suggest improvements (within reason - I'm an avid practitioner of the Three Perl Virtues; laziness, impatience, and hubris). |
You still working on this / using it? _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Mon Feb 17, 2014 11:41 pm Post subject: |
|
|
Okay, I was curious if you want a simpler way to access Znurt. I could do an XML export if you wanted, for example. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
Posted: Tue Feb 18, 2014 12:00 am Post subject: |
|
|
> Okay, I was curious if you want a simpler way to access Znurt. I could do an XML export if you wanted, for example.
Znurt is very useful, but way too much eye-candy for my taste. The -x option exec's another script that takes a Portage group name as input, uses wget to pull down the requisite Znurt page, and parses its links into a simple HTML page in a predefined directory. Didn't include it because it's hard-coded to my own dir structure. It you've an XML solution that's useful, I'd be happy to compare notes. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Tue Feb 18, 2014 12:18 am Post subject: |
|
|
52midnight wrote: | > Okay, I was curious if you want a simpler way to access Znurt. I could do an XML export if you wanted, for example.
Znurt is very useful, but way too much eye-candy for my taste. The -x option exec's another script that takes a Portage group name as input, uses wget to pull down the requisite Znurt page, and parses its links into a simple HTML page in a predefined directory. Didn't include it because it's hard-coded to my own dir structure. It you've an XML solution that's useful, I'd be happy to compare notes. |
Sorry, I wasn't clear ... do you want a cleaner XML output *from Znurt*. If so, lmk what you're looking for and I can probably hack it together.
I'd been thinking about dumping out static XML files for a while anyway ... or maybe JSON .. that'd be easier. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
52midnight Apprentice
Joined: 20 Mar 2012 Posts: 176 Location: Brisbane AU
|
Posted: Tue Feb 18, 2014 2:22 am Post subject: |
|
|
I'm a dedicated practitioner of the Three Perl Virtues: laziness, impatience, and hubris. XML is one of those things I admire as an elegant and necessary solution, but I've never used it myself. JSON is an unknown. If anyone else reading this is interested, please post; for myself, I'll thank you for your offer, but I'm happy with what I've got. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Tue Feb 18, 2014 2:28 am Post subject: |
|
|
52midnight wrote: | I'm a dedicated practitioner of the Three Perl Virtues: laziness, impatience, and hubris. XML is one of those things I admire as an elegant and necessary solution, but I've never used it myself. JSON is an unknown. If anyone else reading this is interested, please post; for myself, I'll thank you for your offer, but I'm happy with what I've got. |
WORKSFORME _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
|