Knocking Python 2 off the desktop iso

Till Kamppeter till.kamppeter at gmail.com
Tue Mar 8 01:22:52 UTC 2016


On 03/05/2016 02:31 PM, Barry Warsaw wrote:
>
> I don't know the code or expected workflow here, so I could be totally off
> base, but it looks like _installSMBBackendIfNeeded() is trying to install
> samba-client, which is a virtual package provided by smbclient.  smbclient
> depends on libsmbclient.
>
> If you changed that to installing python3-smbc, you'd still get libsmbclient,
> but I don't know if you're depending on something in smbclient that's not in
> libsmbclient.  If so, then I think you can just modify s-c-p's
> PackageKit.InstallPackageName() method to accept multiple package names (or
> add a new method that accepts more than one).  Then you'd pass smbclient and
> python3-smbclient to them.
>
> But that may still hit the problem you're describing above.
>

I have it all fixed now and uploaded as system-config-printer 
1.5.7+20160212-0ubuntu2. Here python3-smbc is demoted to Suggests: and 
the option for setting up a "Windows Printer via SAMBA" is already 
available in the list of available devices if smbclient (contains the 
"smb" CUPS backend) is not installed.

If the user chooses the "Windows Printer via SAMBA" and clicks either 
the "Browse" or the "Verify" button, python3-smbc gets installed, as it 
is used by these functions.

If the user sets up a printer with a "smb://..." URI, the smbclient 
package gets installed as the "smb" CUPS backend is needed to use this 
printer.

To make the installation of the packages exit only when the packages are 
actually installed, I succeeded to solve after some Googling. The 
InstallPackageNames() D-Bus method of PackageKit has a parameter to 
select which stages of the installation process should be displayed or 
not and the method exits after the last displayed stage, and lets the 
installation go on in the background if there are more stages. Now I let 
the last stage get displayed and everything works as intended.

    Till




More information about the ubuntu-devel mailing list