LinuxSir.Org  
| 网站首页 | 注册账号 | 论坛帮助 |

欢迎来到LinuxSir.Org!
您还未登录,请登录后查看论坛,或者点击论坛上方的注册链接注册新账号。


发表新主题 回复
 
主题工具
旧 07-06-18, 17:59 第 16 帖
muramase
 
 
 
注册会员  
  注册日期: Jun 2007
  帖子: 6
  精华: 0
 

感谢,fc7下面速度也不错
  muramase 当前离线   回复时引用此帖
旧 07-06-20, 19:06 第 17 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

标题: 用命令行看可以看到用10线程在下载,用yumex没有显示axel加载成功,并用多线程下载,请问yumex是不是还要特殊配置一下


用命令行看可以看到用10线程在下载,用yumex没有显示axel加载成功,并用多线程下载,请问yumex是不是还要特殊配置一下?
上传的图像
文件类型: png Screenshot-终端 - root@localhost:~.png (74.9 KB, 35 次查看)
文件类型: png Screenshot-终端 - root@localhost:~-1.png (73.0 KB, 29 次查看)
  hexhhc 当前离线   回复时引用此帖
旧 07-06-21, 06:41 第 18 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 446
  精华: 0
 

引用:
作者: hexhhc
用命令行看可以看到用10线程在下载,用yumex没有显示axel加载成功,并用多线程下载,请问yumex是不是还要特殊配置一下?
恩,我今天看了下输出内容,确实显示yumex没有显示加载axelget插件,但是在首选项中axelget插件却是启用的,不过做了任何改动单击确定好像都不能保存,很奇怪,我也很费解,这个问题只能请教一下wq1997兄弟了!







__________________
妄世人皆行我欲之事,祸也;见世人皆行我欲之事,福也!
世人皆求,乱也;世人皆得,治也。得而无伤,修也;勾牵无碍,成也!
  亚森罗平 当前离线   回复时引用此帖
旧 07-06-23, 13:17 第 19 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

加了那段判断语句后出现错误,请赐教?


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)
  hexhhc 当前离线   回复时引用此帖
旧 07-06-23, 13:35 第 20 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

这是我的完整代码

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 filed" % 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 cmds" % rmcmd)
os.system(rmcmd)
  hexhhc 当前离线   回复时引用此帖
旧 07-06-23, 19:45 第 21 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 446
  精华: 0
 

python语法要求缩进,用我附件中的直接覆盖吧,已经上传了
  亚森罗平 当前离线   回复时引用此帖
旧 07-06-25, 00:17 第 22 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

引用:
作者: 亚森罗平
恩,我今天看了下输出内容,确实显示yumex没有显示加载axelget插件,但是在首选项中axelget插件却是启用的,不过做了任何改动单击确定好像都不能保存,很奇怪,我也很费解,这个问题只能请教一下wq1997兄弟了!


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日志算不算加载楼主的多线程插件成功啊?
  hexhhc 当前离线   回复时引用此帖
旧 07-06-25, 20:55 第 23 帖
marklf
 
marklf 的头像
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 328
  精华: 1
 

楼上,你的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
  marklf 当前离线   回复时引用此帖
旧 07-06-26, 11:38 第 24 帖
飞雪幻天 帅哥
 
 
 
注册会员  
  注册日期: May 2007
  帖子: 102
  精华: 0
 

史上最强的帖子!!!!
速度飞快啊,一个字,真**爽得没话说!!!!
  飞雪幻天 当前离线   回复时引用此帖
旧 07-06-26, 21:07 第 25 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 446
  精华: 0
 

hexhcc兄弟,如marklf兄弟所言,在FC6和F7中配置文件发生了变化,yumex首选项中显示有此查检,但是输出信息中却没有,这个问题我也没搞清楚,只能留待wq1977兄弟来解决.

还有关于os/i386自动切换的问题,我参照python的语法加了一个判断语句,因为python语法上要缩进来表明语句结构,所以会出现你的错误,建议下载我的附件文件然后覆盖源文件,我自己就用的这个,一切正常.
marklf兄弟用的是使用budgerigar改写的版本,你也可以使用那个覆盖源文件,达到同样的效果
  亚森罗平 当前离线   回复时引用此帖
旧 07-06-26, 21:08 第 26 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 446
  精华: 0
 

引用:
作者: 飞雪幻天
史上最强的帖子!!!!
速度飞快啊,一个字,真**爽得没话说!!!!
言过其实了,但是能帮得到别人真的很开心,谢谢!

  亚森罗平 当前离线   回复时引用此帖
旧 07-06-27, 08:18 第 27 帖
followwing
 
followwing 的头像
 
 
注册会员  
  注册日期: Oct 2002
  帖子: 244
  精华: 0
 

帮我看看什么问题(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
  followwing 当前离线   回复时引用此帖
旧 07-06-27, 09:04 第 28 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

引用:
作者: 亚森罗平
hexhcc兄弟,如marklf兄弟所言,在FC6和F7中配置文件发生了变化,yumex首选项中显示有此查检,但是输出信息中却没有,这个问题我也没搞清楚,只能留待wq1977兄弟来解决.

还有关于os/i386自动切换的问题,我参照python的语法加了一个判断语句,因为python语法上要缩进来表明语句结构,所以会出现你的错误,建议下载我的附件文件然后覆盖源文件,我自己就用的这个,一切正常.
marklf兄弟用的是使用budgerigar改写的版本,你也可以使用那个覆盖源文件,达到同样的效果
自动切换问题我已经解决,你的附件和budgerigar都试过,没问题,,yumex首选项中显示有此插件,这在哪里看到的,我就是想解决yumex挂载多线程下载的问题,如果yumex已经成功挂载,显示与不现实都不重要。
  hexhhc 当前离线   回复时引用此帖
旧 07-06-27, 09:54 第 29 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 446
  精华: 0
 

引用:
作者: hexhhc
自动切换问题我已经解决,你的附件和budgerigar都试过,没问题,,yumex首选项中显示有此插件,这在哪里看到的,我就是想解决yumex挂载多线程下载的问题,如果yumex已经成功挂载,显示与不现实都不重要。
yumex首选项,plugin标签页中
  亚森罗平 当前离线   回复时引用此帖
旧 07-06-27, 16:13 第 30 帖
hexhhc
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 10
  精华: 0
 

引用:
作者: 亚森罗平
yumex首选项,plugin标签页中

yumex 是不是默认现在用多线程在下载?
  hexhhc 当前离线   回复时引用此帖
发表新主题 回复


主题工具

发帖规则
您 [不可以] 发表新主题
您 [不可以] 回复主题
您 [不可以] 上传附件
您 [不可以] 编辑您的帖子

已 [启用] BB 代码
已 [启用] 表情符号
已 [禁用] IMG 代码
已 [禁用] HTML 代码
[论坛跳转…]


所有时间均为[北京时间]。现在的时间是 12:53


Powered by vBulletin 版本 3.6.8
版权所有 ©2000 - 2010, Jelsoft Enterprises Ltd.
官方中文技术支持: vBulletin 中文
版权所有 ©2002 - 2009, LinuxSir.Org