Bug 26748

Summary: Allow_trusted gets lost in spwaned backend call
Product: PackageKit Reporter: Sebastian Heinlein <devel>
Component: coreAssignee: Richard Hughes <richard>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Sebastian Heinlein 2010-02-25 00:57:52 UTC
The allow_trusted argument gets lost during a install_files call. The python backend crashes with the following stacktrace:

Error Type:
Error Value: list index out of range
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2201, in
main()
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2198, in main
run(args, options.single)
File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2160, in run
backend.dispatcher(args)
File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 699, in dispatcher
self.dispatch_command(args[0], args[1:])
File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 590, in dispatch_command
files_to_inst = args[1].split(FILENAME_DELIM)
 CancelOk

The corresponding output of packagekitd:
TI:09:50:36FI:pk-store.cFN:pk_store_set_strv,90
 - saving 0x85fd558 for full_paths
TI:09:50:36FI:pk-backend-spawn.c FN:pk_backend_spawn_helper_va_list,715
 - using spawn filename /usr/share/PackageKit/helpers/apt/aptBackend.py
TI:09:50:36FI:pk-backend-spawn.c FN:pk_backend_spawn_get_envp,608
 - setting evp 'LANG=en_US.utf8'
TI:09:50:36FI:pk-network-stack-nm.c FN:pk_network_stack_nm_get_active_connection_type,202
 - active connections: 1
TI:09:50:36FI:pk-network-stack-nm.c FN:pk_network_stack_nm_get_active_connection_type_for_connection,133
 - is_default: 1
TI:09:50:36FI:pk-network-stack-nm.c FN:pk_network_stack_nm_get_active_connection_type_for_connection,153
 - number of devices: 1
TI:09:50:36FI:pk-network-stack-nm.c FN:pk_network_stack_nm_get_active_connection_type_for_device,93
 - type: 1
TI:09:50:36FI:pk-network-stack-nm.c FN:pk_network_stack_nm_get_state,251
 - network state is wired
TI:09:50:36FI:pk-backend-spawn.c FN:pk_backend_spawn_get_envp,616
 - setting evp 'NETWORK=TRUE'
TI:09:50:36FI:pk-backend-spawn.c FN:pk_backend_spawn_get_envp,622
 - setting evp 'IDLE=FALSE'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,448
 - argv[0] '/usr/share/PackageKit/helpers/apt/aptBackend.py'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,448
 - argv[1] 'install-files'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,448
 - argv[2] '/tmp/xterm_243-1ubuntu1_i386.deb'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,452
 - envp[0] 'LANG=en_US.utf8'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,452
 - envp[1] 'NETWORK=TRUE'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,452
 - envp[2] 'IDLE=FALSE'
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,502
 - creating new instance of /usr/share/PackageKit/helpers/apt/aptBackend.py
TI:09:50:36FI:pk-spawn.c FN:pk_spawn_argv,530
 - setting ioprio class to idle
TI:09:50:36FI:pk-backend-spawn.c FN:pk_backend_spawn_parse_stdout,467
 - invalid command 'Error: No BACKGROUND envp'
TI:09:50:36FI:pk-transaction.c FN:pk_transaction_status_changed_emit,437
 - emitting status-changed 'loading-cache'
TI:09:50:36FI:pk-transaction.c FN:pk_transaction_status_changed_emit,441
 - emitting changed
TI:09:50:36FI:pk-transaction-list.c FN:pk_transaction_list_is_consistent,734
 - checking consistency as length 1
TI:09:50:36FI:pk-transaction-list.c FN:pk_transaction_list_print,702
 - State:
0simulate-install-files/46_bcbbbcae_datarunning[1] committed[1] finished[0] background[0]

TI:09:50:37FI:pk-transaction.c FN:pk_transaction_error_code_emit,465
 - emitting error-code internal-error, 'Error Type: <type 'exceptions.IndexError'>
Error Value: list index out of range
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2203, in <module>
    main()
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2200, in main
    run(args, options.single)
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 2162, in run
    backend.dispatcher(args)
  File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 699, in dispatcher
    self.dispatch_command(args[0], args[1:])
  File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 590, in dispatch_command
    files_to_inst = args[1].split(FILENAME_DELIM)
'
TI:09:50:37FI:pk-backend.c FN:pk_backend_finished,1954
 - finished role unknown
TI:09:50:37FI:pk-transaction.c FN:pk_transaction_allow_cancel_cb,478
 - emitting allow-cancel 0
TI:09:50:37FI:pk-transaction.c FN:pk_transaction_status_changed_emit,437
 - emitting status-changed 'finished'
TI:09:50:37FI:pk-transaction.c FN:pk_transaction_status_changed_emit,441
 - emitting changed
TI:09:50:37FI:pk-backend.c FN:pk_backend_finished,2015
 - adding finished 0x85b2800 to timeout loop
TI:09:50:37FI:pk-spawn.c FN:pk_spawn_check_child,228
 - Running fork failed with return value 1
TI:09:50:37FI:pk-spawn.c FN:pk_spawn_check_child,252
 - emitting exit failed
TI:09:50:37FI:pk-backend-spawn.c FN:pk_backend_spawn_exit_cb,491
 - script exited without doing finished
TI:09:50:37FI:pk-backend.c FN:pk_backend_finished,1954
 - finished role unknown
TI:09:50:37FI:pk-backend.c FN:pk_backend_finished,1965
 - already finished
Comment 1 Richard Hughes 2010-02-25 01:09:36 UTC
Is this using git master? I can't see anything the problem with current git master...

 - argv[0] '../backends/yum/yumBackend.py'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,448
 - argv[1] 'install-files'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,448
 - argv[2] 'no'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,448
 - argv[3] '/home/hughsie/rpmbuild/REPOS/fedora/12/i386/darktable-git-0.17.fc13.i686.rpm'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,452
 - envp[0] 'LANG=en_US.UTF-8'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,452
 - envp[1] 'NETWORK=TRUE'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,452
 - envp[2] 'BACKGROUND=FALSE'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,452
 - envp[3] 'INTERACTIVE=TRUE'
TI:09:08:41	FI:pk-spawn.c	FN:pk_spawn_argv,502
 - creating new instance of ../backends/yum/yumBackend.py
Comment 2 Jean-François Fortin Tam 2012-01-05 10:56:41 UTC
Hi there,
This particular bug needs additional information to fix the bug. Please test the latest version of PackageKit and see if it fixes your problem. If it does not, please provide additional information to help the developers.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.