package mythexport 2.2.4-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1079972 reported by Gregg Kniss
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
mythexport (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Occurs when trying to install mythexport.

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: mythexport 2.2.4-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-33.52-generic 3.2.31
Uname: Linux 3.2.0-33-generic x86_64
ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Fri Nov 16 23:41:52 2012
DuplicateSignature:
 Setting up mythexport (2.2.4-0ubuntu1) ...
 mkdir: missing operand
 Try `mkdir --help' for more information.
 dpkg: error processing mythexport (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Mythbuntu 12.04 "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: mythexport
Title: package mythexport 2.2.4-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gregg Kniss (gkniss) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mythexport (Ubuntu):
status: New → Confirmed
Revision history for this message
Milton Perry (miltonperry) wrote :

Still seeing this error with 14.04 mythbuntu.

Setting up mythexport (2.2.4-0ubuntu2) ...
Progress: [ 98%]
mkdir: missing operand
Try 'mkdir --help' for more information.
dpkg: error processing package mythexport (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mythexport
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Thomas Mashos (tgm4883) wrote :

I pinged the dev on this. How did you try to install this. Were you using software center, apt, or something else?

Revision history for this message
rhpot1991 (rhpot1991) wrote :

It almost looks like you entered a space or something when asked what folder to use?

Revision history for this message
Phil Buckler (buck2825) wrote :

i'm getting this error.

I originally install from software center. trying to uninstall and reinstall for a clean start. On clicking remove I get this error. tried to reinstall from software center. states the package is installed. switch to terminal

user@Bugs-Bunny:~$ sudo apt-get purge mythtv
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mythtv' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mythexport (2.2.4-0ubuntu2) ...
mkdir: missing operand
Try 'mkdir --help' for more information.
dpkg: error processing package mythexport (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mythexport
E: Sub-process /usr/bin/dpkg returned an error code (1)

user@Bugs-Bunny:~$ sudo apt-get install mythtv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mythtv
0 upgraded, 1 newly installed, 0 to remove and 46 not upgraded.
1 not fully installed or removed.
Need to get 0 B/78.1 kB of archives.
After this operation, 103 kB of additional disk space will be used.
Selecting previously unselected package mythtv.
(Reading database ... 249418 files and directories currently installed.)
Preparing to unpack .../mythtv_2%3a0.27.2+fixes.20140701.572c4e3-0ubuntu0mythbuntu3_all.deb ...
Unpacking mythtv (2:0.27.2+fixes.20140701.572c4e3-0ubuntu0mythbuntu3) ...
Setting up mythexport (2.2.4-0ubuntu2) ...
mkdir: missing operand
Try 'mkdir --help' for more information.
dpkg: error processing package mythexport (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up mythtv (2:0.27.2+fixes.20140701.572c4e3-0ubuntu0mythbuntu3) ...
Errors were encountered while processing:
 mythexport
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Phil Buckler (buck2825) wrote :

I manually removed mythexport and all other packages with myth* in the name using the below CLI

sudo mv /var/lib/dpkg/info/mythexport.* /tmp/
sudo dpkg --purge --force-remove-reinstreq mythexport

ran

sudo apt-get update
sudo apt-get install mythtv

everything installed

Revision history for this message
petestrash (petestrash) wrote :

I have the same issue on a clean install of Mythbuntu.

Following the instructions in comment #7, It resolves the mkdir error and sudo apt-get upgrade completes.

However starting the Mythbuntu control centre, mythexport fails and we are back to the beginning again.

Revision history for this message
Jamie Townsend (email-jamietownsend) wrote :

I'm getting the same thing and (I think) I've managed to track it down a little further.

I've got the same 'mkdir' issue...

This is Mythbuntu 14.04...

 cat /etc/lsb-release

gives us

 DISTRIB_ID=Ubuntu
 DISTRIB_RELEASE=14.04
 DISTRIB_CODENAME=trusty
 DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

Just so we're clear what version I've got here.

 sudo dpkg -i /var/cache/apt/archives/mythexport_2.2.4-0ubuntu2_amd64.deb
 (Reading database ... 149243 files and directories currently installed.)
 Preparing to unpack .../mythexport_2.2.4-0ubuntu2_amd64.deb ...
  * Stopping MythExport Daemon: mythexport
 No /usr/bin/perl found running; none killed.
    ...done.
 Unpacking mythexport (2.2.4-0ubuntu2) over (2.2.4-0ubuntu2) ...
 Setting up mythexport (2.2.4-0ubuntu2) ...
 mkdir: missing operand
 Try 'mkdir --help' for more information.
 dpkg: error processing package mythexport (--install):
  subprocess installed post-installation script returned error exit status 1
 Processing triggers for ureadahead (0.100.0-16) ...
 Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
 Errors were encountered while processing:
  mythexport

So ... I extracted the deb package to a temp location

 dpkg -e /var/cache/apt/archives/mythexport_2.2.4-0ubuntu2_amd64.deb .

And have started poking around the files.

My shell scripting leaves a lot to be desired but I think the issue lies somewhere around here in the postinst file

case "$1" in
    configure)
    . /usr/share/debconf/confmodule

    db_get mythexport/dir
    dir="$RET"

    if [ -n $dir ]; then
        mkdir -p $dir

(BTW, what value are we expecting for $1 for the 'case' statement?? I assume $1 is something passed to the script, but I can't work out what it would be.)

Since this is the only 'mkdir' line in the script I guess this would be the issue...

So ... we need to mkdir the $dir path which (if I'm reading the script correctly) should be returned from

 db_get mythexport/dir

But ... what is db_get? Where is it run from (file or function)? What should it return (a path)?

My knowledge of deb packages is considerably less than shell scripting so I'm really getting lost here ... I think I can see where it is going wrong, but do not know how to find more information.

I tried adding debugging to the dpkg command

 sudo dpkg --debug=2000 -i /var/cache/apt/archives/mythexport_2.2.4-0ubuntu2_amd64.deb

But this did not really show anything I found useful.

Rather continue to fiddle around running various bits and pieces manually I thought I'll add my 2c worth to this and see if anyone can make some sense of this and work out what I (and others) need to do to get mythexport installed.

So far, everything is working really well. I've had to rebuild after a HDD crash and I've jumped quite a few versions. It's the same good old MythTV, just made better - the kids love the Metadata stuff!

Revision history for this message
petestrash (petestrash) wrote :

Is there a workaround for this?

Revision history for this message
rhpot1991 (rhpot1991) wrote :

If you run sudo dpkg-reconfigure mythexport and provide a real path it should work. It should be defaulting to a good path if junk is provided, not sure why that doesn't work sometimes.

Revision history for this message
petestrash (petestrash) wrote :

Thanks for that.

Running sudo dpkg-reconfigure mythexport, I get mythexport is broken or not fully installed.

In desperation, I did a clean install of ubuntu 15.04 and mythtv on a different drive, rather than using mythbuntu as I had originally.

I still get the same issue with mythexport borking at the mkdir line.

Revision history for this message
boofsterb (boofsterb) wrote :

Any logical solution to the mythexport dilemma.

Revision history for this message
Harry Coin (hcoin) wrote :

Bug with fix is here:

Note mythexport/dir in debconf's config.dat is empty.

mythexport.postinst:
...
case "$1" in
    configure)
    . /usr/share/debconf/confmodule

    db_get mythexport/dir
    dir="$RET"
-- if [ -n $dir ]; then
++ if [ "x$dir" != "x" ]; then
       mkdir -p $dir

        chown mythtv:mythtv $dir || true

        mkdir -p $dir

        chown mythtv:mythtv $dir || true
...

Revision history for this message
Steve Harrington (steve-the-harringtons) wrote :

Harry's fix worked for me.

Revision history for this message
5imon (m-ubuntu-1) wrote :

It didn't work for me.

http://ubuntuforums.org/showthread.php?t=2239731

I have tried re-installing Mythbuntu 0.27 from scratch and the bug remains.
I've even tried installing Mythbuntu 0.28 and the bug is still present.
I've tried installing MythTV on Ubuntu 15.4 and the bug remains.

Revision history for this message
David Smoot (davidsmoot) wrote :

I ran into the bug today when I did apt-get dist-upgrade on my mythbuntu 14.04 system. The fix of post #14 worked for me to install mythexport.

Revision history for this message
Milton Perry (miltonperry) wrote :

Harry's fixed worked for me also.
And for the people out there (like me) who have trouble deciphering code.

1.Find the mythexport.postinst file
(for me it was at /var/lib/dpkg/info (unbuntu 14.10))

2. remove the line with the -- (as you will see the -- is not actually there)

3. add the line with the ++ in it's place (please leave the ++ off)

4. save and exit

5. apt-get install mythexport

6. done

(note: I had already manually created the .mythtv directory in the /var/www/ directory)

Hope this helps

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.