|
|
第 16 帖 | |
|
|
感谢,fc7下面速度也不错
|
|
|
|
|
|
|
|
第 17 帖 | |
|
|
标题: 用命令行看可以看到用10线程在下载,用yumex没有显示axel加载成功,并用多线程下载,请问yumex是不是还要特殊配置一下 用命令行看可以看到用10线程在下载,用yumex没有显示axel加载成功,并用多线程下载,请问yumex是不是还要特殊配置一下?
|
|
|
|
|
|
|
|
第 18 帖 | ||
|
|
引用:
__________________
妄世人皆行我欲之事,祸也;见世人皆行我欲之事,福也! 世人皆求,乱也;世人皆得,治也。得而无伤,修也;勾牵无碍,成也! |
||
|
|
|
||
|
|
第 19 帖 | |
|
|
加了那段判断语句后出现错误,请赐教?
Error Type: <type 'exceptions.IndentationError'> Error Value: unindent does not match any outer indentation level (axelget.py, line 55) File : /usr/share/yumex/yumex.py , line 778, in <module> mainApp = YumexApplication() E File : /usr/share/yumex/yumex.py , line 421, in __init__ self.yumbase = YumexYumHandler(self.getRecentTime(),self.settings,self.progress,self.ui.main,self.yumexOptions._optparser) File : /usr/share/yumex/yumapi.py , line 50, in __init__ optparser = parser ) File : /usr/lib/python2.5/site-packages/yum/__init__.py , line 109, in doConfigSetup errorlevel=errorlevel) File : /usr/lib/python2.5/site-packages/yum/__init__.py , line 151, in _getConfig startupconf.pluginconfpath) File : /usr/lib/python2.5/site-packages/yum/__init__.py , line 277, in doPluginSetup plugin_types, confpath) File : /usr/lib/python2.5/site-packages/yum/plugins.py , line 139, in __init__ self._importplugins(types) File : /usr/lib/python2.5/site-packages/yum/plugins.py , line 180, in _importplugins self._loadplugin(modulefile, types) File : /usr/lib/python2.5/site-packages/yum/plugins.py , line 197, in _loadplugin module = imp.load_module(modname, fp, pathname, description) |
|
|
|
|
|
|
|
第 20 帖 | |
|
|
这是我的完整代码
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE from urlparse import urljoin import os requires_api_version = '2.3' plugin_type = (TYPE_CORE, TYPE_INTERACTIVE) enablesize=300000 trymirrornum=-1 maxconn=10 def init_hook(conduit): global enablesize,trymirrornum,maxconn enablesize = conduit.confInt('main','enablesize',default=30000) trymirrornum = conduit.confInt('main','trymirrornum',default=-1) maxconn = conduit.confInt('main','maxconn',default=10) def predownload_hook(conduit): global enablesize preffermirror="" for po in (conduit.getDownloadPackages()): if hasattr(po, 'pkgtype') and po.pkgtype == 'local': continue totsize = long(po.size) ret = False if totsize <= enablesize: conduit.info(2, "Package %s download size %d less than %d,Skip plugin!" % (po.repo.id,totsize,enablesize)) continue else: conduit.info(2, "Ok,we will try to use axel to download this big file d" % totsize)local = po.localPkg() if os.path.exists(local): if not os.path.exists(local+".st"): fstate=os.stat(local) if totsize == fstate.st_size: conduit.info(2,"Target already exists,skip to next file!") continue localall = "%s %s" % (local,local+".st") rmcmd = "rm -f %s" % (localall) curmirroridx = 0 conduit.info(2,"Before we start,clean all the key files") os.system(rmcmd) connnum = totsize / enablesize if connnum > maxconn: connnum = maxconn mirrors=[] mirrors[:0]=po.repo.urls if preffermirror != "": mirrors[:0] = [preffermirror] for url in mirrors: curmirroridx += 1 if (curmirroridx > trymirrornum) and (trymirrornum != -1): conduit.info(2, "Package %s has tried %d mirrors,Skip plugin!" % (po.repo.id,trymirrornum)) break if 'updates' in url: remoteurl = urljoin(url, "i386/%s" % po.remote_path) else: remoteurl = urljoin(url, "os/%s" % po.remote_path) syscmd = "axel -a -n %s %s -o %s" % (connnum,remoteurl,local) conduit.info(2, "Execute axel cmd:\n%s" % syscmd) os.system(syscmd) if os.path.exists(local+".st"): conduit.info(2,"axel exit by exception,let's try another mirror") continue else: ret = True preffermirror=url break if not ret: conduit.info (2,"try to run rm cmd s" % rmcmd)os.system(rmcmd) |
|
|
|
|
|
|
|
第 21 帖 | |
|
|
python语法要求缩进,用我附件中的直接覆盖吧,已经上传了
|
|
|
|
|
|
|
|
第 22 帖 | ||
|
|
引用:
00:18:04 : Yum配置设置 00:18:04 : Loading "installonlyn" plugin 00:18:04 : Loading "fastestmirror" plugin 00:18:04 : Loading mirror speeds from cached hostfile 00:18:23 : Yum Version : 3.2.0 00:18:23 : 图形用户界面设置完成 00:18:23 : 设置Yum:事务集合 00:18:23 : 设置Yum:RPM数据库 00:18:23 : 设置Yum:软件仓库 00:18:23 : Loading mirror speeds from cached hostfile 00:18:23 : Setup Yum : Package Sacks 这个yumex日志算不算加载楼主的多线程插件成功啊? |
||
|
|
|
||
|
|
第 23 帖 | |
|
|
楼上,你的yumex没有启动axelget。
要在yumex中使用axelget,需要特殊设置,参见firefoxmmx在此帖的回复(32楼),但这个是针对python2.4的不是2.5的,好像区别很大的,我是没有搞定,谁搞定了说说吧:) http://www.linuxsir.org/bbs/showthre...=290570&page=3 关于os/i386的自动选择,本人使用budgerigar改写的版本试验成功: http://www.linuxsir.org/bbs/showthread.php?t=306127
__________________
Home: Pentium III. 768M. nvidia 6200. 120G(3 HDDs) Office: ThinkPad T400 2765-63c Fedora 11 |
|
|
|
|
|
|
|
第 24 帖 | |
|
|
史上最强的帖子!!!!
速度飞快啊,一个字,真**爽得没话说!!!! |
|
|
|
|
|
|
|
第 25 帖 | |
|
|
hexhcc兄弟,如marklf兄弟所言,在FC6和F7中配置文件发生了变化,yumex首选项中显示有此查检,但是输出信息中却没有,这个问题我也没搞清楚,只能留待wq1977兄弟来解决.
还有关于os/i386自动切换的问题,我参照python的语法加了一个判断语句,因为python语法上要缩进来表明语句结构,所以会出现你的错误,建议下载我的附件文件然后覆盖源文件,我自己就用的这个,一切正常. marklf兄弟用的是使用budgerigar改写的版本,你也可以使用那个覆盖源文件,达到同样的效果 |
|
|
|
|
|
|
|
第 26 帖 | ||
|
|
引用:
![]() |
||
|
|
|
||
|
|
第 27 帖 | |
|
|
帮我看看什么问题(F7):
[root@localhost axel-1.0b]# ./configure --i18n=1 The strip option is enabled. This should not be a problem usually, but on some systems it breaks stuff. Configuration done: Internationalization enabled. Debugging disabled. Binary stripping enabled. [root@localhost axel-1.0b]# make make: Nothing to be done for `all'. 如果直接用./configure是可以的
__________________
I love Linux |
|
|
|
|
|
|
|
第 28 帖 | ||
|
|
引用:
|
||
|
|
|
||
|
|
第 29 帖 | ||
|
|
引用:
|
||
|
|
|
||
|
|
第 30 帖 | ||
|
|
引用:
yumex 是不是默认现在用多线程在下载? |
||
|
|
|
||