how to find out of date modules?

 
Post new topic   Reply to topic    Lunar-Linux Forum Index -> Core Tools
View previous topic :: View next topic  
Author Message
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Thu Dec 08, 2005 10:33 pm    Post subject: how to find out of date modules? Reply with quote

If I lin moonbase I get a list of those modules that have been updated / renamed / removed compared to the moonbase currently on my system.

If I lunar nofix I get a list of modules which might have missing / incompatible files or configurations.

I've been poring over the man pages for lunar, lin, lvu etc but can't find what I want.
How do I get a list of the currently installed modules that are out of date compared to the moonbase?
Back to top
View user's profile Send private message
ElAngelo



Joined: 10 Aug 2005
Posts: 77

PostPosted: Fri Dec 09, 2005 9:28 am    Post subject: Reply with quote

quoting from "man lunar"
Code:

       update

              automatically updates  all  installed  software  packages.  This
              option  is non-interactive and does not start up the menu-driven
              interface. It is suitable for use in cron jobs.


Rolling Eyes

anywayz, you could say that the manpage is not completely correct Smile
lunar update is partly interactive. It will first give you a list of modules it want to update. then you can choose to ignore him and let him update all the modules selected or you can choose to interact (by deleting or even adding modules in that list) or just ^C to abort the whole update process....
Back to top
View user's profile Send private message
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Fri Dec 09, 2005 1:21 pm    Post subject: new option: lunar status ? Reply with quote

Thanks for the information. I had seen the man page entry for lunar update but overlooked the fact that get the list of things to rebuild and then quit without doing anything. I've even used lunar update in the past, just once mind, and had forgotten it worked like this.

No, what I was after was a sort of non-interactive lunar status command that simply gave a report to stdout, much like lunar nofix, that would compare what you already had installed and tell you whether there were newer versions in the moonbase. By extension, it could also tell you whether the installed version was 'held' and whether there were old versions that could be 'pruned'. Maybe this info could be colour coded too.
For example:
Code:

root@lunar# lunar status
Module   Moonbase   Installed   Status
abc         1.2.3        1.2.3        OK
bcd         2.3.4        2.3.3        out of date
cde         3.4.5        2.4.7        on hold
def         4.5.6        4.5.6        OK
def         4.5.6        4.4.1        to prune

No doubt there could be options to limit to specific modules, or sections of the moonbase, or to show only those modules that were out of date, or versions that needed to be pruned.

I suspect that this is probably quite difficult for some reason I haven't seen otherwise I'm sure someone would have thought of it already.
Back to top
View user's profile Send private message
RedKennedy



Joined: 22 Aug 2005
Posts: 57
Location: The Moon

PostPosted: Fri Dec 09, 2005 3:27 pm    Post subject: Reply with quote

well...there's lvu installed.....so you could write some sort of means of using that to print the modules...
_________________
In Soviet Russia, ISOs install you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Sat Dec 10, 2005 5:56 pm    Post subject: lvu: what about adding 'status' and 'expired' options Reply with quote

In the true spirit of open source software, I've combed through the lunar module maintenance scripts, and come up with the following script to show the status of the currently installed modules.
Warning: Do not run this as root, just in case there are any gotchas that I didn't spot!
Code:
#!/bin/bash
. /etc/lunar/config
FORMAT="%-19s %-19s %-19s %-9s %-9s\n"
printf "$FORMAT" "Module" "Installed" "Moonbase" "Status" "Remark"
for MODULE in $(list_installed) ; do
        if [ $MODULE = "moonbase" ] ; then
                continue
        fi
        IVERSION=$(installed_version $MODULE)
        MVERSION=$(module_version $MODULE)
        if $(module_is_expired $MODULE) ; then
                STATUS="EXPIRED"
        else
                STATUS="current"
        fi
        if $(module_exiled $MODULE) ; then
                REMARK="exiled"
        elif $(module_held $MODULE) ; then
                REMARK="held"
        else
                REMARK="-"
        fi
        printf "$FORMAT" "$MODULE" "$IVERSION" "$MVERSION" "$STATUS" "$REMARK"
done

The code above really needs to be extended to allow passing a section or module name to limit the output rather than just list all of the currently installed modules. Adding the code to detect old versions of installed modules that could be pruned looked like it was going to be a lot more work and code than I wanted to post here.

It seems to me that it would be possible to extend lvu to add expired and status options. expired would work like the held and exiled options, and status would work like the installed and section options and the script above.
Back to top
View user's profile Send private message
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Mon Dec 12, 2005 6:16 am    Post subject: LOL Reply with quote

new feature in theedge/lunar since about 2/3 weekd:

Code:
lvu expired


try it ;^)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Lunar-Linux Forum Index -> Core Tools All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group