[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting the Debian Edu APT repositoriy working again



[Petter Reinholdtsen]
> The dak script simply failing to start seem to be a complete blocker.  I
> was unable to figure out why python did not have
> /usr/lib/python2.6/site-packages in sys.path, but this change worked
> around the problem:
> 
> administrator:~# diff -u /usr/bin/dak.orig /usr/bin/dak
> --- /usr/bin/dak.orig   2012-10-30 13:45:00.000000000 +0100
> +++ /usr/bin/dak        2012-10-30 13:43:34.000000000 +0100
> @@ -29,6 +29,7 @@
>  ################################################################################
>  
>  import sys
> +sys.path.append('/usr/lib/python2.6/site-packages')
>  import daklib.utils
>  
>  ################################################################################
> administrator:~#

According to Mike on IRC, this is because
/usr/lib/python2.6/site-packages changed to
/usr/lib/python2.6/dist-packages, and the daklib package need to
adjust to use the new path.

> With this change in place, the dak command provide usage
> information, at least.  Can one of the ftpmasters please check and
> see if dak work better now?  How can I test if it is working?  If
> there still are problems, let me know and I'll have a look today.  I
> doubt I will find time after today.

No ftpmasters had time, but I got some help from Mike and Jonathan on
IRC, and discovered that the PostgreSQL database used by dak was no
longer available.  It was stored in version 7.4 available in Etch, and
version 8.4 was now installed on the machine.  Installed the 7.4
version from Lenny, dumped the SQL database, and loaded it into 8.4.
The SQL backups are in /var/backup/ now.

With this in place, I get these errors, which seem to be due to old
Python code:

administrator:~# su - holger -c "PGPORT=5434 dak process-new"
/usr/lib/python2.6/site-packages/daklib/utils.py:1146: DeprecationWarning: apt_pkg.newConfiguration() is deprecated. Use apt_pkg.Configuration() instead.
  Cnf = apt_pkg.newConfiguration()
/usr/lib/python2.6/site-packages/examine_package.py:35: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import errno, os, pg, re, sys, md5
/usr/lib/python2.6/site-packages/process_new.py:808: DeprecationWarning: Attribute 'SubTree' of the 'apt_pkg.Configuration' object is deprecated, use 'subtree' instead.
  Options = Cnf.SubTree("Process-New::Options")
Traceback (most recent call last):
  File "/usr/bin/dak", line 186, in <module>
    main()
  File "/usr/bin/dak", line 181, in main
    module.main()
  File "/usr/lib/python2.6/site-packages/process_new.py", line 1000, in main
    changes_files = init()
  File "/usr/lib/python2.6/site-packages/process_new.py", line 816, in init
    Logger = Upload.Logger = daklib.logging.Logger(Cnf, "process-new")
  File "/usr/lib/python2.6/site-packages/daklib/logging.py", line 50, in __init__
    logfile = utils.open_file(logfilename, 'a')
  File "/usr/lib/python2.6/site-packages/daklib/utils.py", line 84, in open_file
    raise cant_open_exc, filename
TypeError: exceptions must be old-style classes or derived from BaseException, not str
administrator:~# 

Anyone have any idea how to proceed from here?  Fetch a newer version
of dak, perhaps?

-- 
Happy hacking
Petter Reinholdtsen


Reply to: