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

Bug#574380: edos-distcheck: Wrong output for | alternative?



[ quoted text reordered ]

On Wed, Mar 17, 2010 at 10:32:46PM +0100, Ralf Treinen wrote:
> At that occassion:
> - from debian_bundle => from debian
> - add-sources.py complains about some unicode characters:
> 
> % edos-builddebcheck Packages-armel Sources-prelink
> Traceback (most recent call last):
>   File "/usr/share/edos-distcheck/add-sources.py", line 132, in <module>
>     print pkg
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 100: ordinal not in range(128)

So, in fact there are two separate issues related to this bug
report. The first one is the above (usual Python crap about Unicode
printing, SCNR!). The effect of that is not outputting all "^sources---"
packages which contain a non-ASCII character, e.g., in the Maintainer
field.

I believe this might have caused false negative in the past
(i.e. packages whose build-deps cannot be satisfied, but for which
edos-builddebcheck was not reporting it, simply because they were not
part of the "fake" Packages file generated). Ralf, do you confirm that
possibility?

The attached patch fixes this part of the issue.

> There is a serious problem with addsources.py: it "simplifies" an
> altenative build-dependency into a single package. On Kurt's example,
> it changes
> 
>   Build-Depends: libc6-dev (>> 2.3.5) | libc6.1-dev (>> 2.3.5)
> 
> into
> 
>   Depends: libc6.1-dev (>> 2.3.5)
> 
> which is hardly acceptable :-)

This, in turn, is by design :-) I don't remember if I or someone else
added the support for it, but we currently have a list of
build-essential packages, which currently reads as follow:

  buildessentials = ['apt', 'binutils', 'cpio', 'cpp', 'dpkg-dev',
                     'g++', 'gcc', 'libc6-dev', 'make', 'patch',
                     'perl', 'perl-modules']

the function dep_for_me() in the Python code checks, for each build-dep,
if it is part of that list. If a build-dep is, it gets "simplified
away". In your example it is trivially the case for 'libc6-dev', which
gets removed.

Now, as I understand it, the code which currently throws away essential
build-deps is too simple: it currently does not care about versions at
all, while it probably should. Is this the root of the problem? If it
is, there are various thoughts before fixing this naively:

- how can add-sources.py know the version of the build-essential
  packages which will be installed while actually building?

- should it know that in the first place?

I don't currently remember the rationale of ignoring build-essential
(were there cases where they are not installable, according to their
deps?), so I'm a bit at loss here ...

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
--- add-sources.py.orig	2010-03-18 19:32:41.000000000 +0100
+++ add-sources.py	2010-03-18 19:32:16.000000000 +0100
@@ -129,9 +129,9 @@
 for src in deb822.Sources.iter_paragraphs(file(sources_file)):
     if src['Architecture'] in ['any', 'all']:
         pkg = pkg_of_src(src)
-        print pkg
+        print unicode(pkg).encode('utf-8')
     elif architecture in src['Architecture'].split():
         pkg = pkg_of_src(src)
         pkg['Architecture'] = architecture
-        print pkg
+        print unicode(pkg).encode('utf-8')
 

Reply to: