Changeset 4073 for lliurex-up
- Timestamp:
- Mar 29, 2017, 6:10:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-up/trunk/fuentes/lliurex-up-cli/usr/sbin/lliurex-upgrade
r4069 r4073 86 86 try: 87 87 #os.system(command) 88 subprocess.Popen(command,shell=True).communicate() 89 log_msg="Exec Init-Actions" 90 self.log(log_msg) 88 p=subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 89 poutput,perror=p.communicate() 90 if len(perror)>0: 91 log_msg="Exec Init-Actions. Error: " +str(error) 92 print (" [Lliurex-up]: Checking system. Error: " + str(self.perror)) 93 else: 94 log_msg="Exec Init-Actionss. OK" 95 print (" [Lliurex-up]: Checking system. OK") 96 97 self.log(log_msg) 98 91 99 except Exception as e: 92 100 log_msg="Exec Init-Actions.Error: " +str(e) … … 265 273 try: 266 274 #os.system(command) 267 subprocess.Popen(command,shell=True).communicate() 268 log_msg="Exec Pre-Actions" 275 p=subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 276 poutput,perror=p.communicate() 277 if len(perror)>0: 278 log_msg="Exec Pre-Actions. Error: " +str(error) 279 print (" [Lliurex-up]: Preparing system to update. Error: " + str(self.perror)) 280 else: 281 log_msg="Exec Pre-Actions. OK" 282 print (" [Lliurex-up]: Preparing system to update. OK") 283 269 284 self.log(log_msg) 270 285 … … 287 302 try: 288 303 #os.system(command) 289 subprocess.Popen(command,shell=True).communicate() 290 log_msg="Exec Dist-uggrade" 291 self.log(log_msg) 304 p=subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 305 poutput,perror=p.communicate() 306 if len(perror)>0: 307 log_msg="Exec Dist-uggrade. Error: " +str(error) 308 print (" [Lliurex-up]: Downloading and installing packages. Error: " + str(self.perror)) 309 else: 310 log_msg="Exec Dist-uggrade. OK" 311 print (" [Lliurex-up]: Downloading and installing packages. OK") 312 313 self.log(log_mg) 314 292 315 293 316 except Exception as e: … … 314 337 self.postActionsError=True 315 338 log_msg="Exec Post-Actions. Error: " + str(perror) 316 else: 317 log_msg="Exec Post-Actions. OK: " 339 print (" [Lliurex-up]: Metapackage installation. Error: " + str(self.perror)) 340 else: 341 log_msg="Exec Post-Actions. OK" 342 print (" [Lliurex-up]: Metapackage installation. OK") 343 318 344 #os.system(command) 319 345 #log_msg="Exec Post-Actions" … … 340 366 print (" [Lliurex-up]: Install of metapackage is required: " + str(self.flavourToInstall)) 341 367 342 command=self.lliurexcore.installFinalFlavour(self.flavourToInstall) 368 if extra_args["unattendend_upgrade"]: 369 command="DEBIAN_FRONTEND=noninteractive " +command=self.lliurexcore.installFinalFlavour(self.flavourToInstall) 370 else: 371 command=self.lliurexcore.installFinalFlavour(self.flavourToInstall) 372 343 373 p=subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 344 374 poutput,perror=p.communicate() … … 347 377 self.finalFlavourError=True 348 378 log_msg=" Metapackage installation. Error: " + str(self.perror) 349 print (" [Lliurex-up]: Metapackage installation. Error: " + str(self.perror))379 print (" [Lliurex-up]: Metapackage installation. Error: " + str(self.perror)) 350 380 else: 351 381 log_msg=" Metapackage installation. OK" … … 474 504 else: 475 505 if not self.checkPreviousUpgrade(): 476 print(" [Lliurex-up]: Your system sis updated. Nothing to do")506 print(" [Lliurex-up]: Your system is updated. Nothing to do") 477 507 self.lliurexcore.cleanEnvironment() 478 508 self.lliurexcore.cleanLliurexUpLock()
Note: See TracChangeset
for help on using the changeset viewer.