anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#31
The script available at the mepisimo site does the basics in upgrading antiX-M7.2 (full) to antiX-M7.5.

What I want to do now is extend the script to cover a variety of upgrade options, from antiX-M7, antiX-M7.01, and from antiX-base versions to antiX-m7.5.
I would also like to give the user the option to dist-upgrade or not and simply install the antiX stuff.
But installing the antiX stuff varies from 7/7.01 and base.
Also, antiX-M7 (full and base) still has the Mepis repo enabled. It is needed to upgrade the kernel (the vmsplice issue), but that is it.
It must be disabled afterwards, otherwise a dist-upgrade will fail.

As my scripting is 101 (at best), I need help.
I have the script available in the antiX wiki, for anyone who wants to help out.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://antix.mepis.com/index.php?title=User_articles&action=edit"
linktext was:"http://antix.mepis.com/index.php?title= ... ction=edit"
====================================


and also here:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://antix.wikidot.com/antix-upgrade-script"
linktext was:"http://antix.wikidot.com/antix-upgrade-script"
====================================


(The second one may be easier to edit as there still is problems creating an account at the antiX-wiki)
Posts: 253
mariel77
Joined: 13 Sep 2007
#32
I used the script to go from a VB install of antiX7.2 to 7.5, and it all went well without any issues. You have all done a great job with the script!

I haven't done much else though. My VB install is still too large for my screen (I forgot how to change the screen size and haven't looked it up again.), and the bottom is cut off, so I can't always see everything. I don't have a lot of time for testing now though.

My laptop with 7.01 is ready to try the upgrade script when it is finished.
Posts: 73
h2
Joined: 13 Jun 2008
#33
anticapitalista, while I can't take on any new hacking projects, I can give you a few tips that will lead to long term success:

Start the script out as structured programming, ie, use functions instead of endless linear one liners etc. This lets you control the flow, repeat, reuse, etc.

Since if you actually keep this going you must do this anyway in the future, you might as well start now, that's less work to redo later.

Use explicit global and local variables to keep the stuff maintainable. Keep to one style, and make sure you, and anyone else, can actually read and understand what is happening. This means good comments, good function names, and good variable names.

Have fun, while I had programming experience when I started the s**i scripts, I had almost no bash experience, and bash is a pretty bad language, so it really pays to avoid the worst features of what bash lets you do. Keep things simple in other words, and avoid things like [ some condition ] && do something || do something else

those are traps that lead to bugs down the road, use boring if/then/elif/then/else type syntax and you'll be happier long term, believe me.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#34
Thanks for the tips, h2.

Know of a good source for bash scripting? I mean for beginners?

mariel77,
the script does do what it is supposed to do by upgrading 7.2-7.5.
Upgrading earlier versions such as 7.01 and 7.0 (7.0 more so as the 7.01 fixed problems with Mepis repo in 7.0) are more difficult as there are bits missing and quite a lot of apps are different.

It can be done, maybe user will have to make some adjustments before upgrading.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#35
mariel77.

Have you upgraded any apps/dist-upgrade your antiX-M7.01?

Do you fancy being a guinea-pig for testing antiX-M7.01 to M7.5?
I'll understand if you don't, but I'm looking for testers. I'll start a new thread anyway.

PM me or post a reply.
Posts: 253
mariel77
Joined: 13 Sep 2007
#36
anticapitalista wrote:mariel77.

Have you upgraded any apps/dist-upgrade your antiX-M7.01?

Do you fancy being a guinea-pig for testing antiX-M7.01 to M7.5?
I'll understand if you don't, but I'm looking for testers. I'll start a new thread anyway.

PM me or post a reply.
I have only done regular upgrades from lenny, I think. I have also run a modified control center script that OU812 sent me. But I have not done a dist-upgrade.

Yes, I can try the script from antiX-M7.01 to M7.5. I was going to upgrade to 7.5 afterwards anyway, if it breaks. I don't keep data on that system; I just need to save my installed package list and my tweaks in case I need them.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#37
The update script will bring in the control center and other new things.
Posts: 253
mariel77
Joined: 13 Sep 2007
#38
Yes, I sort of have the Control Panel script; not everything works, and I have linked to some things differently.

These are the packages I installed (or were installed) to use with control center:
zenity, mountpy, super

But I can remove them and anything else I need to remove. The rest of my system was basically updated from testing in June, but I may have had"prefer from stable." For some reason it always ends up there. I can also give you a list of all the packages I upgraded right before I played around with the control center script, if that matters.

And libpisock9 (0.12.3-4+b1) to 0.12.3-5 was also done at that time.
Posts: 253
mariel77
Joined: 13 Sep 2007
#39
OK, I ran the upgrader script to upgrade from 7.01 to 7.5, but I have some broken packages and I am in a loop and don't know enough to fix it myself. Some things still work well, but there is no Control Center, and I have to use Logout and then halt with root PW to shutdown.

This is my terminal output for apt-get -f install:

Code: Select all

root@LaptopSolo:/usr/bin# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libstdc++5 libwww-ssl0 libcdk5 libx264-57 python-qt3 libflac7 libsnmp-base
  libsnmp9 libtotem-plparser1 hplip-data
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libnss3-1d
The following NEW packages will be installed:
  libnss3-1d
0 upgraded, 1 newly installed, 0 to remove and 362 not upgraded.
4 not fully installed or removed.
Need to get 0B/931kB of archives.
After unpacking 2261kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  libnss3-1d
Authentication warning overridden.
(Reading database ... 68592 files and directories currently installed.)
Unpacking libnss3-1d (from .../libnss3-1d_3.12.0-4_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libnss3-1d_3.12.0-4_i386.deb (--unpack):
 trying to overwrite `/usr/lib/nss/libfreebl3.so', which is also in package libnss3-0d
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libnss3-1d_3.12.0-4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@LaptopSolo:/usr/bin#
and for apt-get autoremove:

Code: Select all

root@LaptopSolo:/usr/bin# apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libcamel1.2-11: Depends: libnss3-1d (>= 3.12.0~1.9b1) but it is not installed
E: Unmet dependencies. Try using -f.
What should I do next? Thanks!
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#40
The script should have sorted that (did you use the new script?)

You have to remove libpurple0 and libnss3-0d (this will remove pidgin)

Synaptic fix broken packages might fix it. Or also in synaptic remove --purge the above mentioned.

Or aptitude remove --purge the above
or
aptitude -f install
Posts: 73
h2
Joined: 13 Jun 2008
#41
anticapitalista, read the source code of sgfxi and smxi to get an idea of boring, bland, readable, maintainable code. I make a point in those of avoiding some absolutely horrible bash practices, which are terrible programming practices, but have unfortunately become something of the norm.

Maintaining the logic flow in columns (ie, the opening logic item is on the same column as the closing), avoiding silly one liner logic flows like [ condition ] && positive statement || negative statement
is a good place to start avoiding bad practices.

There is one case where that type of one liner works well in bash, when you are relying on the return value of the first operation, like: apt-get update || error_handler <case number>

Then just google bash tutorials, bash how tos, etc.

I have a list of
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://techpatterns.com/forums/about251.html"
linktext was:"bash links and howtos"
====================================
on my forums, from advanced to simple stuff.

Like any other language, you have to read other people's code, hack your own to get a feel for it.
Posts: 253
mariel77
Joined: 13 Sep 2007
#42
I ran the antiX-upgrader.sh script dated 31 July 2008.

Thank you for the other terminal commands; I lost synaptic along the way and couldn't reinstall it because of the errors with apt-get. But I still had aptitude, so that was good.

I did a"dpkg --purge libnss3-0d" and it said that openoffice.org-core was dependent on it. I didn't think about oo.org; I hadn't installed any kde packages. Then I did"aptitude remove --purge openoffice.org-core" and then"aptitude remove --purge libnss3-0d". All seemed to go well there.

Now I am running the upgrader script again. So oo.org has to be removed before the script will run. I guess that's a good thing to know.

I'll let you know the final outcome when the script is finished.
Thanks again for all your help!

Edit: Wow. It just finished. It said to run"apt-get autoremove" so I did, and then I ran"apt-get -f install" just to check and all it said was 1 package not upgraded. I have control center and roxterm - thanks for including that. My laptop touch panel just will not paste from the other terminals.

I'll let you know how the rest of it all goes with wicd, etc., but later.
Thanks again! __{{emoticon}}__
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#43
C0ngradulations Mariel77 and welcome to 7.5!!
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#44
Thanks very much for testing this Mariel.

So it seems open-office has to be removed before dist-upgrading.

I'll try this out with 7.2-7.5 and see if it just is a problem with an upgrade from 7/7.01-7.5.

(The script should have kept your old fluxbox menu, so you can edit fluxbox/menu to include other apps. This is the biggest 'fault' with fluxbox IMO. ie auto adding entries to the menu. I know it can do that with the default fluxbox menu, but it is ugly)

h2, I'll take your advice on board. I had a look at the smxi script, and to be honest, it is over my head at the moment. I need to do some reading.
Posts: 253
mariel77
Joined: 13 Sep 2007
#45
I really love antiX 7.5. anti and all, you have done a wonderful job with this! The controlcentre is great, and I really like icewm (and will probably use it now), and love roxterm. I have to do some reading to learn about icewm; it's easy to edit the fluxbox menu. Thanks! __{{emoticon}}__

There is one other thing that is a bit off with my upgrade - it doesn't shut down completely. I get a blinking cursor instead of it going all the way to"system halted". I have to look into that some more; if you have any suggestions, please let me know. I need to find the shutdown log and check to see it it happens from fluxbox or only icewm.

The other thing - my usb sticks mount beautifully (and having Home and Media in the menu is great), but I am still unmounting as root in a terminal. Is there another way?

Also which file do I edit to always get icewm at boot, instead of fluxbox?

Thanks again!
PS. Thanks, eriefisher