On 03/26/2014 07:54 PM, Ritesh Raj Sarraf wrote:
> run-parts: executing /etc/kernel/header_postinst.d/dkms 3.13-1-amd64
> invalid /etc/os-release: Does not contain NAMe and VERSION_ID
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Error! Bad return status for module build on kernel: 3.13-1-amd64
> (x86_64)
> Consult /var/lib/dkms/iscsitarget/1.4.20.3+svn496/build/make.log for
> more information.
>                                     

The problem lies with the fact that VERSION_ID isn't available in
Debian's /etc/os-release.

                with open('/etc/os-release') as f:
                        for l in f:
                                if l.startswith('NAME='):
                                        name = l.split('=', 1)[1]
                                        if name.startswith('"'):
                                                name = name[1:-2].strip()
                                        elif l.startswith('VERSION_ID='):
                                                version = l.split('=', 1)[1]
                                                if version.startswith('"'):
                                                        version =
version[1:-2].strip()
                                        if name and version:
                                                os_version = (name, version)
                                                print _os_version
                                        else:  
                                               
sys.stderr.write('invalid /etc/os-release: Does not contain NAMe and
VERSION_ID\n')
                                                sys.exit(1)
   ...:                                    
invalid /etc/os-release: Does not contain NAMe and VERSION_ID
An exception has occurred, use %tb to see the full traceback.

SystemExit: 1

To exit: use 'exit', 'quit', or Ctrl-D.



Also wrong is for apport to sys.exit(1) in the /etc/os-release error
case. If it is error, it shouldn't abort but rather fallback to lsb

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to