[mythtv-users] failure on v31 mythplugins on clean install

Bill Meek keemllib at gmail.com
Sun Mar 15 14:04:23 UTC 2020


On 3/8/20 6:28 AM, Mike Bibbings wrote:
> On 08/03/2020 10:46, Mike Bibbings wrote:
>> On 07/03/2020 20:24, Bill Meek wrote:
>>> On 3/6/20 8:57 AM, James Abernathy wrote:
>>>>
>>>>> On Mar 6, 2020, at 9:40 AM, Bill Meek <keemllib at gmail.com> wrote:
>>>>>
>>>>> On 3/6/20 5:35 AM, Jim Abernathy wrote:
>>>>>> Since I had a problem upgrading mythweb on my development system again, I tried a fresh build. I wiped the hard drive and reinstalled 
>>>>>> Ubuntu 18.04.4 and then mythtv.
>>>>>> However, when I got to mythplugins I got this error on mythweb:
>>>>>> Selecting previously unselected package mythweb.
>>>>>> Preparing to unpack .../117-mythweb_2%3a31.0+fixes.202003051106.1460627~ubuntu18.04.1_all.deb ...
>>>>>> /var/lib/dpkg/tmp.ci/preinst: 7: /var/lib/dpkg/tmp.ci/preinst: php: not found
>>>>>
>>>>> ...
>>>>>
>>>>> php again. Last time you reported, php was there because
>>>>> php -r 'echo PHP_MAJOR_VERSION, ".", PHP_MINOR_VERSION;'
>>>>> worked. I'll comment more in the the related thread
>>>>> this morning.
>>>>>
>>>>> php -r 'echo PHP_MAJOR_VERSION, ".", PHP_MINOR_VERSION;’ didn’t work this time on a clean system with no mythplugins installed.
>>>>
>>>> I then installed php 7.2 and I could then install mythplugins correctly.
>>>>
>>>> I can’t say I know why, but this worked.  Hopefully all this will get fixed at some point for a clean install of mythtv and mythplugins on 
>>>> Ubuntu 18.04
>>>
>>> Spun up 18.04 today. php7.2 is installed OK. But, there's no entry for php in /etc/alternatives.
>>>
>>> php7.2-cli.postinst has code that COULD installing alternatives. Haven't found a solution
>>> yet. I was testing apt install mythweb though, not mythplugins.
>>>
>>>
>> Bill,
>>
>> As you may have found out, the problem is due to php not having been installed at the time mythweb.preinst is run, so 
>> CURRENT_PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION, ".", PHP_MINOR_VERSION;') fails as php not found:
>>
>> Selecting previously unselected package mythweb.
>> Preparing to unpack .../123-mythweb_2%3a31.0+fixes.202003052109.7097da3~ubuntu18.04.1_all.deb ...
>> /var/lib/dpkg/tmp.ci/preinst: 7: /var/lib/dpkg/tmp.ci/preinst: php: not found
>> dpkg: error processing archive /tmp/apt-dpkg-install-LbyUJ4/123-mythweb_2%3a31.0+fixes.202003052109.7097da3~ubuntu18.04.1_all.deb (--unpack):
>>  new mythweb package pre-installation script subprocess returned error exit status 127
>> postrm called with unknown argument `abort-install'
>> dpkg: error while cleaning up:
>>  new mythweb package post-removal script subprocess returned error exit status 1
>>
>> command used sudo apt install mythtv mythplugins
>>
>> sudo apt --fix-broken install (run it twice) followed by sudo apt install mythplugins seems to resolve.
>>
>> I am not sure we even need mythweb.preinst to do anything as the only thing it does is move 20-mythweb.conf , which mythweb.postinst does 
>> anyway (but php should have been installed by this time)
>>
>>
>> Mike
>>
> Bill,
> 
> Another thought.
> 
> In mythweb.preinst add a test to check if php exists e.g. 'which php' and only run CURRENT_PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION, ".", 
> PHP_MINOR_VERSION;') if 'which' returns a good result.
> 
> 
> Mike

Just pushed a fix to exit mythweb.preinst immediately (with rc=0.) I don't know the original reason
for this file, but in was added in 2016.

-- 
Bill


More information about the mythtv-users mailing list