| Author | Message | 
  
    | 
        
          | alexk   |  | 
        
					| Post subject: Semi-automatic dist-upgrade on shutdown  Posted: 07.10.2011, 15:48 |  | 
  
    | 
        
          | 
  
 Joined: 2010-10-01
 Posts: 288
 
 Status: Offline
 |  | 
        
          | I'd like to be able to select to have my computer do a download-only dist upgrade while I'm in init 5, then have it automatically do the dist-upgrade the next time I do a shutdown, once the machine exits X. Of course, the download-only dist upgrade in init 5 is easy with one command. It's the other part that would take some implementing. 
 Currently, I usually have two simultaneous user logins, so I have to log out of each manually to save the desktop settings, switch to Ctrl-Alt-F1, log in, run "service kdm stop" run the dist-upgrade, then restart kdm and log both users back in again. I would like to have the option at least on occasion of doing an automatic dist-upgrade when I do a full shutdown.
 
 What do you think? Any other ideas to make dist-upgrades easier?
 |  
          | 
 Last edited by alexk on 17.11.2011, 15:38; edited 1 time in total
 |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | hubi   |  | 
        
					| Post subject: RE: Automatic dist-upgrade on shutdown  Posted: 07.10.2011, 21:21 |  | 
  
    | 
        
          | Moderator 
  
 Joined: 2010-09-11
 Posts: 228
 Location: Vienna (AT)
 Status: Offline
 |  | 
        
          | Because of the nature of Debian Sid dist upgrades should not be done unattended. Therefore I doubt that someone in the team is inclined to write the code for such a routine. I could be wrong though ... but ... 
 hubi
 |  
          | _________________
 Tilos Rádió Budapest
 |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | piper   |  | 
        
					| Post subject: RE: Automatic dist-upgrade on shutdown  Posted: 07.10.2011, 22:15 |  | 
  
    | 
        
          | Moderator 
  
 Joined: 2010-09-11
 Posts: 481
 Location: cheektowaga, ny
 Status: Offline
 |  | 
        
          | Doesn't get any easier or faster than 
 
       Code: 
init 3 && apt-get update && apt-get dist-upgrade
 
 I agree with hubi, debian sid dist upgrades should not be done unattended.
 
 That would be suicide (IMHO)
 |  
          | _________________
 debian sid | apt-get into it
 |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | DeepDayze   |  | 
        
					| Post subject: Re: RE: Automatic dist-upgrade on shutdown  Posted: 07.10.2011, 23:26 |  | 
  
    | 
        
          | 
  
 Joined: 2010-09-11
 Posts: 616
 Location: USA
 Status: Offline
 |  | 
        
          |       piper wrote: 
Doesn't get any easier or faster than
       Code: 
init 3 && apt-get update && apt-get dist-upgrade
 
I agree with hubi, debian sid dist upgrades should not be done unattended.
 
That would be suicide (IMHO)
 Unattended d-u's especially for Sid can really result in havoc due to possible package removals that can break critical parts of the system
 |  
          |  |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | CaesarTjalbo   |  | 
        
					| Post subject: RE: Automatic dist-upgrade on shutdown  Posted: 07.10.2011, 23:35 |  | 
  
    | 
        
          | 
  
 Joined: 2010-09-13
 Posts: 96
 Location: Enschede
 Status: Offline
 |  | 
        
          | For a shutdown, you need to log out those users too. Perhaps having one or both users on another setting than 'restore previous session' might make things a bit easier. 
 Besides sensible issues with dist-upgrades, it's not a fully automated process but requires user input occasionally.
 |  
          |  |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | michaaa62   |  | 
        
					| Post subject: Re: Automatic dist-upgrade on shutdown  Posted: 07.10.2011, 23:43 |  | 
  
    | 
        
          | 
  
 Joined: 2010-09-11
 Posts: 55
 Location: Berlin, Germany
 Status: Offline
 |  | 
        
          |       alexk wrote: 
I'd like to be able to select to have my computer do a download-only dist upgrade while I'm in init 5, then have it automatically do the dist-upgrade the next time I do a shutdown, once the machine exits X. Of course, the download-only dist upgrade in init 5 is easy with one command. It's the other part that would take some implementing. 
You might think about a cron job or a manual
 Currently, I usually have two simultaneous user logins, so I have to log out of each manually to save the desktop settings, switch to Ctrl-Alt-F1, log in, run "service kdm stop" run the dist-upgrade, then restart kdm and log both users back in again. I would like to have the option at least on occasion of doing an automatic dist-upgrade when I do a full shutdown.
 
 What do you think? Any other ideas to make dist-upgrades easier?
       Code: 
apt-get update && apt-get dist-upgrade -dy
to download the packages to your PC to daily times that suit your usage and download speed. Whenever you want to see, how things would be, just       Code: 
apt-get dist-upgrade
will show what will get removed (if any), upgraded or additionally installed. From that output you might evaluate if to dist-upgrade or not. Because of already downloaded packages via cron the init3 'downtime' is as short as possible. |  
          |  |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | alexk   |  | 
        
					| Post subject: Re: RE: Automatic dist-upgrade on shutdown  Posted: 08.10.2011, 15:42 |  | 
  
    | 
        
          | 
  
 Joined: 2010-10-01
 Posts: 288
 
 Status: Offline
 |  | 
        
          |       hubi wrote: 
Because of the nature of Debian Sid dist upgrades should not be done unattended.
 I see that several people brought this up. Let me clarify that I am not talking about unattended dist-upgrades in Sid. My idea was just an option to have a dist-upgrade launched automatically upon shutdown, but not completed without user input. It would be a normal attended dist-upgrade, the user could choose whether to go through with it, or not and the user would answer any package questions as usual, as per the Debconf settings.
 
 
       CaesarTjalbo wrote: 
For a shutdown, you need to log out those users too.
 When I shutdown, I only have to hit the Enter key to log out other users when the systems asks for confirmation.
 
 A "Log all users out" option would help. I would expect there's a way to do this with a script, using KDE commands, but it's not something I've looked into (yet).
 
 
       michaaa62 wrote: 
You might think about a cron job or a manual
Code:
 apt-get update && apt-get dist-upgrade -dy
 to download the packages to your PC to daily times that suit your usage and download speed. Whenever you want to see, how things would be, just
 Code:
 apt-get dist-upgrade
 will show what will get removed (if any), upgraded or additionally installed. From that output you might evaluate if to dist-upgrade or not. Because of already downloaded packages via cron the init3 'downtime' is as short as possible.
 Yes, I do use this method a lot, manually and it does greatly speed up upgrades, especially if there are a lot of upgraded packages. I'm also using PDiffs to speed up downloading, which seems to work well (but I have not done an objective comparison with the non-PDiff method).
 |  
          |  |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
    | 
        
          | CaesarTjalbo   |  | 
        
					| Post subject: Re: RE: Automatic dist-upgrade on shutdown  Posted: 09.10.2011, 09:58 |  | 
  
    | 
        
          | 
  
 Joined: 2010-09-13
 Posts: 96
 Location: Enschede
 Status: Offline
 |  | 
        
          |       alexk wrote: 
What happens when you su to root, switches to runlevel 3 and kill X? Just a guess: you don't even have to press enter.      CaesarTjalbo wrote: 
For a shutdown, you need to log out those users too.
 
When I shutdown, I only have to hit the Enter key to log out other users when the systems asks for confirmation.
 
 I mean: when you shutdown and the system asks for confirmation, does it log out those users properly and save their KDE session? Or does it merely 'kill' those users as it also kills KDE?
 
 
       alexk wrote: 
A "Log all users out" option would help. I would expect there's a way to do this with a script, using KDE commands, but it's not something I've looked into (yet). 
Maybe this can be a start: https://wiki.archlinux.org/index.php/Sh ... wer_Button |  
          |  |  
         
	        |  |  | 
  
    |  | 
  
    |  | 
  
  
    |  |