IRIX and Software

nekopkg

Hello everyone,

Here's a 300-line script I hacked together tonight to make it easier to download individual Nekoware packages with their dependencies.
It's not particularly pretty and it's for tcsh (what was I thinking...), but it works :)

Sample interaction:

Code: Select all

[root@prometheus:~]# nekopkg.sh search auto
Matching packages: autoconf automake
[root@prometheus:~]# nekopkg.sh show autoconf
Package: autoconf
Filename:  neko_autoconf-2.60.tardist
Version :  2
MD5sum  :  95bea378566353e6837d5d6e03f54c10
Deps    :  m4,perl
[root@prometheus:~]# nekopkg.sh get autoconf automake
Downloading package: autoconf ...
######################################################################## 100.0%
Checking dependencies for 'autoconf' ...
Downloading package: perl ...
######################################################################## 100.0%
Downloading package: m4 ...
######################################################################## 100.0%
Downloading package: automake ...
######################################################################## 100.0%
[root@prometheus:~]# nekopkg.sh unpack-swmgr
Unpacking neko_autoconf-2.60.tardist ...
Unpacking neko_automake-1.9.6.tardist ...
Unpacking neko_m4-1.4.6.tardist ...
Unpacking neko_perl-5.8.8.tardist ...
[Software Manager launches]
[root@prometheus:~]# nekopkg.sh clean
Are you sure you want to remove /tmp/nekopkg-workdir [y/n]? y
Removing /tmp/nekopkg-workdir ...


It also has an 'update' operation, which should check for new versions of already installed packages & download them. I haven't had the chance of testing this yet, but it should work :)
EDIT: The update function now works.


Here's the script ( last updated 2011-02-07 ):
nekopkg.sh.gz
gzipped script file (version 0.9.3)
(2.77 KiB) Downloaded 142 times


Installation instructions:

Code: Select all

# gunzip nekopkg.sh.gz
# chmod +x nekopkg.sh
# mv nekopkg.sh /usr/nekoware/bin/

Note 1: You may have to re-open the shell for it to accept nekopkg.sh without the full path.
Note 2: If you place the script somewhere else, make sure you change the NEKOPKG variable in it!

The script requires the neko_curl package (if you prefer, you can use neko_wget by editing the script).
Run nekopkg.sh without arguments to see usage information.

I have used it to install packages on my new Origin and that's pretty much all the testing I've done -- treat this as a beta release and please report any bugs here.

Now I'm off to bed, good night...
Nice!

We once had a online version of something similar, it went down and never came back. I think I might want to reverse engineer your script and re-write it in perl, if you dont mind. :)
Sure, go ahead. :)
This is a great tool, I love it! It is now installed on my IP30, and after some short testing I'm sure this is the kind of tool that improves a lot the daily-use experience on IRIX. Very nice work!
Thanks!
ShadeOfBlue wrote: Thanks!


You know; you made 'swmgr' look a bit closer to apt-get! ;)
Nice tool :)
:O2: R7000/600 576MB Ram CDRW 18+9Gb HDD
http://www.tomosgi.co.cc
ShadeOfBlue wrote: Sure, go ahead. :)


This is an excellent exercise in patience and perl scripting. I haven't done anything with perl in about a year and I figured this would make a great project. Well, it would if it didnt require me to learn tcsh scripting! :P I have about a fourth of the script complete. Got the Big Book open to shell scripting and I am getting a face full of tcsh.

The bulk of this tcsh script serves as an excellent guide as to what my code should be trying to accomplish. I thank you for the well documented and easily read code.

Talk about a refresher course in perl, by jingo. :lol:
NOTE You cannot use Virtual Disk Manager to create or to shrink physical hard drives.
:D

I haven't done tcsh scripting in a long time as well, so there's probably a better way of doing some of the things in the script (however, it runs reasonably fast, so this shouldn't be a problem).

If you need any help with the nastier parts, feel free to send me a PM or post here :)
I am about half way done, but I am going to have to take a break from it until after October 3rd.

Moving to a new place in a better part of town. Moving when you have a young child is rather stressful. It is also a pain in the ass to pack everything you want and sell everything you don't. :P
Fixed the 'update' function today, the updated script is available in the first post of this thread.
great tool!!

I downloaded and it works!!

Thanks!
__Zacatito__ Image 600 MHZ R14000; 17GBytes HD
__Nopalito__ Image 200 MHZ R5000; 9GBytes HD
Guadalajara, Jal and Aguascalientes, Ags
Mexico
This happens during the 'update' operation, correct?

I've found that the first error you mentioned appears when there are two packages with the same name but different versions installed on the system. The simplest workaround would be to delete the older package if you don't need it :)

I haven't been able to replicate the second error yet. It is probably related to the one above.

Thanks for reporting the bugs! When I have the time, I'll add some extra error checking and modify the code that generates the list of installed packages to ignore duplicates.
Extra error checking added, updated version of the script is available in the original post .

Please try it again -- the "if: Expression syntax" error should be fixed and the "file_deps_ver" case should report a more detailed error this time instead of breaking.

I've also added a new command 'list', which lists all available packages.
Some other minor quirks have also been dealt with.

Bug reports and other suggestions are welcome. :)
I've had my head buried in the sand a long time with 6.5.19. I just recently upgraded to 6.5.22 and wow I'm so glad I did. This tool has made the once excruciating task of installing software a rather pleasant one. Apt-get for irix. Great work. Kudos to you.