LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: kane0615

请问gentoo支持LSB吗?

[复制链接]
 楼主| 发表于 2006-11-26 21:47:59 | 显示全部楼层
我装的是university版的,portage没更新,那位帮我装一个,看有LSB相关的包吗? 这个源码包,我是找不到了. 还有在GENTOO下有没有,像RPM,DPKG之类的工具吗? 我找的那个源码包,我不知道怎么装. http://ftp.debian.org/debian/pool/ma...b_2.0-7.tar.gz 
thanks a lot.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-26 21:51:52 | 显示全部楼层
Post by 种草得草
楼主好像不知道lsb是什么东西。
google well tell you
那现在要装一个软件,需要LSB支持. 我需要装什么包? 
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-26 21:52:59 | 显示全部楼层
作者: 种草得草
楼主好像不知道lsb是什么东西。
google well tell you



看六楼,我理解是否正确?
回复 支持 反对

使用道具 举报

发表于 2006-11-26 21:58:10 | 显示全部楼层
Post by kane0615
呵呵,因为要测试HPLIP的BULID,所以要装最新的,只能手动装了. 那位帮帮忙,emerge --pretend hplip,帮我看一下, 有没有LSB相关的包. 我这没找到相关的

localhost / # ACCEPT_KEYWORDS="~amd64" emerge --pretend hplip
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] media-gfx/xsane-0.99
[ebuild  N    ] net-print/foomatic-db-20050910
[ebuild  N    ] net-print/foomatic-3.0.2
[ebuild  N    ] net-print/hplip-0.9.7-r3
  1. # USE="X foomaticdb qt3 scanner snmp" emerge -pv hplip

  2. These are the packages that would be merged, in order:

  3. Calculating dependencies          ... done!
  4. [ebuild  N    ] dev-python/qscintilla-1.5.1  USE="-doc" 710 kB
  5. [ebuild  N    ] dev-python/sip-4.2.1  USE="-debug -doc" 305 kB
  6. [ebuild  N    ] dev-python/PyQt-3.14.1-r2  USE="-debug -doc -examples" 763 kB
  7. [ebuild  N    ] media-gfx/xsane-0.991  USE="nls png -gimp -jpeg -tiff" 2,862 kB
  8. [ebuild  N    ] dev-perl/TermReadKey-2.30  36 kB
  9. [ebuild  N    ] dev-perl/perl-tk-804.027  5,870 kB
  10. [ebuild  N    ] net-analyzer/net-snmp-5.2.1.2-r1  USE="X ipv6 perl ssl tcpd -doc -elf -lm_sensors -minimal -rpm (-selinux) -smux" 3,779 kB
  11. [ebuild  N    ] net-print/hplip-1.6.10  USE="X foomaticdb ppds qt3 scanner snmp" 10,410 kB
复制代码

我也没看到依赖LSB,或许根本就不需要什么LSB包。而且据我所知LSB不过是一套标准,并非什么软件包。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-26 22:01:08 | 显示全部楼层
但是需要一个LSB的软件包 提供这种支持 在其他系统上就有 lsb*.rpm 之类的 10K左右, 装了以后才可以对其他的第三方软件提供支持
回复 支持 反对

使用道具 举报

发表于 2006-11-26 22:05:20 | 显示全部楼层
Post by kane0615
但是需要一个LSB的软件包 提供这种支持 在其他系统上就有 lsb*.rpm 之类的 10K左右

portage唯一叫lsb的东西就一个:
  1. # eix -S lsb
  2. * sys-apps/lsb-release
  3.      Available versions:  ~1.4
  4.      Installed:           none
  5.      Homepage:            http://www.linuxbase.org/
  6.      Description:         LSB version query program
复制代码

既然emerge -pv hplip(加上所有USE)没显示,就说明不需要。不要拿其他系统的情况想当然。你干吗不emerge装上试一试?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-26 22:06:11 | 显示全部楼层
那位PYTHON好点,帮着看下.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# Author: Don Welch
#

__version__ = '4.0'
__title__ = 'Dependency/Version Check Utility'
__doc__ = "Check the existence and versions of HPLIP dependencies."

# Std Lib
import sys
import os
import getopt
import commands
import re

# Local
from base.g import *
from base import utils, dcheck, distros


USAGE = [(__doc__, "", "name", True),
         ("Usage: hp-check [OPTIONS]", "", "summary", True),
         utils.USAGE_OPTIONS,
         utils.USAGE_LOGGING1, utils.USAGE_LOGGING2, utils.USAGE_LOGGING3,
         utils.USAGE_HELP,
        ]

def usage(typ='text'):
    if typ == 'text':
        utils.log_title(__title__, __version__)

    utils.format_text(USAGE, typ, __title__, 'hp-check', __version__)
    sys.exit(0)        

build_str = "HPLIP will not build, install, and/or function properly without this dependency."

dependencies = {
    'libjpeg':          (True, "libjpeg - JPEG library", build_str, dcheck.check_libjpeg),
    'cups' :            (True, "cups - Common Unix Printing System", build_str, dcheck.check_cups),
    'cups-devel':       (True, 'cups-devel- Common Unix Printing System development files', build_str, dcheck.check_cups_devel),
    'gcc' :             (True, 'gcc - GNU Project C and C++ Compiler', build_str, dcheck.check_gcc),
    'make' :            (True, "make - GNU make utility to maintain groups of programs", build_str, dcheck.check_make),
    'python-devel' :    (True, "python-devel - Python development files", build_str, dcheck.check_python_devel),
    'libpthread' :      (True, "libpthread - POSIX threads library", build_str, dcheck.check_libpthread),
    'python2x':         (True, "ython 2.2 or greater - Python programming language", build_str, dcheck.check_python2x),
    'gs':               (True, "GhostScript - PostScript and PDF language interpreter and previewer", build_str, dcheck.check_gs),
    'libusb':           (True, "libusb - USB library", build_str, dcheck.check_libusb),
    'lsb':              (True, "LSB - Linux Standard Base support", build_str, dcheck.check_lsb),

    'sane':             (True,  "SANE - Scanning library", "HPLIP scanning feature will not function.", dcheck.check_sane),
    'xsane':            (False, "xsane - Graphical scanner frontend for SANE", "This is an optional package.", dcheck.check_xsane),
    'scanimage':        (False, "scanimage - Shell scanning program", "This is an optional package.", dcheck.check_scanimage),

    'reportlab':        (False, "Reportlab - PDF library for Python", "HPLIP faxing will not have the coverpage feature.", dcheck.check_reportlab),
    'python23':         (True,  "ython 2.3 or greater - Required for fax functionality", "HPLIP faxing feature will not function.", dcheck.check_python23),

    'ppdev':            (True,  "ppdev - Parallel port support kernel module.", "arallel port (LPT) connected printers will not work with HPLIP", dcheck.check_ppdev),

    'pyqt':             (True,  "yQt - Qt interface for Python", "HPLIP GUIs will not function.", dcheck.check_pyqt),

    'libnetsnmp-devel': (True,  "libnetsnmp-devel - SNMP networking library development files", "Networked connected printers will not work with HPLIP", dcheck.check_libnetsnmp),
    'libcrypto':        (True,  "libcrypto - OpenSSL cryptographic library", "Networked connected printers will not work with HPLIP", dcheck.check_libcrypto),

}

def header(text):
    c = len(text)
    log.info("")
    log.info("-"*(c+4))
    log.info("| "+text+" |")
    log.info("-"*(c+4))
    log.info("")
  
num_errors = 0
  
try:
    log.set_module("hp-check")
   
    try:
        opts, args = getopt.getopt(sys.argv[1:], 'hl:g',
            ['help', 'help-rest', 'help-man', 'help-desc', 'logging='])
   
    except getopt.GetoptError:
        usage()
        sys.exit(1)
   
    if os.getenv("HPLIP_DEBUG"):
        log.set_level('debug')
   
    log_level = 'info'
   
    for o, a in opts:
        if o in ('-h', '--help'):
            usage()
   
        elif o == '--help-rest':
            usage('rest')
   
        elif o == '--help-man':
            usage('man')
            
        elif o == '--help-desc':
            print __doc__,
            sys.exit(0)
   
        elif o in ('-l', '--logging'):
            log_level = a.lower().strip()
   
        elif o == '-g':
            log_level = 'debug'
   
   
    if not log.set_level(log_level):
        usage()
   
    utils.log_title(__title__, __version__)   
   
    header("SYSTEM INFO")
   
    log.info(utils.bold("Basic system info (uname -a):"))
    status, output = utils.run('uname -a')
    log.info("--> %s" % output.replace('\n', ''))
   
    log.info(utils.bold("\nDetected distro (/etc/issue):"))
    distro, distro_version = distros.getDistro()
    distro_name = distros.distros_index[distro]
    log.info("--> %s %s" % (distro_name, distro_version))
   
    log.info(utils.bold("\nDetected distro (lsb_release):"))
    lsb_release = utils.which("lsb_release")
    if lsb_release:
        cmd = os.path.join(lsb_release, "lsb_release")
        status, vendor = utils.run(cmd + " -i")
        vendor = vendor.split(':')[1].strip()
        status, ver = utils.run(cmd + " -r")
        ver = ver.split(':')[1].strip()
        status, code = utils.run(cmd + " -c")
        code = code.split(':')[1].strip()
        log.info("--> %s %s (%s)" % (vendor, ver, code))
    else:
        log.error("lsb_release not found.")
        
    log.info(utils.bold("\nCurrently installed version..."))
    v = sys_cfg.hplip.version
    home = sys_cfg.dirs.home
    if v:
        log.info("--> OK, HPLIP %s currently installed in '%s'." % (v, home))
        
        log.info(utils.bold("\nCurrent contents of '/etc/hp/hplip.conf' file:"))
        output = file('/etc/hp/hplip.conf', 'r').read()
        log.info(output)
        
    else:
        log.info("--> OK, not found.")
   
    log.info(utils.bold("\nHPLIP running?"))
    hplip_present = dcheck.check_hplip_running()
    if hplip_present:
        log.info("--> Yes, HPLIP is running (OK).")
    else:
        log.info("--> No, HPLIP is not running (OK).")
   
    log.info(utils.bold("\nHPOJ running?"))
    hplip_present = dcheck.check_hpoj()
    if hplip_present:
        log.error("Yes, HPOJ is running. HPLIP is not compatible with HPOJ. To run HPLIP, please remove HPOJ.")
        num_errors += 1
    else:
        log.info("--> No, HPOJ is not running (OK).")
   
   
    log.info(utils.bold("\nChecking Python version..."))
    ver = sys.version_info
    log.debug("sys.version_info = %s" % repr(ver))
    ver_maj = ver[0]
    ver_min = ver[1]
    ver_pat = ver[2]
   
    if ver_maj == 2:
        if ver_min >= 1:
            log.info("--> OK, version %d.%d.%d installed" % ver[:3])
        else:
            log.error("Version %d.%d.%d installed. Please update to Python >= 2.1" % ver[:3])
            sys.exit(1)
   
    header("DEPENDENCIES")
               
    dcheck.update_ld_output()
    print
   
    for d in dependencies:
        log.debug("***")
   
        log.info(utils.bold("Checking for dependency '%s (%s)'..." % (d, dependencies[d][1])))
   
        if dependencies[d][3]():
            log.info("--> OK, found.")
        else:
            num_errors += 1
            log.error("Not found!")
            
            if dependencies[d][0]:
                log.error("This is a REQUIRED dependency.")
            else:
                log.info("This is an OPTIONAL dependency.")
        
        print
   
    header("INSTALLED PRINTERS")
   
    from base import device
    lpstat_pat = re.compile(r"""^device for (.*): (.*)""", re.IGNORECASE)
   
    status, output = utils.run('lpstat -v')
    print
   
    cups_printers = []
    for p in output.splitlines():
        try:
            match = lpstat_pat.search(p)
            printer_name = match.group(1)
            device_uri = match.group(2)
            cups_printers.append((printer_name, device_uri))
        except AttributeError:
            pass
   
    if cups_printers:
        non_hp = False
        for p in cups_printers:
            try:
                back_end, is_hp, bus, model, serial, dev_file, host, port = \
                    device.parseDeviceURI(p[1])
   
            except Error:
                is_hp = False
   
            if is_hp:
                x = 'Yes'
            else:
                x = 'No'
                non_hp = True
   
            log.info(utils.bold(p[0]))
            log.info(utils.bold('-'*len(p[0])))
            log.info("Device URI: %s" % p[1])
            log.info("Installed in HPLIP? %s" % x)
            
            ppd = os.path.join('/etc/cups/ppd', p[0] + '.ppd')
            
            if os.path.exists(ppd):
                log.info("PD: %s" % ppd)
                nickname_pat = re.compile(r'''\*NickName:\s*\"(.*)"''', re.MULTILINE)
               
                f = file(ppd, 'r').read(4096)
   
                try:
                    desc = nickname_pat.search(f).group(1)
                except AttributeError:
                    desc = ''
                    
                log.info("PD Description: %s" % desc)
               
                status, output = utils.run('lpstat -p%s' % p[0])
                log.info("\nPrinter status:")
                log.info(output)
               
                if back_end == 'hpfax' and desc != 'HP Fax':
                    num_errors += 1
                    log.error("Incorrect PPD file for fax queue '%s'. Fax queue must use 'HP-Fax-hplip.ppd'." % p[0])
                    
            print
   
        if non_hp:
            log.note("Any CUPS queues that are not 'HPLIP Installed', must be installed")
            log.note("with the 'hp:' or 'hpfax:' backends to have them work in HPLIP. Refer")
            log.note("to the install instructions on http://hplip.sourceforge.net for more help.")
   
    else:
        log.info("No queues found.")
        
    header("SANE CONFIGURATION")
    log.info(utils.bold("'hpaio' in /etc/sane.d/dll.conf'..."))
    f = file('/etc/sane.d/dll.conf', 'r')
    found = False
    for line in f:
        if 'hpaio' in line:
            found = True
            
    if found:
        log.info("--> OK, found. SANE backend 'hpaio' is not properly set up.")
    else:
        num_errors += 1
        log.error("Not found.")
            
   
    log.info(utils.bold("\nChecking output of 'scanimage -L'..."))
    if utils.which('scanimage'):
        status, output = utils.run("scanimage -L")
        log.info(output)
    else:
        log.error("scanimage not found.")
   
    header("YTHON EXTENSIONS")
   
    log.info(utils.bold("Checking 'cupsext' CUPS extension..."))
    try:
        import cupsext
    except ImportError:
        num_errors += 1
        log.error("Not found!")
    else:
        log.info("--> OK, found.")
   
    log.info(utils.bold("\nChecking 'pcardext' Photocard extension..."))
    try:
        import pcardext
    except ImportError:
        num_errors += 1
        log.error("Not found!")
    else:
        log.info("--> OK, found.")
        
    print
   
    if num_errors:
        log.info("\n%d errors were detected.")
        log.info("lease refer to the installation instructions at:")
        log.info("http://hplip.sourceforge.net/install/index.html\n")

except KeyboardInterrupt:
    print utils.red("Aborted")
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-26 22:11:22 | 显示全部楼层
Post by Fleta
portage唯一叫lsb的东西就一个:
  1. # eix -S lsb
  2. * sys-apps/lsb-release
  3.      Available versions:  ~1.4
  4.      Installed:           none
  5.      Homepage:            http://www.linuxbase.org/
  6.      Description:         LSB version query program
复制代码

既然emerge -pv hplip(加上所有USE)没显示,就说明不需要。不要拿其他系统的情况想当然。你干吗不emerge装上试一试?

我装的是university版的,portage没更新,就是想让那位帮我试一下,那我等着更新吧.
sys-apps/lsb-release 这个在SOURCEFORGE上有,早装了. 谢谢,大家了. 我都不确定现在的版本在GENTOO上还支持吗
回复 支持 反对

使用道具 举报

发表于 2006-11-26 22:20:30 | 显示全部楼层
1 lsb是一个标准,不是一个软件。
2 你所要安装的软件只需简单地 # emerge hplip
3 告诉你说google了
回复 支持 反对

使用道具 举报

发表于 2006-11-26 22:21:00 | 显示全部楼层
Post by kane0615
... 我都不确定现在的版本在GENTOO上还支持吗

我的显示里不就是1.6.10吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表