[Apt-offline-devel] [SCM] Offline APT Package Manager branch, master, updated. 0.9.6-34-g40de43b

Ritesh Raj Sarraf rrs at researchut.com
Mon Mar 15 12:04:12 UTC 2010


The following commit has been merged in the master branch:
commit fc948e662b60f20a56aeca5b4b1f9e49cf86cf2e
Author: Ritesh Raj Sarraf <rrs at researchut.com>
Date:   Mon Mar 15 16:53:58 2010 +0530

    fix an endless loop being created when doing an install  with bug prompt on

diff --git a/apt_offline_core/AptOfflineCoreLib.py b/apt_offline_core/AptOfflineCoreLib.py
index 8830ed6..da23ffa 100644
--- a/apt_offline_core/AptOfflineCoreLib.py
+++ b/apt_offline_core/AptOfflineCoreLib.py
@@ -966,6 +966,8 @@ def installer( args ):
                         else:
                                 log.err( "Cannot write to target path %s\n" % ( apt_package_target_path ) )
                                 sys.exit( 1 )
+                elif filename.endswith( apt_bug_file_format ):
+                        pass
                 elif AptOfflineMagicLib.file( archive_file ) == "ASCII text":
                         filename = os.path.join(apt_update_target_path, filename)
                         if os.access( apt_update_target_path, os.W_OK ):
@@ -974,15 +976,11 @@ def installer( args ):
                         else:
                                 log.err( "Cannot write to target path %s\n" % ( apt_update_target_path ) )
                                 sys.exit( 1 )
-                elif filename.endswith( apt_bug_file_format ):
-                        retval = False # We intentionally put the bug report files as not printed.
                 else:
                         log.err( "I couldn't understand file type %s.\n" % ( filename ) )
                 
                 if retval:
                         log.verbose( "%s file synced to %s.\n" % ( filename, apt_update_target_path ) )
-                else:
-                        log.err("Failed to sync %s\n" % (filename) )
         
         if os.path.isfile(install_file_path):
                 #INFO: For now, we support zip bundles only
@@ -1164,9 +1162,13 @@ def installer( args ):
                                 if response == "?":
                                         display_options()
                                         response = get_response()
+                                        
                                 elif response.startswith( 'y' ) or response.startswith( 'Y' ):
                                         for eachfile in os.listdir( install_file_path ):
                                                 
+                                                filename = eachfile
+                                                FullFileName = os.path.abspath(os.path.join(install_file_path, eachfile) )
+                                        
                                                 #INFO: Take care of Src Pkgs
                                                 found = False
                                                 for item in SrcPkgDict.keys():
@@ -1178,11 +1180,13 @@ def installer( args ):
                                                         log.msg("Installing src package file %s to %s.\n" % (filename, Str_InstallSrcPath) )
                                                         continue
                                                 
-                                                archive_type = None
-                                                magic_check_and_uncompress( archive_file, filename )
+                                                magic_check_and_uncompress( FullFileName, filename )
+                                        sys.exit(0)
+                                        
                                 elif response.startswith( 'n' ) or response.startswith( 'N' ):
                                         log.err( "Exiting gracefully on user request.\n\n" )
                                         sys.exit( 0 )
+                                        
                                 elif response.isdigit() is True:
                                         found = False
                                         for full_bug_file_name in bugs_number:

-- 
Offline APT Package Manager



More information about the Apt-offline-devel mailing list