[Package Manager] What happens if I apply upgrades ?

This might be a little out of Left Field

[Package Manager] What happens if I apply upgrades ?

Postby KazzaMozz » Sun Sep 16, 2012 1:00 am

Hi Everyone,
Recently I was asked and interesting question.
What happens if I upgrade my system via terminal or Using Synaptic package manager ?
Are there any Consequences of doing this I need to know about ?

Everyone likes to keep their systems up-to-date and are concerned about security.
So I put myself in their shoes and thought about it in the following way.

FoxyRoxyLinux is a 100% debian live distro and is compatible with 'apt-get update' and it should be totally fine to get the latest package information etc.
There should also not be any issues if I use 'apt-get upgrade' for any packages I have installed via Synaptic or in terminal.
Upgrade will only upgrade any currently installed packages so there wouldn't be any issues there either. Seems all would be fine in this scenario or would it.

Scenario 1:

What happens if I upgrade after I have installed any of the FoxyRoxyLinux add-ons or any of the injections available ?
Aren't these specially modified packages and much smaller than a standard package I would install via package manager ?
Will upgrading cause any problems with my system ?.
Or in the least will it install a heap of files that it thinks is missing and I end up with unneeded files and ruin the Add-on or injection I'm using ?

Scenario 2:

What happens if I do not use any injections or add-ons and purely use the package manager for any extras, and upgrades would there be any issues I need to know about ?

Scenario 3 (will add the firestarter answer here after I redo an upgrade from fresh install again) For now this is not included.
What has upgrading changed now I can now see the I.P. Address scrolling through and my I.P. is now displayed before logging on ?

I think I this is what most users would want to know

User avatar
Posts: 332
Joined: Tue Aug 21, 2012 9:59 pm
Location: Australia

Re: [Package Manager] What happens if I apply upgrades

Postby jbv » Sun Sep 16, 2012 1:54 am

Hi Kazza,

So far with everything we have released it should be 100% fine and nothing will break.
If you are seeing a "counter" while your machine is waiting for a valid IP, then you have 06-FoxyFirestarter loaded.

This also auto-starts miniDLNA.

Both of these get somewhat messed-up if your network card loads firmware to update the Ethernet card so I have modified the startup scripts in /etc/init.d for both of these. This was clearly explained in the docs for Firestarter and how you can bypass this by pressing a key although if you do Firestarter and miniDLNA may fail to start, but at least your headless system won't lock up, as the counter also self terminates if it gets to 200 (somewhere between 10 and 20 seconds), and you can always manually start them at any time. I don't think any other live distro (of any brand or flavor) has included support for loading of network card firmware support, but I chose to do so as it will actually eliminate more problems than it can create.

So in summary if you see the counter just before Firestarter and miniDLNA start, just before you login, it means that to really work properly and trouble free, your network card needed new firmware loaded into it and we have done it. FYI - the "firmware updates" are a Debian thing and the firmware update itself comes from Debian but it is not in a standard repo. From memory, it may be from non-free, or something similar.

The reason that both Firestarter and miniDLNA get confused if your network card loads firmware is because when Linux first initializes the card the scripts in /etc/network/if-up.d are run because the network should be up. Unfortunately, while it is, it isn't really 100% right yet, but all system-level-startup packages that need to be started get fired up by the various system messages that get shot around while all of this is going on. Now your machine may or may not have a valid DHCP'd IP at this point, I really don't know. In the meantime what happens is that it is about here somewhere that the system decides to update the network firmware so it either closes the network or just pauses it while the firmware is loaded and your machine then needs to get a fresh IP from DHCP once this is done. By this time, both Firestarter and miniDLNA are still trying to start stuff, but when they look for our IP all they get is a big fat nufin and they fail to start.

Samba and the other more mature packages that aren't written by one bloke handle this properly. However, these two don't. which is why I've added the "hang on a sec, sumfin ain't quite right" stuff to their startup scripts.
Another small yet subtle "tweak" that is documented although probably without the additional background I've just given here.

Anyway, back to your question about doing the "update". As you have discovered, it will work and pretty much without any issue, with a few caveats.

Any packages "updated" will now be in 95-snap as will be the fixed up dpkg files, so all will be well.
However, getting these update files into the appropriate .sqf will be a bit of a nightmare, and in most cases probably impossible. Therefore with AddOns, people should really decide if they are going to use it and if so, they should inject the AddOn into FoxyRoxy and remove the original file. In almost every instance this will be injected into 02-FoxyDesktop, with few exceptions that I can think of.

If they continue to do this then everything will be perfect and if anything all we really need to do is create a "generic" inject script that they can run. The generic inject script would always take a know file (say 95-snap.squashfs) and inject it into [02]FoxyDesktop[/b] and rename the original 95-snap.squashfs to something like perhaps 95-snap.squashfs.injected to stop it loading again. Once again, the user should then delete that file.

So far, all is still well, and peace and harmony exists throughout the world.
Well, we all know how long peace and harmony really exists throughout the world, don't we?

There is probably one scenario where things can go pear-shaped.
A user installs or uses an AddOn package after doing an update.
- dkpg gets scrambled or perhaps be be more correct, the dpkg database files are now not correct. They are not corrupt, but they are not going to be correct.

Where things can and may very well get ugly, is if a person does not inject the AddOn and loads all AddOns as individual sqfs and then plays with sometimes loading stuff and sometimes not. They can even make grief for themselves if they do this while trying to install and/or make their own package.

This is why I started the dpkg thread in our [The Development Laboratory] --> [Dev Notes] section.

Kazza, the following is not intended to sound as though it is being written to you. It is intended for the wider audience that I hope will read this.

Please let me take a moment to remind people that this is a Developer Release.
What this means to me is that you are a Developer, and this release has been made for you to look at and consider being part of the Development Team. It does not mean that the "developer has released it".

If you do not clearly understand the important distinction between the two meanings, then you really shouldn't be here yet. If you do fall into this category, then by all means, download what is available and have a close look. Feel free to follow along, play and learn. Even contribute. But please do not request/expect/demand that something that breaks is fixed. While we will appreciate the feedback, please do not request/expect/demand that anyone will do anything about it, other than thanking you for pointing it out and giving us something else to be aware of before we "go live".

This little gem, has a very long way to go before it will be fit for human consumption. It could be another 12 months or even longer. We may never get there, who knows. Along the way you will need to re-install often. You may often need to start from scratch. You will need to do quite a lot of reboots to test what you have done. Once again, if that is not for you, then please do not be offended, but you are not for us either, so lets just part as friends.
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: [Package Manager] What happens if I apply upgrades

Postby jbv » Sun Sep 16, 2012 2:07 am

The Short answer to your question about maintaining 100% compatibility with Debian is:

That was and is the goal. We have not deviated 1 iota except for our few tweaks to startup scripts and the like, all of which are clearly documented and explained. So I think we can proudly say that we are still 100% compatible.

Once we find a proper long-term solution to the dpkg thing, our compatibility will remain assured, provided people don't do anything totally stupid. I don't think a proper solution is far off. I also have little doubt that once the solution is found, perfected, and tested, it won't be very long until someone does something really stupid :lol:

Package removal has and always will be an issue although this can also be sorted sometime in the future. The script 99-snap already contains quite a bit of the tricky stuff we will need to do this. I would also like us to be able to create sqf's that we can dynamically load and unload. I have actually done this manually almost a year ago, although my notes weren't the best. Sometime before I die, I would like to get that working properly, although that little trick is way down on my to-do list.

Cheers, Brenton
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Return to Do Something Tricky

Who is online

Users browsing this forum: No registered users and 1 guest