nekopkg

IRIX and IRIX software discussion including open source and commerical offerings.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

nekopkg

Unread postby ShadeOfBlue » Wed Sep 17, 2008 3:38 pm

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 225 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...

User avatar
VenomousPinecone
Posts: 2148
Joined: Mon Jun 20, 2005 2:10 pm
Location: Groom Lake, NV

Re: nekopkg

Unread postby VenomousPinecone » Wed Sep 17, 2008 11:23 pm

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. :)

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Thu Sep 18, 2008 4:52 am

Sure, go ahead. :)

User avatar
GeneratriX
Posts: 4250
Joined: Tue Oct 21, 2003 2:07 am
Location: Rosario / Santa Fe / República Argentina

Re: nekopkg

Unread postby GeneratriX » Thu Sep 18, 2008 8:59 pm

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!

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Fri Sep 19, 2008 4:43 am

Thanks!

User avatar
GeneratriX
Posts: 4250
Joined: Tue Oct 21, 2003 2:07 am
Location: Rosario / Santa Fe / República Argentina

Re: nekopkg

Unread postby GeneratriX » Fri Sep 19, 2008 6:36 am

ShadeOfBlue wrote:Thanks!


You know; you made 'swmgr' look a bit closer to apt-get! ;)

User avatar
tomo
Posts: 226
Joined: Fri Jan 18, 2008 2:53 am
Location: Europe, Slovakia - Trencin
Contact:

Re: nekopkg

Unread postby tomo » Fri Sep 19, 2008 7:22 am

Nice tool :)
:O2: R7000/600 576MB Ram CDRW 18+9Gb HDD
http://www.tomosgi.co.cc

User avatar
VenomousPinecone
Posts: 2148
Joined: Mon Jun 20, 2005 2:10 pm
Location: Groom Lake, NV

Re: nekopkg

Unread postby VenomousPinecone » Mon Sep 22, 2008 4:14 pm

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.

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Tue Sep 23, 2008 6:06 am

: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 :)

User avatar
VenomousPinecone
Posts: 2148
Joined: Mon Jun 20, 2005 2:10 pm
Location: Groom Lake, NV

Re: nekopkg

Unread postby VenomousPinecone » Fri Sep 26, 2008 1:10 pm

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Mon Mar 09, 2009 7:28 am

Fixed the 'update' function today, the updated script is available in the first post of this thread.

User avatar
BSDero
Posts: 217
Joined: Thu Nov 24, 2005 9:11 am
Location: Aguascalientes, Mexico
Contact:

Re: nekopkg

Unread postby BSDero » Wed Mar 11, 2009 11:26 pm

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Mon Mar 23, 2009 5:54 am

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.

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: nekopkg

Unread postby ShadeOfBlue » Tue Mar 24, 2009 7:51 am

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. :)

User avatar
s0ke
Donor
Donor
Posts: 192
Joined: Mon Feb 24, 2003 8:27 am
Location: TX

Re: nekopkg

Unread postby s0ke » Thu Dec 10, 2009 6:08 pm

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.
:Fuel: REFUSE
R16K 700: 2GB: V10: Noctua Fans


Return to “IRIX and Software”

Who is online

Users browsing this forum: No registered users and 2 guests