Comment 7 for bug 1796864

Revision history for this message
Martin Gladigau (maddingl) wrote : Re: [Bug 1796864] Re: Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1

I haven't had the time to do that by now, probably Sunday :) Thanks for
asking :)

On Fri, 12 Oct 2018 at 21:12, brian_p <email address hidden> wrote:

> Checked out now? How did it go?
>
> --
> Brian.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1796864
>
> Title:
> Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1
>
> Status in HPLIP:
> New
>
> Bug description:
> I am running Arch Linux.
> When trying to install hplip as described here:
> https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
> , I get the following output/error:
>
>
> ####################################################################################################
>
> $ sh /home/maddin/user_programs/hplip-3.18.9.run
>
> Creating directory hplip-3.18.9
> Verifying archive integrity... All good.
> Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]
>
> HP Linux Imaging and Printing System (ver. 3.18.9)
> HPLIP Installer ver. 5.1
>
> Copyright (c) 2001-15 HP Development Company, LP
> This software comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to distribute it
> under certain conditions. See COPYING file for more details.
>
> Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
>
> \
> note: Defaults for each question are maked with a '*'. Press <enter> to
> accept the default. -Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 266, in walkFiles
> names = os.listdir(root)
> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 268, in walkFiles
> raise StopIteration
> StopIteration
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "./install.py", line 241, in <module>
> text_install.start(language, auto, test_depends, test_unknown,
> assume_network, max_retries, enable, disable)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line
> 86, in start
> core.init()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 528, in init
> self.check_dependencies(callback)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 621, in check_dependencies
> self.have_dependencies[d] = self.dependencies[d][3]()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 1242, in check_policykit
> if check_file('PolicyKit.conf', "/etc/PolicyKit") and
> check_file('org.gnome.PolicyKit.AuthorizationManager.service',
> "/usr/share/dbus-1/services"):
> File "/home/maddin/user_programs/hplip-3.18.9/installer/dcheck.py",
> line 108, in check_file
> for w in utils.walkFiles(dir, recurse=True, abs_paths=True,
> return_folders=False, pattern=f):
> RuntimeError: generator raised StopIteration
>
>
> ####################################################################################################
>
> So the installer cannot find '/etc/PolicyKit'. This is no wonder,
> since the name PolicyKit is outdated, as described here:
> https://en.wikipedia.org/wiki/Polkit . In fact, I do have a folder
> called '/etc/polkit-1'.
>
> Note: How I got there:
>
> Before trying this way, I tried to install via 'pacman -S hplip'. This
> does work, however, hp-check will print: 'warning: CUPSEXT could not be
> loaded. Please check HPLIP installation.'
> So I looked at this page:
> https://www.cyberciti.biz/faq/debian-ubuntu-hp-linux-imaging-printing-warning-cupsext/
> and, even though it is debian here, I thought I'd give it a try installing
> from the run-file instead of via pacman.
>
> When I try to run something like hp-systray after installing via pacman,
> I do get the error "ModuleNotFoundError: No module named 'cupsext'".
> When I run hp-doctor, it fails due to not finding '/etc/PolicyKit'
> again:
>
>
> ####################################################################################################
>
> $ hp-doctor
>
> HP Linux Imaging and Printing System (ver. 3.18.6)
> Self Diagnse Utility and Healing Utility ver. 1.0
>
> Copyright (c) 2001-15 HP Development Company, LP
> This software comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to distribute it
> under certain conditions. See COPYING file for more details.
>
>
> HP Linux Imaging and Printing System (ver. 3.18.6)
> Self Diagnse Utility and Healing Utility ver. 1.0
>
> Copyright (c) 2001-15 HP Development Company, LP
> This software comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to distribute it
> under certain conditions. See COPYING file for more details.
>
> \Traceback (most recent call last):
> File "/usr/share/hplip/base/utils.py", line 266, in walkFiles
> names = os.listdir(root)
> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/share/hplip/base/utils.py", line 268, in walkFiles
> raise StopIteration
> StopIteration
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "/usr/bin/hp-doctor", line 276, in <module>
> dep.core.init()
> File "/usr/share/hplip/installer/core_install.py", line 500, in init
> self.check_dependencies(callback)
> File "/usr/share/hplip/installer/core_install.py", line 593, in
> check_dependencies
> self.have_dependencies[d] = self.dependencies[d][3]()
> File "/usr/share/hplip/installer/core_install.py", line 1164, in
> check_policykit
> if check_file('PolicyKit.conf', "/etc/PolicyKit") and
> check_file('org.gnome.PolicyKit.AuthorizationManager.service',
> "/usr/share/dbus-1/services"):
> File "/usr/share/hplip/installer/dcheck.py", line 108, in check_file
> for w in utils.walkFiles(dir, recurse=True, abs_paths=True,
> return_folders=False, pattern=f):
> RuntimeError: generator raised StopIteration
>
>
> ####################################################################################################
>
> So whether I use pacman or the .run - file, the problem seems to be
> the same in the end.
>
> Could you please fix this or at least tell me a good workaround?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hplip/+bug/1796864/+subscriptions
>