Package: debpartial-mirror
Version: 0.2.98

The "debpartial-mirror clean" command crahes in different situations:

1/ running it without repository built, and with the attached mirror.conf 
and my_pkgs as package list yields the following crash:

$ debpartial-mirror -c mirror.conf clean
Loading backend lenny
Traceback (most recent call last):
  File "/home/emile/bin/debpartial-mirror", line 177, in <module>
    main()
  File "/home/emile/bin/debpartial-mirror", line 169, in main
    controller.executeCommand(cmnd)
  File "/home/emile/src/debpartial_mirror/Controller.py", line 34, in 
executeCommand
    self._commands.get(commandName)()
  File "/home/emile/src/debpartial_mirror/Controller.py", line 58, in 
doClean
    if self._load():
  File "/home/emile/src/debpartial_mirror/Controller.py", line 72, in 
_load
    b.load()
  File "/home/emile/src/debpartial_mirror/Backend.py", line 111, in load
    self._dists.load()
  File "/home/emile/src/debpartial_mirror/Dists.py", line 184, in load
    processTagFile(os.path.join(self._filesystem.base(), file), 
addPackage)
  File "/home/emile/src/debpartial_mirror/Dists.py", line 477, in 
processTagFile
    parse_in = open(filename, "r")
IOError: [Errno 2] No such file or 
directory: 
'./tmp/debmir/mirror-i386/lenny/dists/lenny/main/binary-i386/Packages'

I guess that before running the clean command, the programm should check 
if the package informations are already available (i.e. some "update" 
command was run ?)

2/ once 'debpartial-mirror update' is done, we have another bug :

$ debpartial-mirror -c mirror.conf clean
Loading backend lenny
Traceback (most recent call last):
  File "/home/emile/bin/debpartial-mirror", line 177, in <module>
    main()
  File "/home/emile/bin/debpartial-mirror", line 169, in main
    controller.executeCommand(cmnd)
  File "/home/emile/src/debpartial_mirror/Controller.py", line 34, in 
executeCommand
    self._commands.get(commandName)()
  File "/home/emile/src/debpartial_mirror/Controller.py", line 58, in 
doClean
    if self._load():
  File "/home/emile/src/debpartial_mirror/Controller.py", line 72, in 
_load
    b.load()
  File "/home/emile/src/debpartial_mirror/Backend.py", line 111, in load
    self._dists.load()
  File "/home/emile/src/debpartial_mirror/Dists.py", line 176, in load
    processTagFile(release_filename, releaseInfo.parse)
  File "/home/emile/src/debpartial_mirror/Dists.py", line 479, in 
processTagFile
    for section in apt_pkg.TagFile(parse_in):
AttributeError: 'module' object has no attribute 'TagFile'

3/ finally, running 'debpartial-mirror clean' on 0.2.97 yielded another 
bug that is not reproduceable in 0.2.98 but nevertheless points to an 
obvious error in the source code :

$ debpartial-mirror -c mirror.conf clean
Traceback (most recent call last):
  File "/home/emile/bin/debpartial-mirror", line 177, in <module>
    main()
  File "/home/emile/bin/debpartial-mirror", line 169, in main
    controller.executeCommand(cmnd)
  File "/home/emile/src/debpartial_mirror/Controller.py", line 34, in 
executeCommand
    self._commands.get(commandName)()
  File "/home/emile/src/debpartial_mirror/Controller.py", line 59, in 
doClean
    self._clean()
  File "/home/emile/src/debpartial_mirror/Controller.py", line 94, in 
_clean
    b.clean()
  File "/home/emile/src/debpartial_mirror/Backend.py", line 95, in clean
    self._pool.clean()
  File "/home/emile/src/debpartial_mirror/Pool.py", line 120, in clean
    need_files = self._calc_need_files()
  File "/home/emile/src/debpartial_mirror/Pool.py", line 62, in 
_calc_need_files
    need_files = [pkg['Filename'] for pkg in 
self._backend.get_binary_list().values()]
TypeError: get_binary_list() takes exactly 2 arguments (1 given)


FYI: in the 0.2.98 version, we have 

debpartial_mirror $ rgrep 'def get_binary_list' .
Dists.py:131:   def get_binary_list(self, architecture):
Backend.py:62:  def get_binary_list (self, architecture):

Note that in a production case, the 0.2.97 crash appeared 
on 'debpartial-mirror all', and we can expect some of them to appear
on "all" again.

I don't think the following informations are relevant, but here they are:

$ uname -r
2.6.32-3-amd64

$ python --version
Python 2.5.4


-- 

Emile Anclin <emile.anc...@logilab.fr>
http://www.logilab.fr/   http://www.logilab.org/ 
Informatique scientifique & et gestion de connaissances
;;
;; debpartial-mirror configuration file.
;;

[GLOBAL]
;; Show debug information?
;debug = DEBUG

;; Mirror destination directory
mirror_dir = ./tmp/debmir/mirror-i386

;; Which architectures should I download?
architectures = i386

;; What should I look for, by default?
components = main contrib non-free
distributions = lenny

;; What should I get?
get_suggests = true
get_recommends = true
get_provides = true
get_sources = false
get_packages = true

;; Here is our first backend.  It mirrors a subset of packages from the
;; Debian official repositories.
[lenny]

;; Where do we get the packages from?
;; server = http://213.215.7.52:3142/ftp.at.debian.org/debian
server = http://ftp.at.debian.org/debian

;; Since we specify components and distributions in this section, what we
;; specify here overrides the settings in [DEFAULT].
components = main contrib non-free
distributions = lenny

;; Only get a subset of the packages in this source.
filter = subsection:base priority:required|important include-from:./my_pkgs

;; And get the source packages as well for this backend.
get_sources = false

python
python2.5
python-numpy
python-scipy
python-matplotlib
python-matplotlib-data
python-matplotlib-doc
python-numpy-dev
python-numpy-doc
python-numpy-ext
ipython
python-pyrex
python-mysqldb
python-gnome2
python-glade2
python-gnome2-dev
python-gnome2-extras
python-gnome2-extras-dev
python-gnome2-desktop-doc
python-gnome2-extras-doc
python-gobject
python-gobject-dev
python-gtk2
python-gtk2-dev
python-gtk2-doc
python-gtk2-tutorial
python-gtkglext1
python-wxgtk2.6
python-gtkglext-dev
python-wxversion
python-tables
python-pyrex
python-mode
python-all-dev
python-numeric
python-numeric-dbg
python-numeric-ext
python-numeric-ext-dbg
python-numeric-tutorial
python-pmw
python-lxml
python-libxml2
python-profiler

Reply via email to