Bug#742012: dpkg fails to upgrade gyp (symlink gets replaced with dir)

2014-03-18 Thread Michael Vogt
On Tue, Mar 18, 2014 at 03:33:35PM +0100, Guillem Jover wrote:
> Hi!
Hi Guillem,

[..]
> This is “expected” behaviour, I documented it in the dpkg FAQ because it
> seems to trip people over. The Debian policy also documents this (§6.6.4).
> 
> 
> 
> Given the above, I'll be closing this report if there's no other
> issues besides this one.

Thanks for your reply and the link to the FAQ and sorry for this
unneeded bugreport. I should have been move careful in my
research. Feel free to close the report.

Given that this behavior is not that (that) intuitive I wonder if dpkg
could issue a warning during unpack? Maybe something like the attached
patch? I'm happy to improve the warning message and add one for the
other way around (dir is replaced with symlink).

Could you elaborate a little bit what the FAQ means with metadata
tracking? Would the $pkg.lists file need to be amended with
information like:
/path/to/dir =d
/path/to/file =f
/path/to/symlink =s
?

Thanks for your consideration.

Cheers,
 Michael
diff -Nru dpkg-1.17.5ubuntu5/src/archives.c dpkg-1.17.5ubuntu6/src/archives.c
--- dpkg-1.17.5ubuntu5/src/archives.c	2013-12-10 07:15:02.0 +0100
+++ dpkg-1.17.5ubuntu6/src/archives.c	2014-03-18 18:41:32.0 +0100
@@ -880,6 +880,11 @@
 }
 break;
   case tar_filetype_dir:
+ // warn if a previous fs symlink becomes a dir
+ if (lstat(fnamevb.buf,&stabtmp) == 0 && S_ISLNK(stabtmp.st_mode)) {
+warning(_("New directory %s is currently a symlink, things may go bad. See debian policy §6.6.4"), fnamevb.buf);
+ }
+
 /* If it's already an existing directory, do nothing. */
 if (!stat(fnamevb.buf,&stabtmp) && S_ISDIR(stabtmp.st_mode)) {
   debug(dbg_eachfiledetail, "tarobject directory exists");


Bug#741739: unattended-upgrades: [INTL:de] Updated German translation

2014-03-18 Thread Michael Vogt
On Sun, Mar 16, 2014 at 01:28:16PM +0100, Chris Leick wrote:
> Package: unattended-upgrades
> Version: 0.83.2
> Severity: wishlist
> Tags: l10n patch
> 
> 
> Hi,
> 
> please find attached the newest German translation of unattended-upgrades.
> 
> Kind regards,
> Chris.


Thanks for this translation update!

I merged it into my bzr tree and it will be part of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#742012: dpkg fails to upgrade gyp (symlink gets replaced with dir)

2014-03-18 Thread Michael Vogt
Package: dpkg
Version: 1.17.6

I got the following error when upgrading the "gyp" package. I ran into
this from a ubuntu machine but I reproduced it in a minimal sid chroot
as well:

# dpkg -i gyp_0.1~svn1654-1_all.deb 
(Reading database ... 12267 files and directories currently
installed.)
Preparing to unpack gyp_0.1~svn1654-1_all.deb ...
Unpacking gyp (0.1~svn1654-1) over (0.1~svn1654-1) ...
Setting up gyp (0.1~svn1654-1) ...

root@bod:/tmp# dpkg -i gyp_0.1~svn1729-3_all.deb 
(Reading database ... 12267 files and directories currently
installed.)
Preparing to unpack gyp_0.1~svn1729-3_all.deb ...
Unpacking gyp (0.1~svn1729-3) over (0.1~svn1654-1) ...
dpkg: error processing archive gyp_0.1~svn1729-3_all.deb (--install):
 unable to open
 '/usr/share/pyshared/gyp-0.1.egg-info/dependency_links.txt.dpkg-new':
 No such file or directory
Errors were encountered while processing:
 gyp_0.1~svn1729-3_all.deb

After some debugging I think the following is what happens:

1. The old package contains a symlink 
   /usr/lib/python2.7/dist-packages/gyp-0.1.egg-info 
2. The new package contains a directory 
   /usr/lib/python2.7/dist-packages/gyp-0.1.egg-info 
3. On upgrade the symlink is not replaced with the directory, it still
   is a symlink, this causes the error.

I can send a full dpkg debug log. The debs in question can be
downloaded from e.g.:
http://launchpadlibrarian.net/154612335/gyp_0.1%7Esvn1729-3_all.deb
http://launchpadlibrarian.net/145640491/gyp_0.1%7Esvn1654-1_all.deb

But that should not be needed, I also created two minimal debs that
seem to trigger the issue:

$ sudo dpkg -i symlink-becomes-dir_1.0_all.deb && sudo dpkg -i 
symlink-becomes-dir_2.0_all.deb && echo "have:" && ls -ald 
/usr/share/symlink-becomes-dir && printf "\nwant:\n" && dpkg -c 
symlink-becomes-dir_2.0_all.deb |grep /usr/share/symlink-becomes-dir
(Reading database ... 436479 files and directories currently installed.)
Removing symlink-becomes-dir ...
Selecting previously unselected package symlink-becomes-dir.
(Reading database ... 436479 files and directories currently installed.)
Unpacking symlink-becomes-dir (from symlink-becomes-dir_1.0_all.deb) ...
Setting up symlink-becomes-dir (1.0) ...
(Reading database ... 436481 files and directories currently installed.)
Preparing to replace symlink-becomes-dir 1.0 (using 
symlink-becomes-dir_2.0_all.deb) ...
Unpacking replacement symlink-becomes-dir ...
Setting up symlink-becomes-dir (2.0) ...
have:
lrwxrwxrwx 1 root root 3 Mar 18 10:07 /usr/share/symlink-becomes-dir -> foo

want:
drwxr-xr-x root/root 0 2014-03-18 10:08 ./usr/share/symlink-becomes-dir/


As for the real gyp deb:

When I inspect the system before dpkg cleans up again, I see the
following:
# ls -al /usr/share/pyshared/gyp-0.1.egg-info
total 16
drwxr-xr-x 2 root root 4096 Mar 18 08:46 .
drwxr-xr-x 4 root root 4096 Mar 18 08:46 ..
lrwxrwxrwx 1 root root   52 Oct 22 02:42 PKG-INFO.dpkg-new ->
../../../../share/pyshared/gyp-0.1.egg-info/PKG-INFO
lrwxrwxrwx 1 root root   55 Oct 22 02:42 SOURCES.txt.dpkg-new ->
../../../../share/pyshared/gyp-0.1.egg-info/SOURCES.txt
lrwxrwxrwx 1 root root   64 Oct 22 02:42 dependency_links.txt.dpkg-new
-> ../../../../share/pyshared/gyp-0.1.egg-info/dependency_links.txt
lrwxrwxrwx 1 root root   60 Oct 22 02:42 entry_points.txt.dpkg-new ->
../../../../share/pyshared/gyp-0.1.egg-info/entry_points.txt
lrwxrwxrwx 1 root root   57 Oct 22 02:42 top_level.txt.dpkg-new ->
../../../../share/pyshared/gyp-0.1.egg-info/top_level.txt

Which looks incorrect, a properly installed deb has no symlinks here:
# ls -la /usr/share/pyshared/gyp-0.1.egg-info/
total 28
drwxr-xr-x 2 root root 4096 Mar 18 08:47 .
drwxr-xr-x 4 root root 4096 Mar 18 08:47 ..
-rw-r--r-- 1 root root  242 Oct 22 02:42 PKG-INFO
-rw-r--r-- 1 root root 1145 Oct 22 02:42 SOURCES.txt
-rw-r--r-- 1 root root1 Oct 22 02:42 dependency_links.txt
-rw-r--r-- 1 root root   41 Oct 22 02:42 entry_points.txt
-rw-r--r-- 1 root root4 Oct 22 02:42 top_level.txt

That is because:
# ls -la /usr/lib/python2.7/dist-packages/gyp-0.1.egg-info
lrwxrwxrwx 1 root root 40 Jul 23  2013 
/usr/lib/python2.7/dist-packages/gyp-0.1.egg-info -> 
../../../share/pyshared/gyp-0.1.egg-info

Which is a directory on a correctly installed package:
# ls -lad /usr/lib/python2.7/dist-packages/gyp-0.1.egg-info/
drwxr-xr-x 2 root root 4096 Mar 18 08:47 
/usr/lib/python2.7/dist-packages/gyp-0.1.egg-info/


This is also reported in launchpad as
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1246730 


Thanks,
 Michael


symlink-becomes-dir_1.0_all.deb
Description: application/debian-package


symlink-becomes-dir_2.0_all.deb
Description: application/debian-package


Bug#728791: squid-deb-proxy: After restart, proxy is unavailable until restart of avahi-daemon

2014-03-15 Thread Michael Vogt
On Wed, Mar 12, 2014 at 11:26:14PM +0100, varacanero wrote:
> On 06.11.2013 07:54, Michael Vogt wrote:
> > On Tue, Nov 05, 2013 at 03:44:57PM +0100, Varac wrote:
> >> Package: squid-deb-proxy
> >> Version: 0.7.2
> >> Severity: important
> >  
> > Thanks for your bugreport. 
> 
> sry for the delay !
[..]

No problem! And thanks for the additional info. I think I found the
issue and the fix will be part of the next upload.

Cheers,
 Michael


> >> After restarting, the service is announced by avahi only on ipv6, not on
> >> ipv4 anymore.
> >> However, apt-get update still fails.
> > 
> > How does your
> >   /etc/avahi/services/squid-deb-proxy.service
> > file look like? It does contain the  line I
> > assume? 
> 
> # cat /etc/avahi/services/squid-deb-proxy.service
> 
> 
> 
>   Squid deb proxy on %h
>   
>   _apt_proxy._tcp
>   8000
>   
>   
>   _apt_proxy._tcp
>   8000
>   
> 
> 
> 
> 
> 
> > 
> > And if I read your log right, the _apt_proxy._tcp service appears
> > again after you did a manual restart of the avahi service, is that
> > correct? 
> 
> yes.
> 
> greetings, varac
> 
> > 
> > Cheers,
> >  Michael
> >  
> >> root@greyhound:~# avahi-browse -a|grep proxy
> >> + vboxnet0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> + vboxnet0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> + virbr0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> +br0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> +br0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >>
> >> root@greyhound:/etc/apt#
> >> /usr/share/squid-deb-proxy-client/apt-avahi-discover
> >> http://10.5.5.1:8000/
> >>
> >>
> >>
> >> root@greyhound:~# /etc/init.d/squid-deb-proxy restart
> >> Restarting Squid Deb HTTP Proxy: squid-deb-proxy
> >> Waiting.done.
> >> 2013/07/26 20:20:28| strtokFile:
> >> /etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl not found
> >> 2013/07/26 20:20:28| Warning: empty ACL: acl blockedpkgs urlpath_regex
> >> "/etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl"
> >> .
> >>
> >> root@greyhound:~# apt-get update
> >> 0% [Working]Failed to resolve service 'Squid deb proxy on greyhound' of
> >> type '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Hit http://security.debian.org wheezy/updates Release.gpg
> >> Hit http://security.debian.org jessie/updates Release.gpg
> >> Hit http://security.debian.org wheezy/updates Release
> >> ...
> >>
> >> root@greyhound:~# /usr/share/squid-deb-proxy-client/apt-avahi-discover
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >> Failed to resolve service 'Squid deb proxy on greyhound' of type
> >> '_apt_proxy._tcp' in domain 'local': Timeout reached
> >>
> >>
> >> root@greyhound:~# avahi-browse -a|grep proxy
> >> + vboxnet0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> +br0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >>
> >> root@greyhound:~# /etc/init.d/avahi-daemon restart
> >> Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
> >>
> >> root@greyhound:~# avahi-browse -a|grep proxy
> >> + vboxnet0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> + vboxnet0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> + virbr0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> +br0 IPv6 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >> +br0 IPv4 Squid deb proxy on greyhound
> >> _apt_proxy._tcp  local
> >>
> >> -- System Information:
> >> Debian Release: 7.2
> >>   APT prefers stable
> >>   APT policy: (990, 'stable')
> >> Architecture: amd64 (x86_64)
> >>
> >> Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/2 CPU cores)
> >> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> >> Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#740847: unattended-upgrades: Exception: mark_install() got an unexpected keyword argument 'auto_install'

2014-03-05 Thread Michael Vogt
Thanks. On python2 it is called auto_inst - sorry for this. I will fix as soon 
as I get to my development box

On 5 March 2014 15:42:45 CET, Simon McVittie  
wrote:
>Package: unattended-upgrades
>Version: 0.82.2
>Severity: normal
>
>There seems to be a problem with the code you added to
>unattended-upgrades 0.82.2 to fix the rewind_cache() issue I reported
>recently. When I get unattended-upgrades into a tricky situation by
>trying to reproduce
> (see that
>bug
>for test packages and steps to reproduce), it crashes with:
>
>> applying set {'libfoo', 'foo-driver', 'libgl1-foo-glx',
>> 'libgl1-foo-glx:i386', 'libfoo:i386'}
>> matching 'a'='inadvisable' against '> archive:'inadvisable' origin:'my archive' label:'my label' site:''
>> isTrusted:True>'
>> matching 'a'='inadvisable' against '> archive:'inadvisable' origin:'my archive' label:'my label' site:''
>> isTrusted:True>'
>> matching 'a'='inadvisable' against '> archive:'inadvisable' origin:'my archive' label:'my label' site:''
>> isTrusted:True>'
>> matching 'a'='inadvisable' against '> archive:'inadvisable' origin:'my archive' label:'my label' site:''
>> isTrusted:True>'
>> matching 'a'='inadvisable' against '> archive:'inadvisable' origin:'my archive' label:'my label' site:''
>> isTrusted:True>'
>> Exception: mark_install() got an unexpected keyword argument
>> 'auto_install'
>
>-- System Information:
>Debian Release: jessie/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable')
>Architecture: amd64 (x86_64)
>
>Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
>Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
>Shell: /bin/sh linked to /bin/dash
>
>Versions of packages unattended-upgrades depends on:
>ii  apt0.9.15.5+b1
>ii  apt-utils  0.9.15.5+b1
>ii  debconf [debconf-2.0]  1.5.52
>ii  lsb-base   4.1+Debian12
>ii  lsb-release4.1+Debian12
>ii  python33.3.4-1
>ii  python3-apt0.9.3.1
>ii  ucf3.0027+nmu1
>ii  xz-utils   5.1.1alpha+20120614-2
>
>unattended-upgrades recommends no packages.
>
>Versions of packages unattended-upgrades suggests:
>pn  bsd-mailx 
>pn  mail-transport-agent  
>
>-- debconf information:
>  unattended-upgrades/enable_auto_updates: false

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Bug#739988: Fix autopkgtest missing dependencies and locale

2014-02-27 Thread Michael Vogt
On Tue, Feb 25, 2014 at 08:47:21AM +0100, Martin Pitt wrote:
> Hey Michael,
Hey Martin,
 
[..]
> No, that's obsolete (I'll clean this up). Reproducer would be:
> 
> First, create a suitable container:
> 
>   $ debcheckout autopkgtest
>   $ autopkgtest/tools/adt-build-lxc ubuntu trusty
> 
> You can also create "debian sid" or some other combination. Sorry, the
> adt-build-lxc script is not yet packaged properly, but next version
> will do that as we use it in production now and it works well enough.
> 
> Then run the test:
> 
>   $ autopkgtest/run-from-checkout apt --- lxc -es adt-trusty

Excellent, thanks for the info! I created a lxc container now and I
now can run with:
# ./run-from-checkout --built-tree=~/devel/apt/upstream.git --- lxc -es 
adt-trusty

[..]
> It still hangs eternally in the equivalent test on armhf, due to that
> problem. So maybe it's some race condition somewhere with the
> webserver startup?

I can reproduce the hang here in my container, I investigate.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#739988: Fix autopkgtest missing dependencies and locale

2014-02-24 Thread Michael Vogt
On Mon, Feb 24, 2014 at 07:12:44PM +0100, Martin Pitt wrote:
> Package: apt
> Version: 0.9.15.4
> Tags: patch
> User: ubuntu-de...@lists.ubuntu.com
> Usertags: origin-ubuntu ubuntu-patch trusty
> User: autopkgtest-de...@lists.alioth.debian.org
> Usertags: autopkgtest

Thanks for your bugreport and your patch!

This is merged now and it will be part of the next upload.

[..] 
> The remaining problem is now that all of the webserver-related tests
> hang eternally when I run them in LXC. It seems to work in QEMU [2],
> but with a lot more packages pre-installed, so it could be that it
> does something funky with the network configuration that just doesn't
> work in LXC, or that there's another missing dependency.
[..]

I will investigate this further, I assume I can use the
lp:auto-package-testing branch and the prepare-testbed.lxc script to
test this? 

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#718329: apt: Please add support for .deb with uncompressed data.tar member

2014-02-22 Thread Michael Vogt
On Sat, Feb 22, 2014 at 07:32:32PM +0100, Guillem Jover wrote:
> Hi!
Hi Guillem,
 
> On Wed, 2014-02-19 at 04:31:01 +0100, Guillem Jover wrote:
> > Here's a small patch series implementing this, and also support for
> > control.tar and control.tar.xz, added in dpkg 1.17.6.
> 
> The second patch was missing the addition in the symbols file, here's
> a fix for that, which can be squashed in, or I can resend the patch
> series if you want. The version might need to be changed depending on
> when/if this gets applied.
[..]

Thanks for this patch and the original patches. I merged them into the
git tree and added a small testcase.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#739749: apt: Source package contains two generated files that isn't removed by debian/rules clean.

2014-02-22 Thread Michael Vogt
On Sat, Feb 22, 2014 at 11:01:53AM +0100, Jon Severinsson wrote:
> Package: apt
> Version: 0.9.14.2
> Severity: minor

Thanks for your bugreport.
 
> The cmdline/apt-key and vendor/debian/sources.list files are generated
> from their respective *.in file if they doesn't exist at build time,
> but they are not removed when cleaning the source directory.

This is fixed in git now.

[..]
> Distributor ID:   Tanglu
> Description:  Tanglu Aequorea Victoria
> Release:  1.0
> Codename: aequorea
[..]

Would you be interessted to submit a vendor profile for this
distribution? 

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#739510: [INTL:es] Spanish translation of debconf messages

2014-02-19 Thread Michael Vogt
On Wed, Feb 19, 2014 at 04:06:16PM +0100, Camaleón wrote:
> Package: squid-deb-proxy
> Severity: wishlist
> Tags: l10n patch

Thanks for your bugreport and the translation!

I added it to my bzr repository and it will be part of the next
upload. 

Cheers,
 Michael
 
> Greetings,
> 
> -- 
> Camaleón 

> # squid-deb-proxy po-debconf translation to Spanish
> # Copyright (C) 2013 Software in the Public Interest
> # This file is distributed under the same license as the squid-deb-proxy 
> package.
> # Changes:
> # - Initial translation
> # Camaleón , 2013, 2014.
> # - Updates
> # Traductores, si no conocen el formato PO, merece la pena leer la
> # documentación de gettext, especialmente las secciones dedicadas a este
> # formato, por ejemplo ejecutando:
> # info -n '(gettext)PO Files'
> # info -n '(gettext)Header Entry'
> # Equipo de traducción al español, por favor lean antes de traducir
> # los siguientes documentos:
> # - El proyecto de traducción de Debian al español
> # http://www.debian.org/intl/spanish/
> # especialmente las notas y normas de traducción en
> # http://www.debian.org/intl/spanish/notas
> # - La guía de traducción de po's de debconf:
> # /usr/share/doc/po-debconf/README-trans
> # o http://www.debian.org/intl/l10n/po-debconf/README-trans
> msgid ""
> msgstr ""
> "Project-Id-Version: squid-deb-proxy 0.8.6\n"
> "Report-Msgid-Bugs-To: \n"
> "POT-Creation-Date: 2014-01-26 14:35+\n"
> "PO-Revision-Date: 2014-02-09 16:13+0200\n"
> "Last-Translator: Camaleón \n"
> "Language-Team: Debian Spanish \n"
> "Language: es\n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=UTF-8\n"
> "Content-Transfer-Encoding: 8bit\n"
> "Plural-Forms: nplurals=2; plural=(n != 1);\n"
> "X-Generator: Virtaal 0.7.1\n"
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:2001
> msgid "Allow PPA access?"
> msgstr "¿Desea permitir el acceso a los PPA?"
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:2001
> msgid ""
> "By default, squid-deb-proxy does not allow access to Personal Package "
> "Archive (PPA) repositories on Launchpad."
> msgstr ""
> "De manera predeterminada, squid-deb-proxy no permite el acceso a los "
> "repositorios de Archivos de Paquetes Personales (PPA) de Launchpad."
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:2001
> msgid "Choosing this option will whitelist these repositories."
> msgstr "Si acepta esta opción se permitirá el acceso a estos repositorios."
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:3001
> msgid "Allow unrestricted network access?"
> msgstr "¿Desea permitir el acceso a la red sin restricciones?"
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:3001
> msgid ""
> "By default, squid-deb-proxy allows access to the cache from private networks 
> "
> "only (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)."
> msgstr ""
> "De manera predeterminada, squid-deb-proxy sólo permite acceder al caché a "
> "las redes privadas (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)."
> 
> #. Type: boolean
> #. Description
> #: ../squid-deb-proxy.templates:3001
> msgid "Choosing this option will allow other IP addresses to access the 
> cache."
> msgstr ""
> "Si acepta esta opción se permitirá el acceso al caché a todas las "
> "direcciones IP."
> 
> #~ msgid "Allow PPA (Personal Package Archive) access?"
> #~ msgstr ""
> #~ "¿Desea permitir el acceso a los PPA (Personal Package Archive o «Archivo "
> #~ "de Paquetes Personal»)?"
> 
> #~ msgid ""
> #~ "Squid-deb-proxy by default will not allow PPA repositories from "
> #~ "launchpad. Selecting Y in this option will activate PPA repo access."
> #~ msgstr ""
> #~ "De manera predeterminada, squid-deb-proxy no permite los repositorios PPA 
> "
> #~ "de Launchpad. Si selecciona Y («sí») en esta opción se activará el acceso 
> "
> #~ "a los repositorios PPA."
> 
> #~ msgid ""
> #~ "Squid-deb-proxy restricts access to the cache to private networks only by 
> "
> #~ "default. Selecting Y in this option will allow unrestricted access of all 
> "
> #~ "IPs to access the cache. Selecting N will only allow private networks "
> #~ "(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to access the cache."
> #~ msgstr ""
> #~ "De manera predeterminada, squid-deb-proxy sólo permite acceder al caché a 
> "
> #~ "las redes privadas. Si selecciona Y («sí») en esta opción se permitirá el 
> "
> #~ "acceso sin restricciones a todas las direcciones IP. Si selecciona N "
> #~ "(«no») sólo se permitirá el acceso al caché a las redes privadas "
> #~ "(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)."


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#738961: synaptic: Application is closing at the moment that any key is pressed

2014-02-19 Thread Michael Vogt
On Fri, Feb 14, 2014 at 10:51:58AM +0100, AndresBurbano wrote:
> Package: synaptic
> Version: 0.75.13
> Severity: grave
> Tags: d-i
> Justification: causes non-serious data loss

Thanks for your bugreport.
 
> Dear Maintainer,
> 
>* What led up to the situation?
> I always develop in Debian, so I got a New PC, then I installed the latest
> version and when I use the synaptec for install some packages, I realized that
> every time pressed I key it was automatically closing the app.
>* What exactly did you do (or not do) that was effective (or
>  ineffective)?
> I Open the application, Accept the  Quick Introduction dialog, I put the 
> cursor
> in the Quick filter and write the app name. At the first key that I press it
> get close. I tried several different keys(a, b, z, t..). However if I select
> the package with the mouse it install normally.
[..]

Would it be possible to get a gdb backtrace of the situation? For this
you will need to open a terminal windows (like gnome-terminal) and
run:
$ sudo gdb synaptic
[enter password]
(gdb) run
[make synaptic crash]
(gdb) bt full

and send me the output?

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#738880: apt-get uses globbing but reports regex for selecting packages + documentation issues

2014-02-15 Thread Michael Vogt
On Thu, Feb 13, 2014 at 09:09:16PM +0100, rpr nospam wrote:
> Package: apt
> Version: 0.9.15
> Severity: normal

Thanks for your bugreport.
 
> Dear Maintainer, here is an example which demonstrates this bug:
> 
> $ sudo apt-get remove 'libre?f?ice.*'
[..]
> The above commands show that the packages selected by apt-get
> (libreoffice.org-calc and libreoffice.org-writer) didn't match
> libre?f?ice.* regex.
> 
> Obviously, apt-get interprets libre?f?ice.* as a glob pattern. So,
> instead of reporting
>   Note, selecting 'libreoffice.org-writer' for regex 'libre?f?ice.*'
> it should report
>   Note, selecting 'libreoffice.org-writer' for glob 'libre?f?ice.*'

Indeed, this is very misleading. We fixed this is git, but unfortunatly
it requires a ABI change, so its queued for now and won't be part of
the next upload (only the next one that breaks the ABI).

As a short-term fix, we can disable the fnmatch(glob) style matching
until the next ABI break as well. Right now it will first try glob,
then regex but given the misleading message this is probably a bad
idea.

> I came about this bug after experiencing the issue described on
> https://lists.debian.org/debian-user/2014/02/msg00639.html
> 
> I'd say that the current apt-get manpage should be expanded and
> clarified in regard to matching package names.
[..]

Right, the current manpage is not accurate enough. I will look at
this next.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#738785: aptitude: (remote) changelogs is broken after packages.d.o move to https

2014-02-14 Thread Michael Vogt
On Fri, Feb 14, 2014 at 08:15:06AM +0100, Julien Cristau wrote:
> On Fri, Feb 14, 2014 at 08:02:16 +0100, Julian Andres Klode wrote:
> > On Thu, Feb 13, 2014 at 10:28:08PM +0100, Raphael Geissert wrote:
> > > First issue is that allowing any protocol switch would basically 
> > > introduce a 
> > > vulnerability in the system. There are too many apt methods and they 
> > > could 
> > > be reached by redirecting http://foo/request to $method://...
> > 
> > I also would not want any redirects, especially not from https to
> > something unsecured. But http -> https makes sense.
> > 
> The https method *already* silently follows https→http redirects today,
> as far as I can tell.  Just tried
> apt-get -o Apt::Changelogs::Server=https://packages.debian.org/changelogs 
> changelog tor
> and I got the changelog from
> http://metadata.ftp-master.debian.org/changelogs/main/t/tor/tor_0.2.4.20-1_changelog
> The http method doesn't get involved, libcurl just does what
> /usr/lib/apt/methods/https tells it to.

Indeed, thanks for this report. This is fixed in git now, apt will not
follow redirects from https->http anymore.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#738103: apt-get download: can't specify the same package twice

2014-02-11 Thread Michael Vogt
On Fri, Feb 07, 2014 at 07:52:35PM +0100, Jakub Wilk wrote:
> Package: apt
> Version: 0.9.15.1
> Severity: minor

Thanks for your bugreport.
 
> "apt-get download" normally silently ignores packages that are
> already downloaded. However, it doesn't behave that way if you
> specify the same package twice on the command line:
> 
> $ apt-get download dash dash
> Get:1 http://ftp.debian.org/debian/ unstable/main dash i386 0.5.7-4 [105 kB]
> Fetched 105 kB in 0s (9070 kB/s)
> E: Failed to fetch 
> http://ftp.debian.org/debian/pool/main/d/dash/dash_0.5.7-4_i386.deb

I can reproduce the issue here and the attached patch should fix the
problem (and adds a regression test). Thanks again for reporting!

Cheers,
 Michael
>From 8f3594c3487800edc2a97af1f3290049776dc556 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Wed, 12 Feb 2014 07:59:07 +0100
Subject: [PATCH] Use a APT::VersionSet instead of a VersionList

Use a APT::VersionSet instead of a APT::VersionList in DoDownload()
to ensure that there is only one version in the set even if the
user passes multiple identical name/versions on the commandline
(Bug#738103)
---
 cmdline/apt-get.cc | 6 +++---
 test/integration/test-apt-get-download | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 1019ff3..4d60910 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -630,8 +630,8 @@ bool DoDownload(CommandLine &CmdL)
   return false;
 
APT::CacheSetHelper helper(c0out);
-   APT::VersionList verset = APT::VersionList::FromCommandLine(Cache,
-		CmdL.FileList + 1, APT::VersionList::CANDIDATE, helper);
+   APT::VersionSet verset = APT::VersionSet::FromCommandLine(Cache,
+		CmdL.FileList + 1, APT::VersionSet::CANDIDATE, helper);
 
if (verset.empty() == true)
   return false;
@@ -650,7 +650,7 @@ bool DoDownload(CommandLine &CmdL)
std::string const cwd = SafeGetCWD();
_config->Set("Dir::Cache::Archives", cwd);
int i = 0;
-   for (APT::VersionList::const_iterator Ver = verset.begin();
+   for (APT::VersionSet::const_iterator Ver = verset.begin();
 	 Ver != verset.end(); ++Ver, ++i)
{
   pkgAcquire::Item *I = new pkgAcqArchive(&Fetcher, SrcList, &Recs, *Ver, storefile[i]);
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index c2a5c3d..0d92283 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -39,3 +39,8 @@ aptget download apt
 aptget download apt
 testsuccess test -s apt_2.0_all.deb
 rm -f apt_1.0_all.deb
+
+# deb:738103 - apt-get download foo foo fails
+rm -f apt_*.deb
+aptget download apt apt
+testsuccess test -s apt_2.0_all.deb
-- 
1.8.3.2



Bug#736962: "apt-get download" truncates existing files

2014-01-29 Thread Michael Vogt
On Tue, Jan 28, 2014 at 08:44:53PM +0100, Jakub Wilk wrote:
> Package: apt
> Version: 0.9.15
> Severity: normal

Thanks for your bugreport.
 
> $ apt-get download dash && wc -c dash_*.deb
> Get:1 http://ftp.debian.org/debian/ unstable/main dash i386 0.5.7-4 [105 kB]
> Fetched 105 kB in 0s (7960 kB/s)
> 105316 dash_0.5.7-4_i386.deb
> 
> $ apt-get download dash && wc -c dash_*.deb
> 0 dash_0.5.7-4_i386.deb

This appears to be a regression from d57f608. Fixed in my git branch
and it will be part of the next upload.

Cheers,
 Michael
 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (990, 'unstable'), (500, 'experimental')
> Architecture: i386 (x86_64)
> Foreign Architectures: amd64
> 
> Kernel: Linux 3.12-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.16-1
> ii  libapt-pkg4.12  0.9.15
> ii  libc6   2.18-0experimental1
> ii  libgcc1 1:4.9-20140122-1
> ii  libstdc++6  4.9-20140122-1
> 
> -- 
> Jakub Wilk
> 
> 
> -- 
> To UNSUBSCRIBE, email to deity-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: http://lists.debian.org/20140128194453.ga11...@jwilk.net
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#735086: apt: `apt-cache show` should show the repository

2014-01-24 Thread Michael Vogt
On Thu, Jan 23, 2014 at 10:15:28AM +0200, Victor Porton wrote:
> 23.01.2014, 10:12, "Michael Vogt" :
> > On Sun, Jan 12, 2014 at 06:59:28PM +0200, Victor Porton wrote:
> > [..]
> >
> > ? Or more something like the URI(s) of the package?
> 
> I want the URI of the repository, not just distribution (such as "unstable").

Thanks, I think that is a good point. So more something like 
"apt-cache policy pkg" - I added something like this to the
feature/apt-show-nice git branch.

Cheerrs,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#735086: apt: `apt-cache show` should show the repository

2014-01-23 Thread Michael Vogt
On Sun, Jan 12, 2014 at 06:59:28PM +0200, Victor Porton wrote:
> Package: apt
> Version: 0.9.14.2
> Severity: wishlist

Thanks for your bugreport.
 
> `apt-cache show` should show which repository the package belongs to.
> 
> I now have a trouble figuring out which repository certain package
> belongs to
[..]

This sounds like a useful feature. Do you have something like this
in mind:
$ apt-cache show foo
Package: foo
Archive-Origin: unstable
[..]

? Or more something like the URI(s) of the package?

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#732937: dpkg: fails somewhat regularly on kfreebsd-amd64

2014-01-18 Thread Michael Vogt
On Sun, Jan 12, 2014 at 08:05:06PM +, Steven Chamberlain wrote:
> Control: tags -1 found apt/0.9.14.2
> 
> Indeed upgrading only libapt-pkg4.12 is enough to trigger this.
[..]

I bisected this and it it appears that c3045b is the one that
introduced the problem. 

Looking closer it appears that I can not do
  ioctl(d->slave, TIOCSCTTY, 0)
more than ones on freebsd without a new openpty() to get a new master
pty (i.e. I can not use the slave fd again). I will do more digging
into this issue. 


Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#732937: dpkg: fails somewhat regularly on kfreebsd-amd64

2014-01-15 Thread Michael Vogt
On Sun, Jan 12, 2014 at 08:05:06PM +, Steven Chamberlain wrote:
> Control: tags -1 found apt/0.9.14.2
> 
> Indeed upgrading only libapt-pkg4.12 is enough to trigger this.
[..]

Thanks a bunch for your bugreport and sorry for my slow reply. Its
likely that this is fallout from some fairly big changes in the
handling of dpkg.

What is the best way for me to reproduce this? I don't have a kfreebsd
system right now - is installing one from a current installer image in
kvm the quickest way (I assume so)?

Cheers,
 Michael

 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#734922: apt-cache showsrc shows duplicate entries

2014-01-15 Thread Michael Vogt
On Tue, Jan 14, 2014 at 06:02:21PM +0530, Faheem Mitha wrote:
> On Tue, 14 Jan 2014, Michael Vogt wrote:
> 
> >On Sat, Jan 11, 2014 at 01:05:23AM +0530, Faheem Mitha wrote:
> >>Package: apt
> >>Version: 0.9.7.9+deb7u1
> >>Severity: normal
> >>
> >>Unlike, for example `apt-cache show` and `apt-cache policy`,
> >>`apt-cache showsrc` shows duplicate entries. I can't see any good
> >>reason for this inconsistency.
> 
> >Attached is a possilbe fix, but there is some cleanup needed before
> >this can go in.
> 
> In this line, "idential" should be "identical".
> 
> +  // avoid showing idential records

Great, thanks! Fixed.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#734922: apt-cache showsrc shows duplicate entries

2014-01-14 Thread Michael Vogt
On Sat, Jan 11, 2014 at 01:05:23AM +0530, Faheem Mitha wrote:
> Package: apt
> Version: 0.9.7.9+deb7u1
> Severity: normal
> 
> Unlike, for example `apt-cache show` and `apt-cache policy`,
> `apt-cache showsrc` shows duplicate entries. I can't see any good
> reason for this inconsistency.

Attached is a possilbe fix, but there is some cleanup needed before
this can go in.

Cheers,
 Michael
>From 14042cb47e58bb64afefe67a0d83494191c11a7a Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Mon, 13 Jan 2014 17:35:54 +0100
Subject: [PATCH] do not show duplicated apt-cache showsrc entries

---
 cmdline/apt-cache.cc   | 23 +--
 .../test-bug-734922-apt-showsrc-duplicate  | 47 ++
 2 files changed, 67 insertions(+), 3 deletions(-)
 create mode 100755 test/integration/test-bug-734922-apt-showsrc-duplicate

diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index b8892d2..58864b4 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1475,6 +1476,15 @@ bool ShowPkgNames(CommandLine &CmdL)
return true;
 }
 	/*}}}*/
+
+// FIXME: move to hashes.h: HashString::FromString()
+std::string Sha1FromString(std::string input)
+{
+   SHA1Summation sha1;
+   sha1.Add(input.c_str(), input.length());
+   return sha1.Result().Value();
+}
+
 // ShowSrcPackage - Show source package records/*{{{*/
 // -
 /* */
@@ -1497,10 +1507,17 @@ bool ShowSrcPackage(CommandLine &CmdL)
   
   pkgSrcRecords::Parser *Parse;
   unsigned found_this = 0;
+  // avoid showing idential records
+  std::set seen;
   while ((Parse = SrcRecs.Find(*I,false)) != 0) {
-cout << Parse->AsStr() << endl;;
-found++;
-found_this++;
+ std::string sha1str = Sha1FromString(Parse->AsStr());
+ if (std::find(seen.begin(), seen.end(), sha1str) == seen.end())
+ {
+cout << Parse->AsStr() << endl;;
+found++;
+found_this++;
+seen.insert(sha1str);
+ } 
   }
   if (found_this == 0) {
 _error->Warning(_("Unable to locate package %s"),*I);
diff --git a/test/integration/test-bug-734922-apt-showsrc-duplicate b/test/integration/test-bug-734922-apt-showsrc-duplicate
new file mode 100755
index 000..66db534
--- /dev/null
+++ b/test/integration/test-bug-734922-apt-showsrc-duplicate
@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386' 
+
+# foo is identical, show it only once in showsrc
+insertpackage "unstable" "foo" "i386" "1.0"
+insertpackage "testing" "foo" "i386" "1.0"
+insertsource "unstable" "foo" "i386" "1.0"
+insertsource "testing" "foo" "i386" "1.0"
+
+# bar is different, show twice
+insertsource "unstable" "bar" "i386" "1.0"
+insertsource "testing" "bar" "i386" "2.0"
+
+setupaptarchive
+
+testequal "Package: foo
+Binary: foo
+Version: 1.0
+Maintainer: Joe Sixpack 
+Architecture: i386
+Files:
+ d41d8cd98f00b204e9800998ecf8427e 0 foo_1.0.dsc
+ d41d8cd98f00b204e9800998ecf8427e 0 foo_1.0.tar.gz
+
+Package: bar
+Binary: bar
+Version: 2.0
+Maintainer: Joe Sixpack 
+Architecture: i386
+Files:
+ d41d8cd98f00b204e9800998ecf8427e 0 bar_2.0.dsc
+ d41d8cd98f00b204e9800998ecf8427e 0 bar_2.0.tar.gz
+
+Package: bar
+Binary: bar
+Version: 1.0
+Maintainer: Joe Sixpack 
+Architecture: i386
+Files:
+ d41d8cd98f00b204e9800998ecf8427e 0 bar_1.0.dsc
+ d41d8cd98f00b204e9800998ecf8427e 0 bar_1.0.tar.gz
+" aptcache showsrc foo bar
\ No newline at end of file
-- 
1.8.3.2



Bug#707275: reported upstream

2014-01-10 Thread Michael Vogt
just a quick update on this bug. I forwarded it upstream as:
https://github.com/ansible/ansible/issues/5525#issuecomment-31738942

and created a git branch with the fix here:
https://github.com/ansible/ansible/pull/5552

Lets see if upstream likes it and pulls it in for 1.4.5/1.5 :)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733495: [INTL:es] Spanish translation of debconf messages

2014-01-08 Thread Michael Vogt
On Sun, Dec 29, 2013 at 01:06:16PM +0100, Camaleón wrote:
> Package: squid-deb-proxy
> Severity: wishlist
> Tags: l10n patch

Thanks for your translation! I merged it into my bzr tree and it will
be part of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#734473:

2014-01-07 Thread Michael Vogt
On Tue, Jan 07, 2014 at 05:28:48PM +0400, Игорь Пашев wrote:
> or better replace rindex() with strrchr()
> 
> http://pubs.opengroup.org/onlinepubs/009695399/functions/strrchr.html

Indeed, did that now too in my tree. Thanks!

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#734473: synaptic: Portability issues (FTBFS on Dyson)

2014-01-07 Thread Michael Vogt
On Tue, Jan 07, 2014 at 05:03:07PM +0400, Igor Pashev wrote:
> Package: synaptic
> Version: 0.80.4+dyson1
> Severity: normal

Thanks for your bugreport and your patches.
 
> please find patches which fix some portability issues:
> 
> dyson-rindex.patch: rindex() is defined in strings.h [rindex]
> dyson-bzero.patch: bzero() is legacy, replace with memset() [bzero]
> dyson-fcntl.patch: fcntl(0 is defined in fcntl.h [fcntl]
> 
> With these patches applied it is possible to rebuild Synaptic on Dyson
> without changes [dyson]

Great, thakns. I merged your changes and it will be part of the next
upload. 

BTW, what is "dyson" ?

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#734500: python-apt: DEP-8 debian/tests/control dependencies missing

2014-01-07 Thread Michael Vogt
On Tue, Jan 07, 2014 at 11:55:54AM -0500, Barry Warsaw wrote:
> Package: python-apt
> Version: 0.9.1
> Severity: normal

Thanks for your bugreport and your patch.

[..] 
> debian/tests/control is missing dependencies to pull in all supported
> Python versions.  Attached is the patch I applied for Ubuntu.
[..]

I merged the patch to git and it will be part of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#707275: forwarded to upstream

2014-01-07 Thread Michael Vogt
Hi,

I forwarded this to https://github.com/ansible/ansible/issues/5525

Looks (from a quick look) not entirely straightforward, but I could be
wrong :)

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2014-01-05 Thread Michael Vogt
On Sun, Jan 05, 2014 at 07:15:05PM +0100, Julian Andres Klode wrote:
> On Sat, Jan 04, 2014 at 07:08:58PM +0100, Michael Vogt wrote:
> > Good catch, thanks! Updated that too.
> > 
> > The patchset includes your pep8/pyflakes patch as well to avoid
> > conflicts. Lets see if Julian has further feedback and if he is also
> > ok with the changes I will commit to the python-apt git upstream
> > branch.
> 
> This includes an older version of other-Michael's patch. The newest
> one has an additional paragraph in the commit message specifying what
> changes where made.
>  
> But apart from that, it's fine.

Excellent, thanks! I fixed that and used Michaels latest patch as the
base and applied the others on top. Thanks for your review!

Sorry for having hijacked the original bugreport, but the
pep8/pyflakes got me carried away a bit. Time to get back to the
original topic of the bugreport :)

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2014-01-04 Thread Michael Vogt
On Tue, Dec 31, 2013 at 11:58:17PM +0100, Julian Andres Klode wrote:
> On Tue, Dec 31, 2013 at 11:06:15PM +0100, Michael Vogt wrote:
[..]
> You really need to include the original copyright statement and the license
> here, otherwise you violate the license. If the original code does not
> include the license or a copyright statement above it, it might not be
> distributable at all, as the license clearly says:
> 
> The *above* copyright notice and *this permission notice* shall be included in
> all copies or substantial portions of the Software.
> 
> (I just added some emphasis)
> 
> I'd even say that including the copyright notice *below* the license terms
> is wrong, as the license clearly says *above*. But not including them is
> definitely wrong.
> 
> We don't want legal issues.

Indeed! The header was cargo-culted from the update-manager
test_pyflakes.py but I rewrote the file for python-apt completely so
we are clean here (and I fixed the comment). I will followup with the
update-manager test too.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2014-01-01 Thread Michael Vogt
On Tue, Dec 31, 2013 at 11:04:47PM +0100, Julian Andres Klode wrote:
> (Addressed to Michael Vogt, so don't wonder, other Michael...)
[..]
> I thought we wanted to use git-dch now (meaning after I released 0.9.1) for
> changelog manipulation. I did commit 56ed099558a9f6e7137a8c113ca9efb2b2c1a1d2
> without a changelog entry for that reason, but I see that you did the commit
> afterwards with a changelog entry.

Indeed, sorry for this, I'm not used to this yet, but I agree that its
a good idea and we should stick with git-dch.

> It would also be cooler to have some more useful summary lines in
> your commits. The last one just had "* apt/cache.py:". If you use
> debcommit, you can use debcommit -e to adjust the summary.

Again agreed, I was using debcommit and will be more carefull about
this in the future.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2014-01-01 Thread Michael Vogt
On Wed, Jan 01, 2014 at 12:30:16PM +0100, Michael Schaller wrote:
> A few comments on the patches:

Thanks for your review and the points you raised.

> 1) tests/test_pep8.py
> Can you document in a comment or docstring why you ignore certain
> issues and what these issues are? This should help readers to better
> understand what the test does and more importantly what it ignores.
> Furthermore do you plan to reduce the number of ignores in the
> future? If so you should add a TODO for yourself.
>
> 2) tests/test_pep8.py
> Can you use instead of 'self.assertEqual(res, 0)' a better fail
> message like you did in 'tests/test_pyflakes.py'?
> 
> 3) tests/test_pyflakes.py
> You don't need the 'from __future__ import print_function' import
> with Python 3.

Those are fixed in my git branch now, thanks!
 
> 4) debian/control (nitpick)
> I prefer to sort dependencies alphabetically.

I have no opinion about this :) I don't really mind either way.

> 5) .travis.yml
> I would really like to see a rather lengthy comment in the beginning
> of the YAML file to explain what purpose it serves and what it does.
> I also think you should give a link here and that you should explain
> what should happen after Trusty. Maybe it would be even better to
> use SID instead of Trusty.
>
> 6) .travis.yml
> Why do you run './debian/rules binary' and not 'dpkg-buildpackage'?
> 
> 7) .travis.yml
> Why not also ensure here that Lintian and if possible piuparts have
> no issues with the newly built package?

Good points, I added a explaination to the top now that hopefully
addresses the points.

I renamed the added sources.list entry as its misleading. In my branch
its using "distro-info --stable" to get test latest python3.3 and
apt/libapt. Using sid here is probably a bit too fragile, the chroots
of the travis-ci.org are ubuntu based. But I would certainly love to
see a travis-ci instance that is debian based.

I changed the "debian/rules binary" in my branch now to be
"./debian/rules build-arch". This will build and run the tests. We
can't use dpkg-buildpackage currently as its using fakeroot and the
tests (iirc in the test_auth.py code) also use fakeroot and nesting
is not possible AFAIK. But I do like the idea of building the deb and
doing additional checks like lintian/piuparts.

Cheers and happy new year!
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2014-01-01 Thread Michael Vogt
On Tue, Dec 31, 2013 at 11:06:15PM +0100, Michael Vogt wrote:
> On Tue, Dec 31, 2013 at 01:09:39PM +0100, Michael Schaller wrote:
[..]
> It also adds a .travis.yml file that runs the tests. Next step is
> to actually make the pep8/pylakes test to pass :)
[..]

That is now done, my branch is pyflakes and pep8 clean. The patch
is a bit big (mostly whitespace of course), I pushed it to
https://github.com/mvo5/python-apt/tree/feature/travis (but I guess
the name should be changed :)

I had to update the minimal python3 version to 3.3 because
test_paths.py would not work otherwise. We might consider rewriting
this test to work on 3.2 (but honestly, I'm not very motivated to do
that).

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2013-12-31 Thread Michael Vogt
On Tue, Dec 31, 2013 at 01:09:39PM +0100, Michael Schaller wrote:
> Hi Michael,
Hi Michael,
 
> From my experience PEP8 and pyflakes are great tools with nearly no
> false positives - especially compared to pylint - and by now they
> are available for Python 2 and 3.

Indeed, I tend to use this combo (pep8 and pyflakes) in my projects as
well, works great!

> I personally like to add a lint command to setup.py to my projects.
> Maybe this would be beneficial for python-apt too. Please let me
> know if you would like to see a patch for that.

Indeed, I attached (this time for real :) patches to include them as
part of the tests. I like it this way as a CI system (like travis) can
alert me if I accidentally break pep8/pyflakes with a commit.

It also adds a .travis.yml file that runs the tests. Next step is
to actually make the pep8/pylakes test to pass :)

Cheers,
 Michael
>From f84aaa308f0f79d4a1407d8fd5cd849de8d50263 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Tue, 31 Dec 2013 10:06:22 +0100
Subject: [PATCH 1/4] make pep8 test part of the unittests

---
 tests/test_pep8.py | 20 
 1 file changed, 20 insertions(+)
 create mode 100755 tests/test_pep8.py

diff --git a/tests/test_pep8.py b/tests/test_pep8.py
new file mode 100755
index 000..f72a2ea
--- /dev/null
+++ b/tests/test_pep8.py
@@ -0,0 +1,20 @@
+import os
+import subprocess
+import unittest
+
+
+class PackagePep8TestCase(unittest.TestCase):
+
+def test_all_code(self):
+res = 0
+py_dir = os.path.join(os.path.dirname(__file__), "..")
+res += subprocess.call(
+["pep8",
+ "--ignore=E121,E123,E124,E125,E126,E127,E128",
+ "--exclude", "build,tests/old",
+ "--repeat", py_dir])
+self.assertEqual(res, 0)
+
+
+if __name__ == "__main__":
+unittest.main()
-- 
1.8.3.2

>From e751078fb9a532a3e8ef411e88d95adbe05ea0a5 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Tue, 31 Dec 2013 21:36:26 +0100
Subject: [PATCH 2/4] add pyflakes test

---
 tests/test_pyflakes.py | 45 +
 1 file changed, 45 insertions(+)
 create mode 100644 tests/test_pyflakes.py

diff --git a/tests/test_pyflakes.py b/tests/test_pyflakes.py
new file mode 100644
index 000..7404987
--- /dev/null
+++ b/tests/test_pyflakes.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python3
+# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-
+
+# Partly based on a script from Review Board, MIT license; but modified to
+# act as a unit test.
+
+from __future__ import print_function
+
+import os
+import subprocess
+import unittest
+
+
+class TestPyflakesClean(unittest.TestCase):
+
+EXCLUDES = ["build", "tests/old"]
+TOPLEVEL = os.path.normpath(
+os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
+
+def is_excluded_path(self, path):
+for exclude in self.EXCLUDES:
+if path.startswith(os.path.join(self.TOPLEVEL, exclude)):
+return True
+return False
+
+def get_py_files(self, toplevel):
+files = []
+for path, dirnames, filenames in os.walk(self.TOPLEVEL):
+if self.is_excluded_path(path):
+continue
+for filename in filenames:
+if os.path.splitext(filename)[1] == ".py":
+files.append(os.path.join(path, filename))
+return files
+
+def test_pyflakes_clean(self):
+cmd = ["pyflakes"] + self.get_py_files(self.TOPLEVEL)
+res = subprocess.call(cmd)
+if res != 0:
+self.fail("pyflakes failed with: %s" % res)
+
+if __name__ == "__main__":
+import logging
+    logging.basicConfig(level=logging.DEBUG)
+unittest.main()
-- 
1.8.3.2

>From f8fb88aadc908fbabacc89169dc7dce197e71a51 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Tue, 31 Dec 2013 22:34:54 +0100
Subject: [PATCH 3/4] add new pep8,pyflakes dependencies

---
 debian/control   | 4 +++-
 debian/tests/control | 2 +-
 po/python-apt.pot| 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index 8c2f2ce..f4f5211 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,9 @@ Build-Depends: apt (>= 0.9.6),
python-distutils-extra (>= 2.0),
python-sphinx (>= 0.5),
python-debian,
-	   python-unittest2
+	   python-unittest2,
+   pep8,
+   pyflakes
 Vcs-Git: git://anonscm.debian.org/apt/python-apt.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=apt/python-apt.git
 XS-Testsuite: autopkgtest
diff --git a/debian/tests/control b/debian/tests/control
index 2ca0a40..bdca7d6 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,2 @@
 Tests: run-tests
-De

Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2013-12-31 Thread Michael Vogt
On Tue, Dec 31, 2013 at 02:05:36PM +0100, Michael Schaller wrote:
> >You can just git-send-email them to the mailing list or even push a git
> >branch somewhere.
> >
> Alrighty. Then let's stick to the bug for the time being as it
> contains already the context for the patches.
> 
> See attached the patch with the PEP8 linter and pyflakes fixes. PEP8
> only showed typical minor issues (indentation, line continuation,
> ...) and pyflakes only found an unused import and an unused
> variable.

This looks good to me, thanks for doing this work. One minor note below:

[..]
> diff --git a/debian/changelog b/debian/changelog
> index 52a1000..a7b037d 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -3,6 +3,9 @@ python-apt (0.9.2) UNRELEASED; urgency=low
>* apt/cache.py:
>  - when using apt.Cache(rootdir=/some/dir) only read the APT
>configuration from this rootdir instead of /etc (closes: #728274)
> +- Fixed PEP8 and pyflakes issues
> +  * apt/package.py:
> +- Fixed PEP8 and pyflakes issues

Feel free to add yourself in the changelog, i.e. something like:

+ [ Michael Schaller ]
+  * apt/cache.py:
+- Fixed PEP8 and pyflakes issues
+  * apt/package.py:
+- Fixed PEP8 and pyflakes issues

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#733489: python-apt: Improve 'Dependency' and 'BaseDependency' to get target package versions that satisfy dependencies

2013-12-31 Thread Michael Vogt
On Tue, Dec 31, 2013 at 01:29:53AM +0100, Julian Andres Klode wrote:
> On Sun, Dec 29, 2013 at 12:06:18PM +0100, Michael Schaller wrote:
[..]
> >   - Fixed PEP8 linter issues
> 
> The PEP8 stuff should be separate.
[..]

Thanks for bringing up better pep8 compliance. I think something like
the attached patch would nice to ensure that the code stays in the
pep8 style. If there is consensus on this, I'm happy to make the test
pass (i.e. make the rest of the code pep8 compatible).

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728500: apt-get fails: mkstemp (2: No such file or directory)

2013-12-22 Thread Michael Vogt
On Sun, Dec 22, 2013 at 11:56:50AM +0100, Thomas Bechtold wrote:
> Package: apt
> Version: 0.9.14.1
> Followup-For: Bug #728500

Thanks for your bugreport and your patch!
 
> I have the same problem on my system.
> The thing is that apt-get update uses the $TMPDIR variable.
> On my system, this variable is set to /tmp/user/0 when I run "apt-get update" 
> inside of the chroot.
> But this directory doesn't exist inside of the chroot.
> 
> "TMPDIR=/tmp apt-get update" inside of the chroot works fine.
> 
> Attached is a patch for apt to fallback to /tmp in case of a unavailable
> directory given from $TMPDIR. Of course this doesn't help for already
> released apt versions so we need to know why $TMPDIR is set to this
> directory but for future apt releases, the patch handles this error case
> better.
[..]

I think this approch makes a lot of sense and I merged your patch into
our git tree. Thanks! 

I will probably add another one on top of it to have one "GetTmpDir()"
funtion in libapt.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#732746: apt: Empty /etc/apt/preferences file is not allowed

2013-12-21 Thread Michael Vogt
On Fri, Dec 20, 2013 at 11:51:35PM +, Will Marler wrote:
> Package: apt
> Version: 0.9.7.9+deb7u1
> Severity: normal

Thanks for your bugreport.

[..] 
> The bug can be reproduced quite simply by putting a single comment in 
> /etc/apt/preferences. 
> For example:
> # This file is maintained by Puppet. Contents will be overwritten.
> 
> When running apt-get, the output will be:
> "E: Unable to parse package file /etc/apt/preferences (1)"
[..]
> It's clear that apt-get isn't checking the validity of the text following the 
> "Package:" line, so
> why is it a requirement that the "Package:" line be present at all? 
[..]

I can reproduce the issue here and I agree that the current behavior
is confusing. Attached a patch with testcase that makes the parser
more relaxed. Feedback welcome.

Cheers,
 Michael
>From 75ab11ae3880530c5354cc90c8d1ff0998f8146b Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Sat, 21 Dec 2013 18:50:03 +0100
Subject: [PATCH] make /etc/apt/preferences parser deal with comment only
 sections

---
 apt-pkg/policy.cc|  4 
 apt-pkg/tagfile.cc   | 11 --
 test/integration/test-bug-732746-preferences | 32 
 3 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100755 test/integration/test-bug-732746-preferences

diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 0a06cc6..d0f9744 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -405,6 +405,10 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
PreferenceSection Tags;
while (TF.Step(Tags) == true)
{
+  // can happen when there are only comments in a record
+  if (Tags.Count() == 0)
+ continue;
+
   string Name = Tags.FindS("Package");
   if (Name.empty() == true)
 	 return _error->Error(_("Invalid record in the preferences file %s, no Package header"), File.c_str());
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index e0802e3..bef3c76 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -259,7 +259,12 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength)
TagCount = 0;
while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End)
{
-   TrimRecord(true,End);
+  TrimRecord(true,End);
+
+  // this can happen when TrimRecord trims away the entire Record
+  // (e.g. because it just contains comments)
+  if(Stop == End)
+ return true;
 
   // Start a new index and add it to the hash
   if (isspace(Stop[0]) == 0)
@@ -273,7 +278,9 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength)
   if (Stop == 0)
 	 return false;
 
-  for (; Stop+1 < End && Stop[1] == '\r'; Stop++);
+  for (; Stop+1 < End && Stop[1] == '\r'; Stop++)
+ /* nothing */
+ ;
 
   // Double newline marks the end of the record
   if (Stop+1 < End && Stop[1] == '\n')
diff --git a/test/integration/test-bug-732746-preferences b/test/integration/test-bug-732746-preferences
new file mode 100755
index 000..b31f98a
--- /dev/null
+++ b/test/integration/test-bug-732746-preferences
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertinstalledpackage 'bar' 'i386' '1.0'
+
+cat > rootdir/etc/apt/preferences << EOF
+# random test comment header
+
+# commented out by puppy^Wpuppet
+#Package: foo
+#Pin: origin "ftp.debian.org"
+#Pin: 800
+
+Package: bar
+Pin: version 1.0
+Pin-Priority: 700
+
+#Package: bar
+#Pin: version 1.0
+#Pin: 800
+EOF
+
+testequal "Reading package lists...
+Building dependency tree..." aptget check
+
+msgtest "Ensure policy is applied"
+aptcache policy bar|grep -q "*** 1.0 700" && msgpass || msgfail
-- 
1.8.3.2



Bug#732749: please consider adding vendor information for raspbian.

2013-12-21 Thread Michael Vogt
On Sat, Dec 21, 2013 at 12:11:43AM +, peter green wrote:
> Package: apt
> Version: 0.9.14.1
> Severity: wishlist
> Tags: patch

Thanks for your patch!
 
> While updating the apt package in raspbian I noticed that the
> keyring related settings that we have to change have now moved into
> a new vendor system. So I added an entry for raspbian by copying the
> debian one and changing the keyring and example sources.list
> settings.
> 
> I notice that you include settings for both debian and ubuntu in the
> debian source package. Please consider also including the settings
> for raspbian so we don't have to manually alter the source package
> every time a new version enters debian.
[..]

Thanks, making the life of the distributions that use apt easier (by
not having to alter the apt source package) is the goal, so its great
to see your patch :) I merged it into our git repository and it will
be part of the next upload.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#732628: Please support squid-deb-proxy-client

2013-12-19 Thread Michael Vogt
Package: debootstrap
Version: git

It would be nice if deboostrap would support the proxy auto discovery
from apt-get. Attached is a patch that adds it, please let me know if
that sounds reasonable and if the patch looks ok. Happy to adjust it
if you have any suggestions.

Cheers,
 Michael
>From 628f55068a60c72666dc45f3ff22f82346c60b35 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Thu, 19 Dec 2013 15:36:58 +0100
Subject: [PATCH] try to auto-detect proxy if available

---
 debootstrap | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/debootstrap b/debootstrap
index dfa0abc..7bbb15e 100755
--- a/debootstrap
+++ b/debootstrap
@@ -48,6 +48,17 @@ PRIVATEKEY=""
 
 DEF_MIRROR="http://ftp.us.debian.org/debian";
 
+# do auto proxy discovery
+AUTOPROXY=""
+eval $(apt-config shell AUTOPROXY Acquire::http::ProxyAutoDetect)
+if [ -z "$http_proxy" ] && [ -x "$AUTOPROXY" ]; then
+http_proxy="$($AUTOPROXY)"
+if [ -n "$http_proxy" ]; then
+echo "Using auto-detected proxy: $http_proxy"
+export http_proxy
+fi
+fi
+
 export LANG USE_COMPONENTS
 umask 022
 
-- 
1.8.3.2



Bug#731738: apt: fancy progress breaks “show the differences between the versions”

2013-12-18 Thread Michael Vogt
On Sun, Dec 15, 2013 at 04:17:15PM +, Thorsten Glaser wrote:
> Michael Vogt dixit:
> 
> >could not trigger the issue.
> 
> Hmm. I run things in GNU screen (TERM=screen) inside uxterm.
> Maybe this is important?

I can trigger this problem in a xterm and linux console with:
$ tput csr 1 20
$ less /etc/mailcap
 
But can't reproduce it in a gnome-terminal. I'm still trying to figure
out why its happening.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731738: apt: fancy progress breaks “show the differences between the versions”

2013-12-15 Thread Michael Vogt
On Sun, Dec 15, 2013 at 04:17:15PM +, Thorsten Glaser wrote:
> Michael Vogt dixit:
> 
> >could not trigger the issue.
> 
> Hmm. I run things in GNU screen (TERM=screen) inside uxterm.
> Maybe this is important?

Indeed, this was the missing piece in the puzzle.

I can reproduce this bug in both xterm and uxterm. It does not matter
if screen is running or not.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731853: apt: "apt-get source -t unstable binutils" selects a wrong version of binutils

2013-12-11 Thread Michael Vogt
On Tue, Dec 10, 2013 at 04:17:16PM +0100, David Kalnischkies wrote:
> On Tue, Dec 10, 2013 at 03:14:24PM +0100, Vincent Lefevre wrote:
[..]
> That binutils:amd64 isn't working anymore sounds like different (but
> related) regression.
> 
> Seems like Michael broke more than he fixed in an effort to support
> deb-src without deb entries. Word of the day: Testcase(s) ;)

$ apt-get source binutils:amd64 
should work now too. Lets see if this time I fixed more than I broke.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731853: apt: "apt-get source -t unstable binutils" selects a wrong version of binutils

2013-12-10 Thread Michael Vogt
On Tue, Dec 10, 2013 at 03:21:38PM +0100, Vincent Lefevre wrote:
[..]
> If I add ":amd64", then
> 
> $ apt-get source -t unstable binutils:amd64
> Reading package lists... Done
> Building dependency tree   
> Reading state information... Done
> E: Ignore unavailable version '2.24-2' of package 'binutils:amd64'
> E: Unable to find a source package for binutils:amd64

The attached diff should fix this problem. Note that its not a
regression, this hasn't worked before. But its a good idea to support
it.

Feedback welcome!

Thanks,
 Michael
>From adf379e7ad1900db6d3942ac7dca5cec4737d9a1 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Wed, 11 Dec 2013 08:21:04 +0100
Subject: [PATCH] add support for "apt-get source pkg:arch"

---
 cmdline/apt-get.cc| 60 +--
 test/integration/test-apt-get-source-arch | 60 +++
 2 files changed, 110 insertions(+), 10 deletions(-)
 create mode 100755 test/integration/test-apt-get-source-arch

diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 5814663..9cc5b40 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -198,18 +198,31 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 			   pkgSrcRecords &SrcRecs,string &Src,
 			   CacheFile &CacheFile)
 {
-  string VerTag, UserRequestedVerTag;
+   string VerTag, UserRequestedVerTag;
+   string ArchTag = "";
string RelTag = _config->Find("APT::Default-Release");
string TmpSrc = Name;
pkgDepCache *Cache = CacheFile.GetDepCache();
 
-   // extract the version/release from the pkgname
-   const size_t found = TmpSrc.find_last_of("/=");
-   if (found != string::npos) {
-  if (TmpSrc[found] == '/')
-	 RelTag = TmpSrc.substr(found+1);
-  else
-	 VerTag = UserRequestedVerTag = TmpSrc.substr(found+1);
+   // extract release
+   size_t found = TmpSrc.find_last_of("/");
+   if (found != string::npos) 
+   {
+  RelTag = TmpSrc.substr(found+1);
+  TmpSrc = TmpSrc.substr(0,found);
+   }
+   // extract the version
+   found = TmpSrc.find_last_of("=");
+   if (found != string::npos) 
+   {
+  VerTag = UserRequestedVerTag = TmpSrc.substr(found+1);
+  TmpSrc = TmpSrc.substr(0,found);
+   }
+   // extract arch 
+   found = TmpSrc.find_last_of(":");
+   if (found != string::npos) 
+   {
+  ArchTag = TmpSrc.substr(found+1);
   TmpSrc = TmpSrc.substr(0,found);
}
 
@@ -217,10 +230,25 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
   install a version and determine the source package name, then look
   in the archive for a source package of the same name. */
bool MatchSrcOnly = _config->FindB("APT::Get::Only-Source");
-   const pkgCache::PkgIterator Pkg = Cache->FindPkg(TmpSrc);
+   pkgCache::PkgIterator Pkg;
+   if (ArchTag != "")
+  Pkg = Cache->FindPkg(TmpSrc, ArchTag);
+   else
+  Pkg = Cache->FindPkg(TmpSrc);
+
+   // if we can't find a package but the user qualified with a arch,
+   // error out here
+   if (Pkg.end() && ArchTag != "")
+   {
+  Src = Name;
+  _error->Error(_("Can not find a package for architecture '%s'"),
+ArchTag.c_str());
+  return 0;
+   }
+
if (MatchSrcOnly == false && Pkg.end() == false) 
{
-  if(VerTag.empty() == false || RelTag.empty() == false) 
+  if(VerTag != "" || RelTag != "" || ArchTag != "")
   {
 	 bool fuzzy = false;
 	 // we have a default release, try to locate the pkg. we do it like
@@ -240,6 +268,17 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 	   if (Ver.end() == true)
 		  break;
 	}
+
+// pick highest version for the arch unless the user wants
+// something else
+if (ArchTag != "" && VerTag == "" && RelTag == "")
+{
+   if(Ver.Arch() != ArchTag)
+  continue;
+   if(Cache->VS().CmpVersion(VerTag, Ver.VerStr()) < 0)
+  VerTag = Ver.VerStr();
+}
+
 	// We match against a concrete version (or a part of this version)
 	if (VerTag.empty() == false &&
 		(fuzzy == true || Cache->VS().CmpVersion(VerTag, Ver.VerStr()) != 0) && // exact match
@@ -280,6 +319,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 	   break;
 	 }
   }
+
   if (Src.empty() == true)
   {
 	 // if we don't have found a fitting package yet so we will
diff --git a/test/integration/test-apt-get-source-arch b/test/integration/test-apt-get-source-arch
new file mode 100755
index 000..3ac6907
--- /dev/null
+++ b/test/integration/test-apt-

Bug#731853: apt: "apt-get source -t unstable binutils" selects a wrong version of binutils

2013-12-10 Thread Michael Vogt
On Tue, Dec 10, 2013 at 04:17:16PM +0100, David Kalnischkies wrote:
> On Tue, Dec 10, 2013 at 03:14:24PM +0100, Vincent Lefevre wrote:
[..]
> I can reproduce this, but only with:
> $ apt-get source -t unstable binutils
> the supposed-to-be identical alternative:
> $ apt-get source -t sid binutils
> works out as intended.
> 
> Looks like apt-get believes it has no binary records for unstable and
> takes the first version it finds in Sources – which in this case offers
> three different versions.

Yes, this is fixed in git now.
 
> That binutils:amd64 isn't working anymore sounds like different (but
> related) regression.

I checked older versions and this does not work there either. So not a
regression (but probably a good idea to support it).

> Seems like Michael broke more than he fixed in an effort to support
> deb-src without deb entries. Word of the day: Testcase(s) ;)

Indeed, sorry again for the trouble. The debian/sid branch now has a
testcase that covers this bug plus some additional cases. 

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731738: apt: fancy progress breaks “show the differences between the versions”

2013-12-10 Thread Michael Vogt
On Mon, Dec 09, 2013 at 10:13:31AM +0100, Thorsten Glaser wrote:
> Package: apt
> Version: 0.9.14
> Severity: normal

Thanks for your bugreport.
 
> I’ve got lengthy local deltas in /etc/lynx-cur/lynx.cfg and was
> just prompted by dpkg how to handle it, while the fancy progress
> thing was still visible. I told it to show me the diff (in less),
> and the progress thing vanished, but after scrolling down then up
> then down then up, I could not scroll in at least one direction
> any more. This is reproducible.

I tried to reproduce this here with lynx-cur inside gnome-terminal but
wasn't successful. I got the prompt, looked at the diff (with less),
scolled up and down a couple of times - all worked fine. I also tried
a couple of times going back and forth between "diff" and overview but
could not trigger the issue.

Cheers,
 Michael

What terminal do you use?  
 
> -- Package-specific info:
> 
> -- (/etc/apt/preferences present, but not submitted) --
> 
> 
> -- (/etc/apt/sources.list present, but not submitted) --
> 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'stable'), (100, 'experimental')
> Architecture: i386 (i686)
> 
> Kernel: Linux 3.11-2-amd64 (SMP w/4 CPU cores)
> Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/lksh
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.15-1.1
> ii  libapt-pkg4.12  0.9.14
> ii  libc6   2.17-97
> ii  libgcc1 1:4.8.2-8
> ii  libstdc++6  4.8.2-8
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc  
> pn  aptitude | synaptic | wajig  
> iu  dpkg-dev 1.17.4
> ii  python-apt   0.9.1
> ii  xz-utils 5.1.1alpha+20120614-2
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to deity-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/20131209091331.27743.91055.report...@tglase.lan.tarent.de
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731853: apt: "apt-get source -t unstable binutils" selects a wrong version of binutils

2013-12-10 Thread Michael Vogt
On Tue, Dec 10, 2013 at 03:43:02PM +0100, Vincent Lefevre wrote:
> And reverting to apt 0.9.13.1 solves the problem.
> 
> I wonder whether the severity should be raised to grave. Due to
> this bug, I didn't notice that binutils was downgraded, and I got
> my system temporarily broken (due to incorrect dependencies).

Thanks for your bugreport and sorry for the trouble. I can reproduce
the issue and work on a fix.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731102: apt: "apt-get source package/suite" unavailable target

2013-12-04 Thread Michael Vogt
On Tue, Dec 03, 2013 at 09:58:31PM +0100, Michael Vogt wrote:
> On Sun, Dec 01, 2013 at 09:07:26PM -0500, Michael Gilbert wrote:
> > package: src:apt
> > severity: normal
> > version: 0.9.13
[..]
> Indeed this is a good suggestion.
> 
> Please see the attached patch to add the release matching for
> deb-src only targets. It needs some serious love (and probably a bit
> of refactoring in the FindSrc() code) and a testcase of course.
[..]

Attached a much approved version that should be suitable for
inclusion. With the next ABI break we can get rid of even more cruft
in there (all the #ifds :). There are some changes in there that are
not strictly needed, but I took the opportunity to do a bit of
cleanup.

Cheers,
 Michael
>From 7014e1482942d00b66eb30061b0cf5d2a7b3ebf3 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Thu, 5 Dec 2013 08:11:11 +0100
Subject: [PATCH] * enable release based selection for deb-src (closes: 731102)

---
 apt-pkg/deb/debmetaindex.cc |  17 +-
 apt-pkg/deb/debmetaindex.h  |   7 +++
 apt-pkg/indexfile.h |   4 +-
 apt-pkg/indexrecords.cc |   5 ++
 apt-pkg/indexrecords.h  |   1 +
 apt-pkg/metaindex.h |  24 ++---
 cmdline/apt-get.cc  | 122 +++-
 7 files changed, 145 insertions(+), 35 deletions(-)

diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index b597b6f..5048775 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -1,4 +1,3 @@
-// ijones, walters
 #include 
 
 #include 
@@ -72,6 +71,22 @@ string debReleaseIndex::MetaIndexURI(const char *Type) const
return Res;
 }
 
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+std::string debReleaseIndex::LocalFileName() const
+{
+   // see if we have a InRelease file
+   std::string PathInRelease =  MetaIndexFile("InRelease");
+   if (FileExists(PathInRelease))
+  return PathInRelease;
+
+   // and if not return the normal one
+   if (FileExists(PathInRelease))
+  return MetaIndexFile("Release");
+
+   return "";
+}
+#endif
+
 string debReleaseIndex::IndexURISuffix(const char *Type, string const &Section, string const &Arch) const
 {
string Res ="";
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index b9ecab9..cef8d68 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -3,6 +3,7 @@
 #define PKGLIB_DEBMETAINDEX_H
 
 #include 
+#include 
 
 #include 
 #include 
@@ -39,9 +40,15 @@ class debReleaseIndex : public metaIndex {
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
std::vector * ComputeIndexTargets() const;
std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
+
std::string MetaIndexInfo(const char *Type) const;
std::string MetaIndexFile(const char *Types) const;
std::string MetaIndexURI(const char *Type) const;
+
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+   virtual std::string LocalFileName() const;
+#endif
+
std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const;
std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const;
std::string SourceIndexURI(const char *Type, const std::string &Section) const;
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 1d34dc7..2d433b6 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -78,10 +78,10 @@ class pkgIndexFile
virtual bool Exists() const = 0;
virtual bool HasPackages() const = 0;
virtual unsigned long Size() const = 0;
-   virtual bool Merge(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const { return false; };
+   virtual bool Merge(pkgCacheGenerator &Gen, OpProgress* Prog) const { return false; };
__deprecated virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const
   { return Merge(Gen, &Prog); };
-   virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const {return true;};
+   virtual bool MergeFileProvides(pkgCacheGenerator &Gen,OpProgress* Prog) const {return true;};
__deprecated virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const
   {return MergeFileProvides(Gen, &Prog);};
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 8a72ca1..f8097c3 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -27,6 +27,11 @@ string indexRecords::GetDist() const
return this->Dist;
 }
 
+string indexRecords::GetSuite() const
+{
+   return this->Suite;
+}
+
 bool indexRecords::CheckDist(const string MaybeDist) const
 {
return (this->Dist == M

Bug#726169: Add reference to Dpkg::Progress-Fancy in apt-get.8

2013-12-04 Thread Michael Vogt
On Wed, Dec 04, 2013 at 07:58:56AM -0500, James McCoy wrote:
> Ping.  This should be a simple change and will help people actually know
> how to setup the progress display.

Ups, sorry. I overlooked this patch. Merged into git now and it will
be part of the next upload.

Cheers,
 Michael
 
> On Sat, Oct 12, 2013 at 08:49:25PM -0400, James McCoy wrote:
> > diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml
> > index 4c050ec..1ece004 100644
> > --- a/doc/apt-get.8.xml
> > +++ b/doc/apt-get.8.xml
> > @@ -526,7 +526,7 @@
> >   terminal window when packages are installed, upgraded or
> >   removed. For a machine parsable version of this data see
> >   README.progress-reporting in the apt doc directory.
> > - DpkgPM::Progress.
> > + Configuration Item: DpkgPM::Progress and 
> > Dpkg::Progress-Fancy.
> >   
> >  
> >  
> 
> -- 
> James
> GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#731102: apt: "apt-get source package/suite" unavailable target

2013-12-03 Thread Michael Vogt
On Sun, Dec 01, 2013 at 09:07:26PM -0500, Michael Gilbert wrote:
> package: src:apt
> severity: normal
> version: 0.9.13

Thanks for your bugreport.
 
> apt-get source will currently produce errors when only source lines
> are included in /etc/apt/sources.list.
> 
> $ cat /etc/apt/sources.list
> deb http://ftp.debian.org/debian sid main
> deb-src http://ftp.debian.org/debian sid main
> 
> deb-src http://ftp.debian.org/debian wheezy  main
> $ apt-get source lighttpd/stable
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Ignore unavailable target release 'stable' of package 'lighttpd'
> E: Unable to find a source package for
> 
> This does work when an associated binary source line is included, but
> it would be preferable to not need this since it would save some
> unnecessary downloading when working with multiple suites.
[..]

Indeed this is a good suggestion.

Please see the attached patch to add the release matching for
deb-src only targets. It needs some serious love (and probably a bit
of refactoring in the FindSrc() code) and a testcase of course.

Cheers,
 Michael
>From 1a22e16a1ebf08243c1836e1c593cb966cae4850 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Tue, 3 Dec 2013 21:49:02 +0100
Subject: [PATCH] proof-of-concept for fixing debian #731102

---
 apt-pkg/indexrecords.cc |  5 
 apt-pkg/indexrecords.h  |  1 +
 apt-pkg/metaindex.h |  3 ++-
 cmdline/apt-get.cc  | 66 +++--
 4 files changed, 61 insertions(+), 14 deletions(-)

diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 8a72ca1..f8097c3 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -27,6 +27,11 @@ string indexRecords::GetDist() const
return this->Dist;
 }
 
+string indexRecords::GetSuite() const
+{
+   return this->Suite;
+}
+
 bool indexRecords::CheckDist(const string MaybeDist) const
 {
return (this->Dist == MaybeDist
diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h
index a98b939..d003ec0 100644
--- a/apt-pkg/indexrecords.h
+++ b/apt-pkg/indexrecords.h
@@ -46,6 +46,7 @@ class indexRecords
 
virtual bool Load(std::string Filename);
std::string GetDist() const;
+   std::string GetSuite() const;
time_t GetValidUntil() const;
virtual bool CheckDist(const std::string MaybeDist) const;
std::string GetExpectedDist() const;
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 5783735..0c2600c 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -48,7 +48,8 @@ class metaIndex
virtual ~metaIndex() {
   if (Indexes == 0)
 	 return;
-  for (std::vector::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
+  for (std::vector::iterator I = (*Indexes).begin();
+   I != (*Indexes).end(); ++I)
 	 delete *I;
   delete Indexes;
}
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 912b2d6..2370318 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -50,6 +50,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -135,11 +137,12 @@ bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
 /* */
 pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 			   pkgSrcRecords &SrcRecs,string &Src,
-			   pkgDepCache &Cache)
+			   CacheFile &CacheFile)
 {
string VerTag;
string DefRel = _config->Find("APT::Default-Release");
string TmpSrc = Name;
+   pkgDepCache *Cache = CacheFile.GetDepCache();
 
// extract the version/release from the pkgname
const size_t found = TmpSrc.find_last_of("/=");
@@ -155,7 +158,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
   install a version and determine the source package name, then look
   in the archive for a source package of the same name. */
bool MatchSrcOnly = _config->FindB("APT::Get::Only-Source");
-   const pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
+   const pkgCache::PkgIterator Pkg = Cache->FindPkg(TmpSrc);
if (MatchSrcOnly == false && Pkg.end() == false) 
{
   if(VerTag.empty() == false || DefRel.empty() == false) 
@@ -180,7 +183,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 	}
 	// We match against a concrete version (or a part of this version)
 	if (VerTag.empty() == false &&
-		(fuzzy == true || Cache.VS().CmpVersion(VerTag, Ver.VerStr()) != 0) && // exact match
+		(fuzzy == true || Cache->VS().CmpVersion(VerTag, Ver.VerStr()) != 0) && // exact match
 		(fuzzy == false || strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0)) // fuzzy match
 	   continue;
 
@@ -217,22 +220,24 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,

Bug#730795: aptitude: buggy newline output with aptitude-curses in case of error during package install

2013-11-29 Thread Michael Vogt
On Fri, Nov 29, 2013 at 06:11:32PM +0100, Axel Beckert wrote:
> Control: reassign -1 libapt-pkg4.12 0.9.13
> Control: affects -1 aptitude
[..]
> So this helped finally: Downgrading all packages built from the apt
> source package, exiting the screen session in which aptitude was
> running, calling reset in the xterm, starting screen again and
> aptitude again.

Thanks for the report and the detailed description.
I can reproduce this here and work on a fix.

> > The problem is also reproducible with apt-get rather than aptitude,
> > in a quite minimal pbuilder chroot.
> 
> Thanks for checking. So maybe this is related to
> http://bugs.debian.org/730490 ?

I do not think this is releated.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#709560: apt-get segfaults when installing linux-headers-3.8-2-amd64 on Wheezy

2013-11-29 Thread Michael Vogt
On Thu, Nov 28, 2013 at 10:12:50PM +0100, Michael Vogt wrote:
> On Thu, Nov 28, 2013 at 02:07:10PM -0500, Robert Edmonds wrote:
> > Michael Vogt wrote:
> > > I have some idea what is triggering this, but I need some help to be sure.
> > > 
> > > Could you please provide the /etc/apt/sources.list and
> > > /etc/apt/preferences file so that I can try to reproduce the issue? A
> > > gdb backtrace would be great as well.
> > 
> > here you go:
> [..]
> 
> Thanks a bunch. I can reproduce it now and attached a small fix, but
> I'm still investigating the root cause.
[..]

Attached is a proper version with a testcase now.

Cheers,
 Michael
>From 2f5ed336109d11e06d08bedef6b37d6597c4c09c Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Fri, 29 Nov 2013 17:10:35 +0100
Subject: [PATCH] fix crash when SetCandidateRelease is used

---
 apt-pkg/depcache.cc|  2 +-
 apt-private/private-install.h  |  3 ++
 .../test-bug-709560-set-candidate-release  | 36 ++
 3 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100755 test/integration/test-bug-709560-set-candidate-release

diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index a06789c..f9c891c 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1522,7 +1522,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer,
 	 if (itsFine == false)
 	 {
 	// change the candidate
-	Changed.push_back(make_pair(oldCand, TargetVer));
+	Changed.push_back(make_pair(V, TargetVer));
 	if (SetCandidateRelease(V, TargetRel, Changed) == false)
 	{
 	   if (stillOr == false)
diff --git a/apt-private/private-install.h b/apt-private/private-install.h
index 439c897..2187146 100644
--- a/apt-private/private-install.h
+++ b/apt-private/private-install.h
@@ -95,6 +95,9 @@ struct TryToInstall {
 	 Cache->GetDepCache()->SetCandidateVersion(s->first);
 
   bool Success = true;
+  // the Changed list contains:
+  //   first: "new version" 
+  //   second: "what-caused the change" 
   std::list > Changed;
   for (std::list >::const_iterator s = start.begin();
 		s != start.end(); ++s)
diff --git a/test/integration/test-bug-709560-set-candidate-release b/test/integration/test-bug-709560-set-candidate-release
new file mode 100755
index 000..48dc5c3
--- /dev/null
+++ b/test/integration/test-bug-709560-set-candidate-release
@@ -0,0 +1,36 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertpackage 'experimental' 'foo' 'all' '2.0' 'Depends: foo-dep (= 2.1)'
+insertpackage 'experimental' 'foo-dep' 'all' '2.1'
+
+
+(
+cat < rootdir/etc/apt/preferences
+
+
+setupaptarchive
+
+testequal "Reading package lists...
+Building dependency tree...
+Selected version '2.0' (experimental [all]) for 'foo'
+Selected version '2.1' (experimental [all]) for 'foo-dep' because of 'foo'
+The following extra packages will be installed:
+  foo-dep
+The following NEW packages will be installed:
+  foo foo-dep
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo-dep (2.1 experimental [all])
+Inst foo (2.0 experimental [all])
+Conf foo-dep (2.1 experimental [all])
+Conf foo (2.0 experimental [all])" aptget install -q0 -s foo/experimental
-- 
1.8.3.2



Bug#709560: apt-get segfaults when installing linux-headers-3.8-2-amd64 on Wheezy

2013-11-28 Thread Michael Vogt
On Thu, Nov 28, 2013 at 02:07:10PM -0500, Robert Edmonds wrote:
> Michael Vogt wrote:
> > I have some idea what is triggering this, but I need some help to be sure.
> > 
> > Could you please provide the /etc/apt/sources.list and
> > /etc/apt/preferences file so that I can try to reproduce the issue? A
> > gdb backtrace would be great as well.
> 
> here you go:
[..]

Thanks a bunch. I can reproduce it now and attached a small fix, but
I'm still investigating the root cause.

Cheers,
 Michael
diff --git a/apt-private/private-install.h b/apt-private/private-install.h
index 439c897..54ffabf 100644
--- a/apt-private/private-install.h
+++ b/apt-private/private-install.h
@@ -106,6 +106,8 @@ struct TryToInstall {
   for (std::list >::const_iterator c = Changed.begin();
 	   c != Changed.end(); ++c)
   {
+ if (c->first == NULL)
+continue;
 	 if (c->second.end() == true)
 	ioprintf(out, _("Selected version '%s' (%s) for '%s'\n"),
 		 c->first.VerStr(), c->first.RelStr().c_str(), c->first.ParentPkg().FullName(true).c_str());


Bug#709560: apt-get segfaults when installing linux-headers-3.8-2-amd64 on Wheezy

2013-11-28 Thread Michael Vogt
On Sat, Nov 23, 2013 at 04:33:28PM -0500, Robert Edmonds wrote:
> hi,
Hi,
 
> i have a similar apt config (wheezy, with pinning for packages from
> unstable), and i get:
> 
> root@bst:~# apt-cache policy linux-tools-3.11
> linux-tools-3.11:
>   Installed: (none)
>   Candidate: (none)
>   Version table:
>  3.11-3 0
> -10 http://ftp.us.debian.org/debian/ sid/main amd64 Packages
> root@bst:~# apt-get install linux-tools-3.11/unstable
> Reading package lists... Done
> Building dependency tree   
> Reading state information... Done
> Selected version '3.11-3' (Debian:unstable [amd64]) for 'linux-tools-3.11'
> Segmentation fault
> root@bst:~# 
> 
> i rebuilt apt 0.9.7.9+deb7u1 with debugging symbols and i get the
> following valgrind output:
[..]

I have some idea what is triggering this, but I need some help to be sure.

Could you please provide the /etc/apt/sources.list and
/etc/apt/preferences file so that I can try to reproduce the issue? A
gdb backtrace would be great as well.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#730362: /usr/bin/apt-get: simulate option does not work any more

2013-11-28 Thread Michael Vogt
On Sun, Nov 24, 2013 at 06:43:31PM +0530, Ritesh Raj Sarraf wrote:
> Package: apt
> Version: 0.9.12.1
> Severity: important
> File: /usr/bin/apt-get

Thanks for your bugreport.
 
> I don't know since when, but --simulate has broken. I checked in the
> changelog, but there was no such metion.

The commandline parser got stricter in 0.9.11 and it now complains
when options are provided that do not apply in the given context.
 
> rrs@zan:/var/lib/apt$ apt-get   update --dry-run
> E: Command line option --dry-run is not understood
> 
> rrs@zan:~$ sudo apt-get -qq --print-uris --simulate update
>
> E: Command line option --simulate is not understood   
> 
  
The options "--dry-run" or "--simulate" have no effect in
"apt-get update". 

Maybe it should and behave like "--print-uris" when applied to apt-get
update. 

Cheers,
 Michael
 
> -- Package-specific info:
> 
> -- apt-config dump --
> 
> APT "";
> APT::Architecture "amd64";
> APT::Build-Essential "";
> APT::Build-Essential:: "build-essential";
> APT::Install-Recommends "false";
> APT::Install-Suggests "false";
> APT::Authentication "";
> APT::Authentication::TrustCDROM "true";
> APT::NeverAutoRemove "";
> APT::NeverAutoRemove:: "^firmware-linux.*";
> APT::NeverAutoRemove:: "^linux-firmware$";
> APT::NeverAutoRemove:: "^kfreebsd-image.*";
> APT::NeverAutoRemove:: "^gnumach$";
> APT::NeverAutoRemove:: "^gnumach-image.*";
> APT::NeverAutoRemove:: "^linux-image-3.11-2-amd64$";
> APT::NeverAutoRemove:: "^linux-image-extra-3.11-2-amd64$";
> APT::NeverAutoRemove:: "^linux-signed-image-3.11-2-amd64$";
> APT::NeverAutoRemove:: "^linux-backports-modules-.*-3.11-2-amd64$";
> APT::NeverAutoRemove:: "^linux-headers-3.11-2-amd64$";
> APT::NeverAutoRemove:: "^linux-image-3.12-trunk-amd64$";
> APT::NeverAutoRemove:: "^linux-image-extra-3.12-trunk-amd64$";
> APT::NeverAutoRemove:: "^linux-signed-image-3.12-trunk-amd64$";
> APT::NeverAutoRemove:: "^linux-backports-modules-.*-3.12-trunk-amd64$";
> APT::NeverAutoRemove:: "^linux-headers-3.12-trunk-amd64$";
> APT::Never-MarkAuto-Sections "";
> APT::Never-MarkAuto-Sections:: "metapackages";
> APT::Never-MarkAuto-Sections:: "restricted/metapackages";
> APT::Never-MarkAuto-Sections:: "universe/metapackages";
> APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
> APT::Never-MarkAuto-Sections:: "oldlibs";
> APT::Never-MarkAuto-Sections:: "restricted/oldlibs";
> APT::Never-MarkAuto-Sections:: "universe/oldlibs";
> APT::Never-MarkAuto-Sections:: "multiverse/oldlibs";
> APT::Update "";
> APT::Update::Post-Invoke-Success "";
> APT::Update::Post-Invoke-Success:: "test -x /usr/bin/apt-show-versions || 
> exit 0 ; apt-show-versions -i";
> APT:: "Periodic::Update-Package-Lists=1";
> APT::Get "";
> APT::Get::Download "true";
> APT::Architectures "";
> APT::Architectures:: "amd64";
> APT::Architectures:: "i386";
> APT::Compressor "";
> APT::Compressor::. "";
> APT::Compressor::.::Name ".";
> APT::Compressor::.::Extension "";
> APT::Compressor::.::Binary "";
> APT::Compressor::.::Cost "1";
> APT::Compressor::gzip "";
> APT::Compressor::gzip::Name "gzip";
> APT::Compressor::gzip::Extension ".gz";
> APT::Compressor::gzip::Binary "gzip";
> APT::Compressor::gzip::Cost "2";
> APT::Compressor::gzip::CompressArg "";
> APT::Compressor::gzip::CompressArg:: "-9n";
> APT::Compressor::gzip::UncompressArg "";
> APT::Compressor::gzip::UncompressArg:: "-d";
> APT::Compressor::bzip2 "";
> APT::Compressor::bzip2::Name "bzip2";
> APT::Compressor::bzip2::Extension ".bz2";
> APT::Compressor::bzip2::Binary "bzip2";
> APT::Compressor::bzip2::Cost "3";
> APT::Compressor::bzip2::CompressArg "";
> APT::Compressor::bzip2::CompressArg:: "-9";
> APT::Compressor::bzip2::UncompressArg "";
> APT::Compressor::bzip2::UncompressArg:: "-d";
> APT::Compressor::xz "";
> APT::Compressor::xz::Name "xz";
> APT::Compressor::xz::Extension ".xz";
> APT::Compressor::xz::Binary "xz";
> APT::Compressor::xz::Cost "4";
> APT::Compressor::xz::CompressArg "";
> APT::Compressor::xz::CompressArg:: "-6";
> APT::Compressor::xz::UncompressArg "";
> APT::Compressor::xz::UncompressArg:: "-d";
> APT::Compressor::lzma "";
> APT::Compressor::lzma::Name "lzma";
> APT::Compressor::lzma::Extension ".lzma";
> APT::Compressor::lzma::Binary "xz";
> APT::Compressor::lzma::Cost "5";
> APT::Compressor::lzma::CompressArg "";
> APT::Compressor::lzma::CompressArg:: "--format=lzma";
> APT::Compressor::lzma::CompressArg:: "-9";
> APT::Compressor::lzma::UncompressArg "";
> APT::Compressor::lzma::UncompressArg:: "--format=lzma";
> APT::Compressor::lzma::UncompressArg:: "-d";
> APT::CompressorName "";
> APT::CompressorExtension ".";
> APT::CompressorBinary "";
> APT::CompressorCost "100";
> APT::CompressorCompressArg "";
> APT::CompressorCompressArg:: "-9";
> APT::CompressorUncompressArg "";
> AP

Bug#730490: apt: invoking dpkg no longer respects APT::Keep-Fds

2013-11-28 Thread Michael Vogt
On Mon, Nov 25, 2013 at 04:51:12PM +, Colin Watson wrote:
> Package: apt
> Version: 0.9.13
> Severity: grave
> Justification: breaks d-i
> Tags: patch
> User: ubuntu-de...@lists.ubuntu.com
> Usertags: origin-ubuntu ubuntu-patch trusty

Thanks for your bugreport and your patch.
 
> This bug originated as:
> 
>   https://bugs.launchpad.net/bugs/1254696
> 
> The ExecFork refactoring in 0.9.13~exp1 broke d-i, because APT::Keep-Fds
> is no longer respected when invoking dpkg.  Here's a patch, although
> perhaps you want this laid out in some way that duplicates less code;
> however I couldn't readily see how to do that without just undoing the
> refactoring.

Sorry for this regression. I had hoped to get rid of the APT::Keep-Fds
and replace it with a proper APT::Progress::PackageManager object. But
obviously its not ready yet. I merged your patch but moved the Keep-Fd
reading into its own function.

> I spent a couple of hours trying to write an integration test that
> exercises the whole debconf-apt-progress path.  I failed because that
> requires actually executing the postinst in a test package, which
> requires chrooting because we use dpkg --root, and I couldn't get
> fakechroot to do the right thing.  Suggestions gratefully appreciated if
> you think this is important.
> 
>   * Fix two subprocess calls to continue to honour APT::Keep-Fds
> (LP: #1254696).

Having a test for this would be good - it will keep me from breaking
it again :) If you could post the current state of your test that
would be helpful.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728274: python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt

2013-11-22 Thread Michael Vogt
On Thu, Nov 14, 2013 at 11:31:39AM +0100, Thomas Bechtold wrote:
> On 11/14/2013 08:10 AM, Michael Vogt wrote:
> > On Wed, Nov 13, 2013 at 04:51:58PM +0100, Michael Vogt wrote:
> >> On Wed, Oct 30, 2013 at 08:20:38AM +0100, Thomas Bechtold wrote:
> > [..]
> >> The attached patch should fix this. Thanks David for the reminder
> >> about this. Note that init_config() without the clean() is not helpful
> >> as most of the init config code these days consists of conditional
> >> sets (i.e. will not override existing ones).
> > 
> > If this works as expected for you I will merge it into python-apt.
> > 
> >> Later Versions of apt have a global Clear(), we should probably use
> >> that once bindings are added.
> > 
> > Attached is a patch that adds support for the Clear() without a
> > subtree. The downside is that it needs apt >= 0.9.11 to build. If that
> > is a concern for backports I could springle in some #ifdefs.
> 
> The patch works for me. Thanks!

Great thanks, I merged it into the git repository and it will be part
of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#723096: synaptic scrolling problem

2013-11-13 Thread Michael Vogt
On Mon, Sep 16, 2013 at 02:13:16PM +0200, osh4ie wrote:
> Package: synaptic
> Version: 0.80.4
> Severity: normal

Thanks for your bugreport.
 
> Dear Maintainer,
> 
> Hello, I have found a bug in the latest version of synaptic package manager. 
> I can't scroll using my mouse wheel or my touchpad on laptop through the 
> package lists. I can scroll holding and dragging the scrollbar on the side 
> and using the arrow keys, but not with mouse or touchpad. At the time of 
> discovering it, there was no new update to the synpatic package manager, the 
> latest version is 0.80.4, and the previous version also had that particular 
> problem. I tried to downgrade it to 0.75.13 from wheezy and it worked, I can 
> scroll now normally with 'all scrolling options'.

That sounds like a regression with gtk3. Synaptic switched from 0.75.x
to 0.80.x to use gtk3 as the toolkit (previously gtk2). This seems to
have caused this regression.

Cheers,
 Michael


> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages synaptic depends on:
> ii  hicolor-icon-theme  0.12-1
> ii  libapt-inst1.5  0.9.11.3
> ii  libapt-pkg4.12  0.9.11.3
> ii  libatk1.0-0 2.8.0-2
> ii  libc6   2.17-92+b1
> ii  libcairo2   1.12.16-1
> ii  libept1.4.121.0.9
> ii  libfontconfig1  2.10.2-2
> ii  libfreetype62.4.9-1.1
> ii  libgcc1 1:4.8.1-10
> ii  libgdk-pixbuf2.0-0  2.28.2-1
> ii  libglib2.0-02.36.4-1
> ii  libgtk2.0-0 2.24.20-1
> ii  libpango1.0-0   1.32.5-5+b1
> ii  libstdc++6  4.8.1-10
> ii  libvte9 1:0.28.2-5
> ii  libx11-62:1.6.1-1
> ii  libxapian22 1.2.15-2
> ii  zlib1g  1:1.2.8.dfsg-1
> 
> Versions of packages synaptic recommends:
> ii  libgtk2-perl 2:1.247-2+b1
> ii  policykit-1  0.105-3
> ii  rarian-compat0.8.1-5
> pn  software-properties-gtk  
> 
> Versions of packages synaptic suggests:
> pn  apt-xapian-index  
> ii  deborphan 1.7.28.8
> pn  dwww  
> pn  menu  


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728572: python-apt: string to float conversion exception

2013-11-13 Thread Michael Vogt
On Fri, Nov 08, 2013 at 08:47:32AM +0200, Pauli Nieminen wrote:
> Maybe these patches will help fixing the issue. At least to me it looks
> like the cause of the problem.

Thanks a bunch for digging into this and for the patches (and sorry
that it took me so long to reply). 

I'm still a bit confused though, AFAICS, 0.9.12.1 does send the sort
pkgname so the first patch should not be needed with the apt in
current unstable. Or am I missing something? I.e. do you still
observe that 0.9.12.1 sends the architecture string?

As for the second patch, the new
PackageManagerProgressFd::StatusChanged() has a line.
  status << "pmstatus:" << StringSplit(PackageName, ":")[0]
that should also strip the architectire before it goes out over the
status-fd to python-apt. The InstallProgress needs the full
architecture string for progress classes like the new deb822 progress
that will send out the archtitecture as a sperate field.

Cheers,
 Michael

> From 03482179d0a91cf3f23fa777874a5e45344a4486 Mon Sep 17 00:00:00 2001
> From: Pauli Nieminen 
> Date: Fri, 8 Nov 2013 08:11:26 +0200
> Subject: [PATCH] Avoid sending package name with arch to status FD
> 
> Sending arch with package name to status fd makes other side parse the
> string incorrectly because expectation is to do simple string split with
> colon. But of course there would be an extra colon in the string.
> 
> Signed-off-by: Pauli Nieminen 
> ---
>  apt-pkg/deb/dpkgpm.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
> index fe38bf6..f2dc296 100644
> --- a/apt-pkg/deb/dpkgpm.cc
> +++ b/apt-pkg/deb/dpkgpm.cc
> @@ -583,7 +583,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, 
> char *line)
> if(strncmp(list[0].c_str(), "processing", strlen("processing")) == 0)
> {
>char s[200];
> -  const char* const pkg_or_trigger = list[2].c_str();
> +  const char* const pkg_or_trigger = StringSplit(list[2], 
> ":")[0].c_str();
>action =  list[1].c_str();
>const std::pair * const iter =
>   std::find_if(PackageProcessingOpsBegin,
> -- 
> 1.8.4.2
> 

> From b1b7ece6ca12c1eea14e9a6dc69ec138f6298c9e Mon Sep 17 00:00:00 2001
> From: Pauli Nieminen 
> Date: Fri, 8 Nov 2013 08:11:26 +0200
> Subject: [PATCH] Avoid sending package name with arch to status FD
> 
> Sending arch with package name to status fd makes other side parse the
> string incorrectly because expectation is to do simple string split with
> colon. But of course there would be an extra colon in the string.
> 
> Signed-off-by: Pauli Nieminen 
> ---
>  apt-pkg/deb/dpkgpm.cc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
> index 26d79db..92b85b6 100644
> --- a/apt-pkg/deb/dpkgpm.cc
> +++ b/apt-pkg/deb/dpkgpm.cc
> @@ -664,7 +664,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
>}
>std::string msg;
>strprintf(msg, _(iter->second), i18n_pkgname.c_str());
> -  d->progress->StatusChanged(pkgname, PackagesDone, PackagesTotal, msg);
> +  d->progress->StatusChanged(short_pkgname, PackagesDone, PackagesTotal, 
> msg);
>  
>// FIXME: this needs a muliarch testcase
>// FIXME2: is "pkgname" here reliable with dpkg only sending us 
> @@ -693,7 +693,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
>   PackagesDone++;
>  
>   strprintf(msg, translation, i18n_pkgname.c_str());
> - d->progress->StatusChanged(pkgname, PackagesDone, PackagesTotal, 
> msg);
> + d->progress->StatusChanged(short_pkgname, PackagesDone, 
> PackagesTotal, msg);
>   
>}
>if (Debug == true) 
> -- 
> 1.8.4.2
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728274: python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt

2013-11-13 Thread Michael Vogt
On Wed, Nov 13, 2013 at 04:51:58PM +0100, Michael Vogt wrote:
> On Wed, Oct 30, 2013 at 08:20:38AM +0100, Thomas Bechtold wrote:
[..]
> The attached patch should fix this. Thanks David for the reminder
> about this. Note that init_config() without the clean() is not helpful
> as most of the init config code these days consists of conditional
> sets (i.e. will not override existing ones).

If this works as expected for you I will merge it into python-apt.

> Later Versions of apt have a global Clear(), we should probably use
> that once bindings are added.

Attached is a patch that adds support for the Clear() without a
subtree. The downside is that it needs apt >= 0.9.11 to build. If that
is a concern for backports I could springle in some #ifdefs.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728274: python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt

2013-11-13 Thread Michael Vogt
On Wed, Oct 30, 2013 at 08:20:38AM +0100, Thomas Bechtold wrote:
> Package: python-apt
> Version: 0.9.1
> Severity: normal

Thanks for your bugreport and your test code.
 
> I tried to use python-apt to get all available package versions. I used
> the 'rootdir' parameter for apt.Cache to have a seperate root dir and
> seperated config files.
> In my /etc/apt/apt.conf , I have the following line:
> 
> APT::Default-Release "sid";
[..]

The attached patch should fix this. Thanks David for the reminder
about this. Note that init_config() without the clean() is not helpful
as most of the init config code these days consists of conditional
sets (i.e. will not override existing ones).

Later Versions of apt have a global Clear(), we should probably use
that once bindings are added.

Cheers,
 Michael
diff --git a/apt/cache.py b/apt/cache.py
index 9842cb2..a9b6016 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -83,13 +83,15 @@ class Cache(object):
 # force apt to build its caches in memory
 apt_pkg.config.set("Dir::Cache::pkgcache", "")
 if rootdir:
+apt_pkg.config.clear("APT")
+apt_pkg.config.set("Dir", rootdir)
+apt_pkg.init_config()
 if os.path.exists(rootdir+"/etc/apt/apt.conf"):
 apt_pkg.read_config_file(apt_pkg.config,
rootdir + "/etc/apt/apt.conf")
 if os.path.isdir(rootdir+"/etc/apt/apt.conf.d"):
 apt_pkg.read_config_dir(apt_pkg.config,
   rootdir + "/etc/apt/apt.conf.d")
-apt_pkg.config.set("Dir", rootdir)
 apt_pkg.config.set("Dir::State::status",
rootdir + "/var/lib/dpkg/status")
 # also set dpkg to the rootdir path so that its called for the


Bug#728714: synaptic: segmentation fault when click on a site link

2013-11-05 Thread Michael Vogt
On Mon, Nov 04, 2013 at 05:18:21PM +0100, nardi dario wrote:
> Package: synaptic
> Version: 0.80.4
> Severity: normal
> 
> Dear Maintainer,
> 
> synaptic return a seg fault when a click on a web site for a package.

Thanks for your bugreport. This sounds a lot like Bug#725885  that has
a fix in the bzr repository but is not uploaded yet. I plan the upload
really soon.

Cheers,
 Michael
 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages synaptic depends on:
> ii  hicolor-icon-theme   0.12-1
> ii  libapt-inst1.5   0.9.12.1
> ii  libapt-pkg4.12   0.9.12.1
> ii  libatk1.0-0  2.10.0-2
> ii  libc62.17-93
> ii  libcairo-gobject21.12.16-2
> ii  libcairo21.12.16-2
> ii  libept1.4.12 1.0.12
> ii  libgcc1  1:4.8.2-1
> ii  libgdk-pixbuf2.0-0   2.28.2-1
> ii  libglib2.0-0 2.36.4-1
> ii  libgtk-3-0   3.8.4-1
> ii  libpango-1.0-0   1.32.5-5+b1
> ii  libpangocairo-1.0-0  1.32.5-5+b1
> ii  libstdc++6   4.8.2-1
> ii  libvte-2.90-91:0.34.8-1
> ii  libx11-6 2:1.6.2-1
> ii  libxapian22  1.2.15-2
> ii  libxext6 2:1.3.2-1
> ii  zlib1g   1:1.2.8.dfsg-1
> 
> Versions of packages synaptic recommends:
> ii  gksu   2.0.2-6
> ii  libgtk2-perl   2:1.248-1
> ii  policykit-10.105-4
> ii  rarian-compat  0.8.1-5
> 
> Versions of packages synaptic suggests:
> ii  apt-xapian-index 0.46
> pn  deborphan
> pn  dwww 
> ii  menu 2.1.46
> ii  software-properties-gtk  0.92.25debian1
> ii  tasksel  3.18
> 
> -- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728791: squid-deb-proxy: After restart, proxy is unavailable until restart of avahi-daemon

2013-11-05 Thread Michael Vogt
On Tue, Nov 05, 2013 at 03:44:57PM +0100, Varac wrote:
> Package: squid-deb-proxy
> Version: 0.7.2
> Severity: important
 
Thanks for your bugreport. 
 
> After restarting, the service is announced by avahi only on ipv6, not on
> ipv4 anymore.
> However, apt-get update still fails.

How does your
  /etc/avahi/services/squid-deb-proxy.service
file look like? It does contain the  line I
assume? 

And if I read your log right, the _apt_proxy._tcp service appears
again after you did a manual restart of the avahi service, is that
correct? 

Cheers,
 Michael
 
> root@greyhound:~# avahi-browse -a|grep proxy
> + vboxnet0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> + vboxnet0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> + virbr0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> +br0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> +br0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> 
> root@greyhound:/etc/apt#
> /usr/share/squid-deb-proxy-client/apt-avahi-discover
> http://10.5.5.1:8000/
> 
> 
> 
> root@greyhound:~# /etc/init.d/squid-deb-proxy restart
> Restarting Squid Deb HTTP Proxy: squid-deb-proxy
> Waiting.done.
> 2013/07/26 20:20:28| strtokFile:
> /etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl not found
> 2013/07/26 20:20:28| Warning: empty ACL: acl blockedpkgs urlpath_regex
> "/etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl"
> .
> 
> root@greyhound:~# apt-get update
> 0% [Working]Failed to resolve service 'Squid deb proxy on greyhound' of
> type '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Hit http://security.debian.org wheezy/updates Release.gpg
> Hit http://security.debian.org jessie/updates Release.gpg
> Hit http://security.debian.org wheezy/updates Release
> ...
> 
> root@greyhound:~# /usr/share/squid-deb-proxy-client/apt-avahi-discover
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> Failed to resolve service 'Squid deb proxy on greyhound' of type
> '_apt_proxy._tcp' in domain 'local': Timeout reached
> 
> 
> root@greyhound:~# avahi-browse -a|grep proxy
> + vboxnet0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> +br0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> 
> root@greyhound:~# /etc/init.d/avahi-daemon restart
> Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
> 
> root@greyhound:~# avahi-browse -a|grep proxy
> + vboxnet0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> + vboxnet0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> + virbr0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> +br0 IPv6 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> +br0 IPv4 Squid deb proxy on greyhound
> _apt_proxy._tcp  local
> 
> -- System Information:
> Debian Release: 7.2
>   APT prefers stable
>   APT policy: (990, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/2 CPU cores)
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728572: python-apt: string to float conversion exception

2013-11-05 Thread Michael Vogt
On Sun, Nov 03, 2013 at 01:02:25PM +0200, Pauli Nieminen wrote:
> I upgraded to 0.9.12.1 on 16th October (from logs). That means I'm
> reproducing this issue with 0.9.12.1.

Thanks for your bugreport.

This was indeed supposed to be fixed with apt 0.9.12.1, do you have a
example package or any other hints how to reproduce this bug? I.e. is
there anything I can downgrade and let unattended-upgrades run to
trigger the issue?

Thanks,
 Michael
 
> On Sun, Nov 3, 2013 at 12:20 PM, Julian Andres Klode  wrote:
> 
> > On Sun, Nov 03, 2013 at 10:09:06AM +0200, Pauli wrote:
> > > Package: python-apt
> > > Version: 2:0.9.1
> > > Severity: normal
> > >
> > > Dear Maintainer,
> > >
> > > I noticed that unattended-upgrade seem to fail randomly with string to
> > > float conversion exception. I made some modifications to
> > > unattended-upgrade to print the exception stack trace which points
> > > python-apt status update parsing code.
> > >
> > > Exception happened during upgrade.
> > > Traceback (most recent call last):
> > >   File "/usr/bin/unattended-upgrade", line 382, in
> > upgrade_in_minimal_steps
> > > res  cache.commit(install_progressiprogress)
> > >   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 498, in
> > commit
> > > res  self.install_archives(pm, install_progress)
> > >   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 462, in
> > install_archives
> > > res  install_progress.run(pm)
> > >   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line
> > 206, in run
> > > res  self.wait_child()
> > >   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line
> > 276, in wait_child
> > > self.update_interface()
> > >   File "/usr/bin/unattended-upgrade", line 172, in update_interface
> > > apt.progress.base.InstallProgress.update_interface(self)
> > >   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line
> > 253, in update_interface
> > > if float(percent) ! self.percent or status_str ! self.status:
> > > ValueError: could not convert string to float: amd64
> >
> > You ran that upgrade with APT 0.9.12, right? This was fixed in 0.9.12.1, so
> > you cannot reproduce it anymore...
> >
> > --
> > Julian Andres Klode  - Debian Developer, Ubuntu Member
> >
> > See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
> >
> > Please do not top-post if possible.
> >


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#725885:

2013-11-05 Thread Michael Vogt
On Mon, Nov 04, 2013 at 03:49:43AM +, Luke Drummond wrote:
> Hello Michael
Hi Luke,

thanks for your bugreport and your patch!
 
> I've tracked down the source of the problem, and think I've created an
> appropriate patch.  The function RunAsSudoUserCommand() was
> dereferencing a NULL pointer when failing to check for the return
> value of getenv("SUDO_UID");
>
> I was launching Synaptic with gksu which does not set this environment
> variable, so getenv returned NULL.  I do not use sudo on my system
> (though did add myself as a sudoer to confirm this behaviour and test
> my changes).
> Launching as a real root user caused the same crash.
> 
> We should not launch the browsers/help viewers as root, so I've
> provided a fallback behaviour.

Indeed, thanks for finding and fixing this! Will $USER provide the
name of the real user or will it contain "root" when gksu uses it?
 
> The function RunAsSudoUserCommand() is currently called by the
> following three methods (none of which should run their command with
> effective root, as they are launching end-user-configurable software /
> web browsers)
> 
> RGMainWindow::cbHelpAction
> RGPkgDetailsWindow::cbOpenLink
> RGPkgDetailsWindow::cbOpenHomepage
> 
> The patch I've provided solves the crash problem and the security
> problem (it specifically checks whether the user is effective root,
> and returns false if it is)
> 
> Comments are welcome.  It's not devastatingly beautiful, but seems to
> serve its purpose.
[..]

It looks fine and I commited it locally. My only question would be if
getenv("USER"); may give us the "real" user. If not I will try to
think if there is any other way to find this out.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726123: Side Effect of 726156 Fixes

2013-11-05 Thread Michael Vogt
On Sat, Nov 02, 2013 at 12:53:47PM -0500, Martin Gallant wrote:
> This problem appears to have been exposed by the update to apt
> 0.9.12.1 (0.9.12.1)
> 
> I have made three changes to the unattended-upgrade script to dig into this:
> See enclosed patch.
> 
> 1. Initialized return code to eliminate referenced before assignment
> in the exception path
> 2. Added tracback code to see root cause of error in handler
> 
> I now get the following traceback information, which points me to 726156:

This looks a lot like Bug#728572 - do you have any hints how to
reproduce this? Will it be triggered with any package or just with
specific ones? Its a issue that was supposed to be fixed with apt
0.9.12.1. It would be great if you could manually trigger it via:
 $ sudo apt-get install pkgname -o Debug::pkgDPkgProgressReporting=1
this should give me a good hint what is going on.

Cheers,
 Michael
 
> Exception: could not convert string to float: amd64Traceback (most
> recent call last):
>   File "/usr/bin/unattended-upgrade", line 701, in do_install
> logfile_dpkg, options.verbose or options.debug)
>   File "/usr/bin/unattended-upgrade", line 319, in upgrade_normal
> res = cache.commit(install_progress=iprogress)
>   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 504, in commit
> res = self.install_archives(pm, install_progress)
>   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 467, in
> install_archives
> res = install_progress.run(pm)
>   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line 206, in 
> run
> res = self.wait_child()
>   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line
> 276, in wait_child
> self.update_interface()
>   File "/usr/bin/unattended-upgrade", line 173, in update_interface
> apt.progress.base.InstallProgress.update_interface(self)
>   File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line
> 253, in update_interface
> if float(percent) != self.percent or status_str != self.status:
> ValueError: could not convert string to float: amd64
> 
> -- 
> Marty

> 38d37
> < import traceback
> 682d680
> < pkg_install_success = False
> 705d702
> < traceback.print_exc()


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726597: Please document Acquire::http::ProxyAutoDetect

2013-10-25 Thread Michael Vogt
On Fri, Oct 25, 2013 at 12:17:16AM +0200, Francesco Poli wrote:
> On Thu, 24 Oct 2013 08:30:31 +0200 Michael Vogt wrote:
> > Do you think the following
> > clarifies it?
> > 
> > + http://proxy:port/. This will override the
> > + generic Acquire::http::Proxy but not any
> > specific
> > + host porxy configuration set via 
> > + Acquire::http::Proxy::$HOST.
> 
> Yes, I think it explains the precedences.
> Thank you!
> 
> 
> BTW, I am not an English native speaker, hence I am not 100 % sure on
> all the following (please ask for a review on debian-l10n-english, if
> needed), but I think that you should:
> 
>   s/a external/an external/
>   s/a example/an example/
>   s/This option take precedence/This option takes precedence/
>   s/porxy/proxy/

Thanks again! I corrected these typos and commited the code to my
local git tree now. 

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726597: Please document Acquire::http::ProxyAutoDetect

2013-10-24 Thread Michael Vogt
On Wed, Oct 23, 2013 at 07:20:23PM +0200, Francesco Poli wrote:
> On Wed, 23 Oct 2013 16:49:22 +0200 Michael Vogt wrote:
[..]
> This documents what happens when both Acquire::HTTP::ProxyAutoDetect
> and Acquire::http::Proxy-Auto-Detect are set, which is also an
> interesting thing to know.
> 
> But what I was asking was: what happens when both *Acquire::HTTP::Proxy*
> and Acquire::http::Proxy-Auto-Detect are set?

Aha, I misread the original question then. Do you think the following
clarifies it?

+ http://proxy:port/. This will override the
+ generic Acquire::http::Proxy but not any
specific
+ host porxy configuration set via 
+ Acquire::http::Proxy::$HOST.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726597: Please document Acquire::http::ProxyAutoDetect

2013-10-23 Thread Michael Vogt
On Mon, Oct 21, 2013 at 07:01:55PM +0200, Francesco Poli wrote:
> On Sat, 19 Oct 2013 18:32:26 +0200 Michael Vogt wrote:
> 
> > On Wed, Oct 16, 2013 at 10:39:06PM -0300, Lisandro Damián Nicanor Pérez 
> > Meyer wrote:
> [...]
> > > Saddly it is not documented in apt.conf(5). Being documented would help in
> > > implementations like the one described in #726430.
> > 
> > Indeed, how do you like the attach (mostly) documentation patch? If
> > that covers your needs I will merge it into the debian/sid branch.
> 
> Hello Michael, thanks for preparing a patch so quickly!
> 
> Please let me comment on one aspect: what happens when APT finds
> *both* Acquire::HTTP::Proxy *and* Acquire::http::Proxy-Auto-Detect set?
> Which one takes precedence?
> 
> I think this should be documented...

Good point, thanks. How about this:

diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml
index e8da666..87ad30c 100644
--- a/doc/apt.conf.5.xml
+++ b/doc/apt.conf.5.xml
@@ -402,7 +402,10 @@ DPkg::Pre-Install-Pkgs
{"/usr/sbin/dpkg-preconfigure --apt"
  the command to output the proxy on stdout in the style
  http://proxy:port/. See the 
  &squid-deb-proxy-client; package for a example implementation
  that
- uses avahi.
+ uses avahi. 
+ This option take precedence over the legacy option name 
+ ProxyAutoDetect.
+ 
 
  
  


Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#727082: apt: dist-upgrade says "no longer required" and "will be installed" for the same packages

2013-10-23 Thread Michael Vogt
On Tue, Oct 22, 2013 at 03:08:16PM +0200, David Kalnischkies wrote:
> On Tue, Oct 22, 2013 at 8:08 AM, Ph. Marek  wrote:
> > $ LANG=C apt-get dist-upgrade
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > Calculating upgrade... The following packages were automatically installed 
> > and
> > are no longer required:
> >   gir1.2-gstreamer-1.0 python3-enchant python3-gtkspellcheck
> > Use 'apt-get autoremove' to remove them.
> > Done
> 
> This shows a "display bug" – there shouldn't be code printing stuff between
> "Calculating upgrade…" and "Done", but it looks like the recent reshuffling of
> code made it happen.
[..]

Indeed, this is broken in the current apt in unstable, but the
out-of-order printing should be fixed in the debian/sid git branch. 

Cheers,
 Michael
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726707: synaptic: please support parallel builds

2013-10-19 Thread Michael Vogt
On Fri, Oct 18, 2013 at 10:13:32AM +0100, Jonathan Dowland wrote:
> Source: synaptic
> Version: 0.75.13
> Severity: wishlist
> Tags: patch
> 
> Please support parallel builds - as simple as passing --parallel to dh(1)
> invocations.

Thanks a bunch! Merged into trunk and it will be part of the next
upload :)

Cheers,
 Michael
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726597: Please document Acquire::http::ProxyAutoDetect

2013-10-19 Thread Michael Vogt
On Wed, Oct 16, 2013 at 10:39:06PM -0300, Lisandro Damián Nicanor Pérez Meyer 
wrote:
[..]
> Saddly it is not documented in apt.conf(5). Being documented would help in
> implementations like the one described in #726430.

Looking at #726430 - would it help you if we would simply add the
discovered proxy as http_proxy to the environment used to fork the
DPkg::Pre-Invoke scripts?

Cheers,
 Michael
 
> Thanks, Lisandro.
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (990, 'unstable'), (500, 'testing'), (101, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.10.11+edid (SMP w/2 CPU cores)
> Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.15-1
> ii  libapt-pkg4.12  0.9.12.1
> ii  libc6   2.17-93
> ii  libgcc1 1:4.8.1-10
> ii  libstdc++6  4.8.1-10
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc 
> ii  aptitude0.6.8.2-1.2
> ii  dpkg-dev1.17.1
> ii  python-apt  0.8.9.1+b1
> ii  xz-utils5.1.1alpha+20120614-2
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to deity-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/20131017013906.18704.95742.report...@luna.lisandropm.com.ar
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726597: Please document Acquire::http::ProxyAutoDetect

2013-10-19 Thread Michael Vogt
On Wed, Oct 16, 2013 at 10:39:06PM -0300, Lisandro Damián Nicanor Pérez Meyer 
wrote:
> Package: apt
> Version: 0.8.0
> Severity: wishlist

Thanks for your bugreport.
 
> Acquire::http::ProxyAutoDetect has become very handy for autodetecting
> networks with apt-cachers like ACNG (see for example squid-deb-proxy).
> 
> In other words, allows painless proxy discovery for those of us proxy 
> impaired.
> 
> Saddly it is not documented in apt.conf(5). Being documented would help in
> implementations like the one described in #726430.

Indeed, how do you like the attach (mostly) documentation patch? If
that covers your needs I will merge it into the debian/sid branch.

Cheers,
 Michael

> Thanks, Lisandro.
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (990, 'unstable'), (500, 'testing'), (101, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.10.11+edid (SMP w/2 CPU cores)
> Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.15-1
> ii  libapt-pkg4.12  0.9.12.1
> ii  libc6   2.17-93
> ii  libgcc1 1:4.8.1-10
> ii  libstdc++6  4.8.1-10
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc 
> ii  aptitude0.6.8.2-1.2
> ii  dpkg-dev1.17.1
> ii  python-apt  0.8.9.1+b1
> ii  xz-utils5.1.1alpha+20120614-2
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to deity-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/20131017013906.18704.95742.report...@luna.lisandropm.com.ar
> 
>From fb099a0b8dc1844a2141f7340db93b6adf9e0b14 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Sat, 19 Oct 2013 18:29:59 +0200
Subject: [PATCH] add Acquire::http::Proxy-Auto-Detect to the apt.conf.5
 manpage (closes: 726597)

---
 doc/apt-verbatim.ent | 6 ++
 doc/apt.conf.5.xml   | 8 
 methods/http.cc  | 6 +-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent
index c9bb061..0d0d95c 100644
--- a/doc/apt-verbatim.ent
+++ b/doc/apt-verbatim.ent
@@ -124,6 +124,12 @@
   "
 >
 
+
+squid-deb-proxy-client
+1
+  "
+>
+
 
 debsign
 1
diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml
index 42119ba..e8da666 100644
--- a/doc/apt.conf.5.xml
+++ b/doc/apt.conf.5.xml
@@ -396,6 +396,14 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
  Acquire::http::User-Agent can be used to set a different
  User-Agent for the http download method as some proxies allow access for clients
  only if the client uses a known identifier.
+
+ Acquire::http::Proxy-Auto-Detect can be used to
+ specify a external command to discover the http proxy to use. Apt expects
+ the command to output the proxy on stdout in the style
+ http://proxy:port/. See the 
+ &squid-deb-proxy-client; package for a example implementation that
+ uses avahi.
+
  
  
 
diff --git a/methods/http.cc b/methods/http.cc
index 278ddb2..5622c33 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1108,7 +1108,6 @@ bool HttpMethod::Configuration(string Message)
PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth",
   PipelineDepth);
Debug = _config->FindB("Debug::Acquire::http",false);
-   AutoDetectProxyCmd = _config->Find("Acquire::http::ProxyAutoDetect");
 
// Get the proxy to use
AutoDetectProxy();
@@ -1373,6 +1372,11 @@ int HttpMethod::Loop()
 /* */
 bool HttpMethod::AutoDetectProxy()
 {
+   // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
+   // name without the dash ("-")
+   AutoDetectProxyCmd = _config->Find("Acquire::http::Proxy-Auto-Detect",
+  _config->Find("Acquire::http::ProxyAutoDetect"));
+
if (AutoDetectProxyCmd.empty())
   return true;
 
-- 
1.8.3.2



Bug#726658: Hook into apt DPkg::{Pre,Post}-Invoke ?

2013-10-17 Thread Michael Vogt
Package: monit

I was wondering if it would make sense to hook monit into 
DPkg::{Pre,Post}-Invoke so that it stops monitoring on apt
upgrades. 

My idea is that we are currently monitoring some services like
"unbound" or "freeradius" from the deb packages and restart them via
monit when they crash. This is of course not ideal during a upgrade,
when e.g. unbound is stopped and restarted during the package
upgrade. In this case, monit shouldn't try to restar the service.

If that makes sense I can provide a patch for the monit package. If
there is a different/better way, please tell me about it :)

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#717777: pushed 1.3.3 to my personal git repo

2013-10-17 Thread Michael Vogt
Hi,

just a quick update, I pushed my changes to
http://anonscm.debian.org/gitweb/?p=users/mvo/ansible.git;a=summary
for review, would be great to get feedback.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#717777: New 1.3.3 in git (not pushed yet)

2013-10-16 Thread Michael Vogt
Hi,

I am also keen to get a new version into debian and would like to
offer my help. I have updated my local git tree to have 1.3.3
ready. No need for +dfsg anmyore as the html (and therefore JS) is
removed in the recent versions. The ansible-doc is no longer available
too though.

I can push to collab-maint or to a different location for review and
would love to get feedback and get it into unstable. Happy to do the
upload if you are busy.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#726156: latest APT breaks InstallProgress

2013-10-13 Thread Michael Vogt
On Sun, Oct 13, 2013 at 09:34:29PM +0200, Julian Andres Klode wrote:
> On Sat, Oct 12, 2013 at 11:21:32PM +0200, Eugenio 'g7' Paolantonio wrote:
[..]
> > It seems that the latest APT update breaks the base python-apt
> > InstallProgress, as some package names in the status stream also feature
> > the package architecture (packagename:arch).
[..]
> 
> There are more cases that need to be handled. I'll take a look at
> it tomorrow.

This is a unintended side-effect of the fix in libapt for parsing the
dpkg progress multiarch status information. 

The mixing of the ":" as the architecture qualifier and the delimiter
is one part of the problem, the other that apt is re-using the dpkg
status stream format instead of better abstracting this away from the
apt frontends. So we need quoting or we make apt always send the
architecture information. Either way it will break existing frontends
that parse this data.

The better option IMO is to have a proper pkgInstallProgress class that
python-apt/synaptic/aptitude can use (just like pkgAcquireStatus). I
started to explore this in my feature/install-progress-refactor
branch. 

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#725483: apt: libapt-inst fails with >2G debs

2013-10-08 Thread Michael Vogt
On Sun, Oct 06, 2013 at 12:02:34PM +0100, Mark Hymers wrote:
> Package: apt
> Version: 0.9.11.4
> Severity: important
> Tags: lfs patch

Thanks for your bugreport and your patch.
 
> Whilst doing some dak testing with large (fake) debs for
> data.debian.org, I came across an issue with the following test code:
[..]
> Attached are two patches - one for the version of apt in sid, one for
> wheezy which fix the problem - I've checked that we can then extract the
> control and data members properly with these fixes and it seems to work
> fine.
> 
> I'm not an expert C++ programmer so I'd appreciate someone reviewing
> these patches to see if they're sane.

The patch looks good, I merged it into the git tree and it will be
part of the next upload.

> Assuming the patches are
> acceptable, from the ftpmaster point of view, we probably need to talk
> to the stable team about getting this patched in stable too because dak
> uses the python-apt bindings (which in turn use libapt-inst and
> libapt-pkg) and as franck.d.o runs stable, we'll need this fixing to get
> data.d.o up and running.

I'm happy to add the patch to the debian/wheezy branch and upload a
new version, just let me know if the stable team is fine with that.

Thanks!
 Michael

> Thanks,
> 
> Mark
> 
> -- Package-specific info:
> 
> -- (no /etc/apt/preferences present) --
> 
> 
> -- (/etc/apt/sources.list present, but not submitted) --
> 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.14-1
> ii  libapt-pkg4.12  0.9.11.4
> ii  libc6   2.17-93
> ii  libgcc1 1:4.8.1-10
> ii  libstdc++6  4.8.1-10
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc 
> ii  aptitude0.6.8.2-1.2
> ii  dpkg-dev1.17.1
> ii  python-apt  0.8.9.1+b1
> ii  xz-utils5.1.1alpha+20120614-2
> 
> -- no debconf information

> diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
> index 2dee1a4..b77c77d 100644
> --- a/apt-inst/contrib/arfile.cc
> +++ b/apt-inst/contrib/arfile.cc
> @@ -64,7 +64,7 @@ ARArchive::~ARArchive()
> byte plain text header then the file data, another header, data, etc */
>  bool ARArchive::LoadHeaders()
>  {
> -   signed long Left = File.Size();
> +   off_t Left = File.Size();
> 
> // Check the magic byte
> char Magic[8];
> @@ -120,7 +120,7 @@ bool ARArchive::LoadHeaders()
>}
>  
>// Account for the AR header alignment 
> -  unsigned Skip = Memb->Size % 2;
> +  off_t Skip = Memb->Size % 2;
>
>// Add it to the list
>Memb->Next = List;
> @@ -128,7 +128,7 @@ bool ARArchive::LoadHeaders()
>Memb->Start = File.Tell();
>if (File.Skip(Memb->Size + Skip) == false)
>return false;
> -  if (Left < (signed)(Memb->Size + Skip))
> +  if (Left < (off_t)(Memb->Size + Skip))
>return _error->Error(_("Archive is too short"));
>Left -= Memb->Size + Skip;
> }   
> diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
> index 90e49cb..136a9d7 100644
> --- a/apt-pkg/contrib/fileutl.cc
> +++ b/apt-pkg/contrib/fileutl.cc
> @@ -650,9 +650,9 @@ string flNoLink(string File)
> while (1)
> {
>// Read the link
> -  int Res;
> +  ssize_t Res;
>if ((Res = readlink(NFile.c_str(),Buffer,sizeof(Buffer))) <= 0 || 
> -   (unsigned)Res >= sizeof(Buffer))
> +   (size_t)Res >= sizeof(Buffer))
> return File;
>
>// Append or replace the previous path
> @@ -1221,7 +1221,7 @@ FileFd::~FileFd()
> gracefully. */
>  bool FileFd::Read(void *To,unsigned long long Size,unsigned long long 
> *Actual)
>  {
> -   int Res;
> +   ssize_t Res;
> errno = 0;
> if (Actual != 0)
>*Actual = 0;
> @@ -1323,7 +1323,7 @@ char* FileFd::ReadLine(char *To, unsigned long long 
> const Size)
>  /* */
>  bool FileFd::Write(const void *From,unsigned long long Size)
>  {
> -   int Res;
> +   ssize_t Res;
> errno = 0;
> do
> {
> @@ -1379,7 +1379,7 @@ bool FileFd::Write(const void *From,unsigned long long 
> Size)
>  }
>  bool FileFd::Write(int Fd, const void *From, unsigned long long Size)
>  {
> -   int Res;
> +   ssize_t Res;
> errno = 0;
> do
> {
> @@ -1458,14 +1458,14 @@ bool FileFd::Seek(unsigned long long To)
>d->seekpos = To;
>return true;
> }
> -   int res;
> +   off_t res;
>  #ifdef HAVE_ZLIB
> if (d != NULL && d->gz)
>res = gzseek(d->gz,To,SEEK_SET);
> else
>  #endif
>res = lseek(iFd,To,SEEK_SET);
> -   if (res != (signed)To)
> +   if (res != (off_t)To)
> {
>Flags |

Bug#722932: squid-deb-proxy-client should depend on python-apt

2013-09-19 Thread Michael Vogt
On Sat, Sep 14, 2013 at 06:04:32PM +0200, Bart Visscher wrote:
> Package: squid-deb-proxy-client
> Version: 0.8.1

Thanks for your bugreport.
 
> When installing an other package, i was getting errors like:
> Traceback (most recent call last):
>   File "/usr/share/squid-deb-proxy-client/apt-avahi-discover", line 13, in 
> 
> import apt_pkg
> ImportError: No module named apt_pkg
> 
> After installing python-apt these went away.

I now changed the code in bzr to not use python-apt to get this config
value. It will use the apt-config command instead to avoid this
additional dependency. This fix will be part of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722549: apt-get source with more than one argument fails

2013-09-12 Thread Michael Vogt
On Thu, Sep 12, 2013 at 10:28:20AM +0200, Damien Wyart wrote:
> Package: apt
> Version: 0.9.11.3
> Severity: normal

Thanks for your bugreport.
 
> Starting with version 0.9.11, I can't use apt-get source with several
> package names :
> 
> $ apt-get source perl coreutils
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> NOTICE: 'perl' packaging is maintained in the 'Git' version control system at:
> git://anonscm.debian.org/perl/perl.git -b debian-5.18
> E: Unable to find a source package for coreutils
> 
> As a workaround, I can do
> $ for p in perl coreutils; do apt-get source $p; done
> 
> So this is not so annoying, but might be irritating.

This is a regression from the previous versions. It seems to be
releated to the recent changes in the pkgTagFile code, I haven't
looked further yet, but it seems like the attached patch fixes the
issue.

Cheers,
 Michael
=== modified file 'apt-pkg/deb/debsrcrecords.h'
--- apt-pkg/deb/debsrcrecords.h	2012-04-16 17:24:07 +
+++ apt-pkg/deb/debsrcrecords.h	2013-09-12 20:10:53 +
@@ -50,8 +50,8 @@
virtual bool Files(std::vector &F);
 
debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) 
-  : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400), 
-Buffer(NULL) {}
+  : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), 
+Tags(&Fd, Fd.Size()), Buffer(NULL) {}
virtual ~debSrcRecordParser();
 };
 



Bug#710030: Maybe reproduced

2013-09-12 Thread Michael Vogt
On Thu, Aug 15, 2013 at 07:55:38PM -0400, Filipus Klutiero wrote:
> There is definitely something wrong with my Synaptic, although it doesn't 
> look like the provided screenshot here. I'm attaching an example debconf 
> prompt I get when configuring Linux.
> 
> I'm pretty sure this started when upgrading from 0.75 to 0.80 (GTK 2 to GTK 
> 3). I *never* noticed that problem before. Now, I believe I always get it. 
> The vertical space is too small. Sometimes, the bottom is cut. Sometimes, 
> it's the top, as you can see here. The space missing is quite important. Last 
> time, I couldn't see the answer I was chosing. I can imagine this would be a 
> serious problem for someone who doesn't already know all debconf prompts...
> The problem is the window cannot be enlarged, so I'm upgrading to important 
> (at least, could be serious IMO). I'm surprised we don't have more reports. 
> Are some people using the Dialog frontend unaffected? Or does everyone use 
> the GTK frontend?
> 
> Submitter, could you provide a screenshot of the problem in English?

Thanks Filipus for your screenshot! This is very helpful. Note
that the other screenshot is showing a different issue, there are two
terminal windows in synaptic, one with a progressbar on top and one
without. 

I was able to reproduce the issue that the terminal widget is too
short, its around 18 rows for me instead of the requested:
   vte_terminal_set_size(VTE_TERMINAL(_term),80,23);
so I think this is a vte/gtk bug in some way, I will try to create a
test case to report it upstream and find a workaround. It seems like
its working if I force a widget size on the vte terminal with 
 gtk_widget_set_size_request ()
but the tricky part is to calculate the required height.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#710030: English screenshot

2013-09-11 Thread Michael Vogt
On Wed, Sep 11, 2013 at 06:03:34PM +1200, Jamie Norrish wrote:
> Attached is a screenshot showing this problem as it occurs on my system.
> The "Applying Changes" window is always created at the size shown
> (regardless of resizing in either previous invocations of the program,
> or the same one). This is unhelpful and leads, as noted earlier, to it
> falling back to Readline mode for interactivity, which I at least find
> almost entirely opaque.

Thanks for the screenshot. This is really helpful. I think this is now
fixed in bzr (but not yet in 0.80.3). And the fix will be part of the
next upload.

Note that this extremly small window seems to be only a issue when the
setting "General/Applying changes/Apply changes in a terminal window"
is set to "true" (ticked). When this is unticked (the default) the
progress is displayed with a progressbar and a expandable window which
has a bigger size.

I will try to investigate if there is a issue when the other progress
window is used.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#722253: closed by Michael Vogt (Bug#722253: fixed in squid-deb-proxy 0.8)

2013-09-11 Thread Michael Vogt
On Tue, Sep 10, 2013 at 11:33:06PM +0200, Julian Andres Klode wrote:
[..]
> The code currently still returns an unreachable host if all hosts
> are unreachable, as you're not filtering them out. See
>   lp:~juliank/squid-deb-proxy/juliank
> 
> for a patch for this and another more important problem (broken IPv6 address
> check in AptAvahiClient, causing an exception).

Thanks a bunch for these fixes! I merged and uploaded them.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#680971: python3-apt: apt_inst.TarFile.extractdata could accepts bytes

2013-09-10 Thread Michael Vogt
On Mon, Sep 09, 2013 at 02:14:56PM +0200, Jakub Wilk wrote:
> * Julian Andres Klode , 2013-08-26, 13:48:
> >>The apt_inst.TarFile.extractdata method requires that it's
> >>argument is a str. It would be nice if it also accepted bytes
> >>objects. This would be consistent with e.g. built-in open
> >>function, which accepts one or the other as filename.
> >
> >Thank you for your bug report; and yes, you're right. We are using
> >PyArg_ParseTuple() to parse the string. We currently use the
> >format string "s" for parsing file names. If you happen to know
> >the best format string we could use that accepts bytes strings as
> >well, please let us know. It has to work with Python 2.7 as well.
> 
> The documentation for the "s" format reads: "This format does not
> accept bytes-like objects. If you want to accept filesystem paths
> and convert them to C character strings, it is preferable to use the
> O& format with PyUnicode_FSConverter() as converter."
> 
> PyUnicode_FSConverter is not available in Python 2.X, though.

The attached patch should implement this for Python 3.1+, python2.X is
unchanged (for now). Feedback/review welcome!

Cheers,
 Michael
>From 5b3887123da762eb9d92635adb755beac479ff40 Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Tue, 10 Sep 2013 17:21:33 +0200
Subject: [PATCH] make apt_inst.TarFile.extractdata accept bytes

---
 po/python-apt.pot|   2 +-
 python/tarfile.cc|   7 +++
 tests/data/test_1.tar.gz | Bin 0 -> 124 bytes
 tests/test_extract.py|  28 
 4 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/test_1.tar.gz
 create mode 100644 tests/test_extract.py

diff --git a/po/python-apt.pot b/po/python-apt.pot
index d9cc96c..7b68f5a 100644
--- a/po/python-apt.pot
+++ b/po/python-apt.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-08-05 22:44+0200\n"
+"POT-Creation-Date: 2013-09-10 17:20+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
diff --git a/python/tarfile.cc b/python/tarfile.cc
index 920f032..6ccc4ec 100644
--- a/python/tarfile.cc
+++ b/python/tarfile.cc
@@ -407,9 +407,16 @@ static const char *tarfile_extractdata_doc =
 "LookupError if there is no member with the given name.";
 static PyObject *tarfile_extractdata(PyObject *self, PyObject *args)
 {
+   PyObject *py_member;
 const char *member;
+#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 1
+if (PyArg_ParseTuple(args,"O&",PyUnicode_FSConverter, &py_member) == 0)
+return 0;
+member = PyBytes_AS_STRING(py_member);
+#else
 if (PyArg_ParseTuple(args,"s",&member) == 0)
 return 0;
+#endif
 PyDirStream stream(NULL, member);
 ((PyTarFileObject*)self)->Fd.Seek(((PyTarFileObject*)self)->min);
 // Go through the stream.
diff --git a/tests/data/test_1.tar.gz b/tests/data/test_1.tar.gz
new file mode 100644
index ..eb74134a0e06cceed89a772b4661e633a6642ba9
GIT binary patch
literal 124
zcmb2|=3w||tRKX{{Pvt7SA&6o%f&16l-zIh8d~}vNLbo*@%QQ*5t?F3hw9IY7$5!e
z_|B~9C)HT?FF)pXt}-C~isf48wT5}tqWTvjDu3U|(=48~#&oB2`|7)~|AS9{+d1XR
W(^s$68IVDPdRUbCCP4-b1_l7F?=)%v

literal 0
HcmV?d1

diff --git a/tests/test_extract.py b/tests/test_extract.py
new file mode 100644
index 000..0afd8da
--- /dev/null
+++ b/tests/test_extract.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import os
+import unittest
+
+import apt_inst
+
+class TarFileTestCase(unittest.TestCase):
+
+def test_extractdata_bytes(self):
+tar_path = os.path.join(
+os.path.dirname(__file__), "data", "test_1.tar.gz")
+tar_file = apt_inst.TarFile(tar_path)
+member = b"motd"
+content = tar_file.extractdata(member).decode("utf-8")
+self.assertEqual(content, "a message\n")
+
+def test_extractdata_string(self):
+tar_path = os.path.join(
+os.path.dirname(__file__), "data", "test_1.tar.gz")
+tar_file = apt_inst.TarFile(tar_path)
+member = u"motd"
+content = tar_file.extractdata(member).decode("utf-8")
+self.assertEqual(content, "a message\n")
+
+
+if __name__ == "__main__":
+unittest.main()
-- 
1.8.3.2



Bug#721539: GtkNotebook 0xfd53c0 is mapped but visible child GtkLabel 0x1066580 is not mapped

2013-09-02 Thread Michael Vogt
On Sun, Sep 01, 2013 at 01:43:11PM -0500, Steve M. Robbins wrote:
> Package: synaptic
> Version: 0.80.2
> Severity: normal

Thanks for your bugreport.
 
> Synaptic outputs a ton of GTK warning messages when run.  Most are the form 
> quoted above,
> but occasionally see others, e.g.
> 
> (synaptic:2396): Gtk-CRITICAL **: gtk_tree_row_reference_new_proxy: assertion 
> `path->depth > 0' failed

The GtkNotebook one is fixed, I check the other one next. 

I think this is actually a GtkBuilder/Glade issue, as a trivial window
with a notebook build via glade will also show a gtk-warning (a
different one though) and if there is no content in the notebook it
will simply segfault.


Cheers,
 Michael

> -Steve
> 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages synaptic depends on:
> ii  hicolor-icon-theme  0.12-1
> ii  libapt-inst1.5  0.9.11.2
> ii  libapt-pkg4.12  0.9.11.2
> ii  libatk1.0-0 2.8.0-2
> ii  libc6   2.17-92+b1
> ii  libcairo-gobject2   1.12.14-5
> ii  libcairo2   1.12.14-5
> ii  libept1.4.121.0.9
> ii  libgcc1 1:4.8.1-9
> ii  libgdk-pixbuf2.0-0  2.28.2-1
> ii  libglib2.0-02.36.4-1
> ii  libgtk-3-0  3.8.4-1
> ii  libpango1.0-0   1.32.5-5+b1
> ii  libstdc++6  4.8.1-9
> ii  libvte-2.90-9   1:0.34.6-1
> ii  libx11-62:1.6.1-1
> ii  libxapian22 1.2.15-2
> ii  libxext62:1.3.2-1
> ii  zlib1g  1:1.2.8.dfsg-1
> 
> Versions of packages synaptic recommends:
> ii  gksu   2.0.2-6
> ii  libgtk2-perl   2:1.247-2+b1
> ii  policykit-10.105-3
> ii  rarian-compat  0.8.1-5
> 
> Versions of packages synaptic suggests:
> pn  apt-xapian-index 
> ii  deborphan1.7.28.8
> ii  dwww 1.12.0
> ii  menu 2.1.46
> pn  software-properties-gtk  
> pn  tasksel  
> 
> -- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#721477: apt: cron.daily script fails with erroneous -f command line option to apt-get

2013-09-01 Thread Michael Vogt
On Sat, Aug 31, 2013 at 10:18:26PM -0400, Philipp Weis wrote:
> Package: apt
> Version: 0.9.11.2
> Severity: normal
> Tags: patch

Thanks for your bugreport and your patch.
 
> /etc/cron.daily/apt fails with the following error.
> 
> | root@zaphod:/etc/cron.daily# ./apt
> | verbose level 2
> | system is on main power.
> | error encountered in cron job with "apt-get check".
> 
> This is caused by an errounous "-f" option passed in to apt-get check.
> The attached patch removes the "-f" and should fix the issue.

I merged this into our git tree and it will be part of the next
upload.

Cheers,
 Michael
 
> -- Package-specific info:
> 
> -- (/etc/apt/preferences present, but not submitted) --
> 
> 
> -- (no /etc/apt/sources.list present) --
> 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (600, 'unstable'), (570, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.10.5+ (SMP w/2 CPU cores; PREEMPT)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.14-1
> ii  libapt-pkg4.12  0.9.11.2
> ii  libc6   2.17-92+b1
> ii  libgcc1 1:4.8.1-9
> ii  libstdc++6  4.8.1-9
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> ii  apt-doc 0.9.11.2
> ii  aptitude0.6.8.2-1.2
> ii  dpkg-dev1.17.1
> ii  python-apt  0.8.9.1+b1
> ii  xz-utils5.1.1alpha+20120614-2
> 
> -- Configuration Files:
> /etc/cron.daily/apt changed [not included]
> 
> -- no debconf information

> diff -r 5b6eee457e46 cron.daily/apt
> --- a/cron.daily/apt  Sat Aug 31 22:05:01 2013 -0400
> +++ b/cron.daily/apt  Sat Aug 31 22:10:09 2013 -0400
> @@ -375,7 +375,7 @@
>  check_power || exit 0
>  
>  # check if we can lock the cache and if the cache is clean
> -if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; 
> then
> +if which apt-get >/dev/null && ! eval apt-get check $XAPTOPT $XSTDERR ; then
>  debug_echo "error encountered in cron job with \"apt-get check\"."
>  exit 0
>  fi


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#721301: apt-get install option "--no-install-recommends" in conjunction with "--" failed

2013-08-31 Thread Michael Vogt
Name "lzma";
> APT::Compressor::lzma::Extension ".lzma";
> APT::Compressor::lzma::Binary "xz";
> APT::Compressor::lzma::Cost "5";
> APT::Compressor::lzma::CompressArg "";
> APT::Compressor::lzma::CompressArg:: "--format=lzma";
> APT::Compressor::lzma::CompressArg:: "-9";
> APT::Compressor::lzma::UncompressArg "";
> APT::Compressor::lzma::UncompressArg:: "--format=lzma";
> APT::Compressor::lzma::UncompressArg:: "-d";
> APT::CompressorName "";
> APT::CompressorExtension ".";
> APT::CompressorBinary "";
> APT::CompressorCost "100";
> APT::CompressorCompressArg "";
> APT::CompressorCompressArg:: "-9";
> APT::CompressorUncompressArg "";
> APT::CompressorUncompressArg:: "-d";
> Dir "/";
> Dir::State "var/lib/apt/";
> Dir::State::lists "lists/";
> Dir::State::cdroms "cdroms.list";
> Dir::State::mirrors "mirrors/";
> Dir::State::extended_states "extended_states";
> Dir::State::status "/var/lib/dpkg/status";
> Dir::Cache "var/cache/apt/";
> Dir::Cache::archives "archives/";
> Dir::Cache::srcpkgcache "srcpkgcache.bin";
> Dir::Cache::pkgcache "pkgcache.bin";
> Dir::Etc "etc/apt/";
> Dir::Etc::sourcelist "sources.list";
> Dir::Etc::sourceparts "sources.list.d";
> Dir::Etc::vendorlist "vendors.list";
> Dir::Etc::vendorparts "vendors.list.d";
> Dir::Etc::main "apt.conf";
> Dir::Etc::netrc "auth.conf";
> Dir::Etc::parts "apt.conf.d";
> Dir::Etc::preferences "preferences";
> Dir::Etc::preferencesparts "preferences.d";
> Dir::Etc::trusted "trusted.gpg";
> Dir::Etc::trustedparts "trusted.gpg.d";
> Dir::Bin "";
> Dir::Bin::methods "/usr/lib/apt/methods";
> Dir::Bin::solvers "";
> Dir::Bin::solvers:: "/usr/lib/apt/solvers";
> Dir::Bin::dpkg "/usr/bin/dpkg";
> Dir::Bin::bzip2 "/bin/bzip2";
> Dir::Bin::xz "/usr/bin/xz";
> Dir::Media "";
> Dir::Media::MountPath "/media/cdrom";
> Dir::Log "var/log/apt";
> Dir::Log::Terminal "term.log";
> Dir::Log::History "history.log";
> Dir::Ignore-Files-Silently "";
> Dir::Ignore-Files-Silently:: "~$";
> Dir::Ignore-Files-Silently:: "\.disabled$";
> Dir::Ignore-Files-Silently:: "\.bak$";
> Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
> Dir::Ignore-Files-Silently:: "\.save$";
> Dir::Ignore-Files-Silently:: "\.orig$";
> Acquire "";
> Acquire::cdrom "";
> Acquire::cdrom::mount "/media/cdrom";
> Acquire::Languages "";
> Acquire::Languages:: "en";
> Acquire::Languages:: "none";
> DPkg "";
> DPkg::Pre-Install-Pkgs "";
> DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
> DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
> DPkg::Tools "";
> DPkg::Tools::Options "";
> DPkg::Tools::Options::/usr/bin/apt-listchanges "";
> DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
> CommandLine "";
> CommandLine::AsString "apt-config dump";
> 
> -- (no /etc/apt/preferences present) --
> 
> 
> -- /etc/apt/sources.list --
> 
> # 
> 
> # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 
> 20130504-14:44]/ wheezy main
> 
> #deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 
> 20130504-14:44]/ wheezy main
> 
> deb http://kambing.ui.ac.id/debian sid main contrib
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.10-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: 
> LC_ALL set to en_US.UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.14-1
> ii  libapt-pkg4.12  0.9.11.1
> ii  libc6   2.17-92
> ii  libgcc1 1:4.7.2-5
> ii  libstdc++6  4.7.2-5
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc 
> ii  aptitude0.6.8.2-1
> pn  

Bug#720532: dselect: Command line option 'f' [from -f] is not known

2013-08-26 Thread Michael Vogt
On Mon, Aug 26, 2013 at 09:24:46AM +0200, Domenico Andreoli wrote:
[..]
> > The attached patch should fix that, the commandline parser got a bit
> > stricter, this caused this bug.
> >
> 
> unfortunately it doesn't. I still get a similar message when I try to
> install the selected packages:
> 
> | E: Command line option 'f' [from -f] is not known.
> | Some errors occurred while unpacking. Packages that were installed
> | will be configured. This may result in duplicate errors
> | or errors caused by missing dependencies. This is OK, only the errors
> | above this message are important. Please fix them and run [I]nstall again
> | Press enter to continue.

Indeed, sorry for that. This is fixed in git now too (there was also a
typo in the new commandline parser for this option so just fixing the
script was not enough). I will do a upload soon with the fix.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#718788: squid-deb-proxy-client: prefer the proxy on the local machine

2013-08-26 Thread Michael Vogt
On Fri, Aug 09, 2013 at 04:26:58PM +0200, Paul Wise wrote:
> On Thu, 2013-08-08 at 16:23 +0200, Michael Vogt wrote:
> 
> > I like this suggestion a lot, do you think its sufficient to special
> > case localhost and (always) prefer that or something more
> > sophisticated like measuring how long a connect to the port takes?
> 
> localhost won't match what is returned from avahi but anyway I would
> suggest prefer the local machine. If there is no proxy on the local
> machine, then use whichever proxy connects first.
> 
> pabs@chianamo ~ $ avahi-browse -kprt _apt_proxy._tcp
> +;wlan0;IPv4;Squid\032deb\032proxy\032on\032someothersystem;_apt_proxy._tcp;local
> +;wlan0;IPv4;apt-cacher-ng\032proxy\032on\032chianamo;_apt_proxy._tcp;local
> =;wlan0;IPv4;Squid\032deb\032proxy\032on\032rocinante;_apt_proxy._tcp;local;someothersystem.local;10.0.0.134;8000;
> =;wlan0;IPv4;apt-cacher-ng\032proxy\032on\032chianamo;_apt_proxy._tcp;local;chianamo.local;10.0.0.134;3142;

Here is a updated Version that should deal with ipv6 too.
Feedback (very) welcome :)

Cheers,
 Michael

=== modified file 'apt-avahi-discover'
--- apt-avahi-discover	2013-04-09 15:42:27 +
+++ apt-avahi-discover	2013-08-26 13:35:30 +
@@ -3,10 +3,39 @@
 # use avahi to find a _apt_proxy._tcp provider and return
 # a http proxy string suitable for apt
 
+import asyncore
+import functools
 import socket
+import sys
+import time
 from subprocess	import Popen, PIPE
 
 
+@functools.total_ordering
+class AptAvahiClient(asyncore.dispatcher):
+def __init__(self, addr):
+asyncore.dispatcher.__init__(self)
+if is_ipv6(addr):
+self.create_socket(socket.AF_INET6, socket.SOCK_STREAM)
+self.connect( (addr[0], addr[1], 0, 0) )
+else:
+self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+self.connect(addr)
+self._time_init = time.time()
+self.time_to_connect = sys.maxint
+self.address = addr
+def handle_connect(self):
+self.time_to_connect = time.time() - self._time_init
+self.close()
+def __eq__(self, other):
+return self.time_to_connect == other.time_to_connect
+def __lt__(self, other):
+return self.time_to_connect < other.time_to_connect
+def __repr__(self):
+return "<%s> %s: %s" % (
+self.__class__.__name__, self.addr, self.time_to_connect)
+
+
 def is_ipv6(a):
 return ':' in a
 
@@ -26,7 +55,7 @@
 if line.startswith('='):
 tokens = line.split(';')
 addr = tokens[7]
-port = tokens[8]
+port = int(tokens[8])
 if is_ipv6(addr):
 # We need to skip ipv6 link-local addresses since 
 # APT can't use them
@@ -37,15 +66,28 @@
 
 # Run through the offered addresses and see if we we have a bound local
 # address for it.
+addrs = []
 for (ip, port) in addr6 + addr4:
 try:
 res = socket.getaddrinfo(ip, port, 0, 0, 0, socket.AI_ADDRCONFIG)
 if res:
-return (ip, port)
+addrs.append((ip, port))
 except socket.gaierror:
 pass
-# nothing found
-return None
+if not addrs:
+return None
+
+# sort by answering speed
+hosts = []
+for addr in addrs:
+hosts.append(AptAvahiClient(addr))
+# 3s timeout, arbitray
+asyncore.loop(timeout=3)
+if "--debug" in sys.argv:
+sys.stderr.write("%s\n" % sorted(hosts))
+fastest_host = sorted(hosts)[0]
+fastest_address = fastest_host.address
+return fastest_address
 
 
 if __name__ == "__main__":



Bug#718788: squid-deb-proxy-client: prefer the proxy on the local machine

2013-08-26 Thread Michael Vogt
On Fri, Aug 09, 2013 at 04:26:58PM +0200, Paul Wise wrote:
> On Thu, 2013-08-08 at 16:23 +0200, Michael Vogt wrote:
> 
> > I like this suggestion a lot, do you think its sufficient to special
> > case localhost and (always) prefer that or something more
> > sophisticated like measuring how long a connect to the port takes?
> 
> localhost won't match what is returned from avahi but anyway I would
> suggest prefer the local machine. If there is no proxy on the local
> machine, then use whichever proxy connects first.
> 
> pabs@chianamo ~ $ avahi-browse -kprt _apt_proxy._tcp
> +;wlan0;IPv4;Squid\032deb\032proxy\032on\032someothersystem;_apt_proxy._tcp;local
> +;wlan0;IPv4;apt-cacher-ng\032proxy\032on\032chianamo;_apt_proxy._tcp;local
> =;wlan0;IPv4;Squid\032deb\032proxy\032on\032rocinante;_apt_proxy._tcp;local;someothersystem.local;10.0.0.134;8000;
> =;wlan0;IPv4;apt-cacher-ng\032proxy\032on\032chianamo;_apt_proxy._tcp;local;chianamo.local;10.0.0.134;3142;

Thanks and sorry for my slow reply, could you please check if the
attached patch helps with your use-case?

Thanks,
 Michael
=== modified file 'apt-avahi-discover'
--- apt-avahi-discover	2013-04-09 15:42:27 +
+++ apt-avahi-discover	2013-08-26 09:21:53 +
@@ -3,10 +3,35 @@
 # use avahi to find a _apt_proxy._tcp provider and return
 # a http proxy string suitable for apt
 
+import asyncore
+import functools
 import socket
+import sys
+import time
 from subprocess	import Popen, PIPE
 
 
+@functools.total_ordering
+class AptAvahiClient(asyncore.dispatcher):
+def __init__(self, addr):
+asyncore.dispatcher.__init__(self)
+self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+self.connect(addr)
+self._time_init = time.time()
+self.time_to_connect = sys.maxint
+self.address = addr
+def handle_connect(self):
+self.time_to_connect = time.time() - self._time_init
+self.close()
+def __eq__(self, other):
+return self.time_to_connect == other.time_to_connect
+def __lt__(self, other):
+return self.time_to_connect < other.time_to_connect
+def __repr__(self):
+return "<%s> %s: %s" % (
+self.__class__.__name__, self.addr, self.time_to_connect)
+
+
 def is_ipv6(a):
 return ':' in a
 
@@ -26,7 +51,7 @@
 if line.startswith('='):
 tokens = line.split(';')
 addr = tokens[7]
-port = tokens[8]
+port = int(tokens[8])
 if is_ipv6(addr):
 # We need to skip ipv6 link-local addresses since 
 # APT can't use them
@@ -37,15 +62,25 @@
 
 # Run through the offered addresses and see if we we have a bound local
 # address for it.
+addrs = []
 for (ip, port) in addr6 + addr4:
 try:
 res = socket.getaddrinfo(ip, port, 0, 0, 0, socket.AI_ADDRCONFIG)
 if res:
-return (ip, port)
+addrs.append((ip, port))
 except socket.gaierror:
 pass
-# nothing found
-return None
+if not addrs:
+return None
+
+# sort by answering speed
+hosts = []
+for addr in addrs:
+hosts.append(AptAvahiClient(addr))
+asyncore.loop()
+fastest_host = sorted(hosts)[0]
+fastest_address = fastest_host.address
+return fastest_address
 
 
 if __name__ == "__main__":



Bug#720365: Incorrect functions in squid-deb-proxy init script

2013-08-25 Thread Michael Vogt
On Wed, Aug 21, 2013 at 11:17:37AM +1200, Andrew Simpson wrote:
> Package: squid-deb-proxy
> Version: 0.7.2

Thanks for your bugreport and your patch!
 
> Having contributed the Debian init script a while ago, it's easy for me to 
> see a couple of minor
> errors that have crept in.  Two function calls need to be changed to
> the new function names.
[..]

Good catch! I applied the patch to my bzr tree and it will be part of
the next upload.

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#720532: dselect: Command line option 'f' [from -f] is not known

2013-08-23 Thread Michael Vogt
On Fri, Aug 23, 2013 at 09:13:20AM +0200, Domenico Andreoli wrote:
> Package: apt
> Version: 0.9.11
> Severity: important

Thanks for your bugreport.
 
>   apt 0.9.11 breaks dselect, which complains loudly when I try to update
> from sources (I use the apt backend):
> 
> | E: Command line option 'f' [from -f] is not known.
> | 
> | dselect: warning: subprocess update available list script returned error 
> exit status 1
> | Press  to continue.
> 
> I see that between 0.9.10 and 0.9.11 there is some refactoring around the
> command line [0].  Maybe some option has been left over?
> 
> I don't know how many other dselect users are left with me but the regression
> is quite serious for "us". Is it possible to investigate further?
[..]

The attached patch should fix that, the commandline parser got a bit
stricter, this caused this bug.

Cheers,
 Michael
>From 17e4360804ffd2b5530b8ceb0e42834eb99e526e Mon Sep 17 00:00:00 2001
From: Michael Vogt 
Date: Fri, 23 Aug 2013 13:44:21 +0200
Subject: [PATCH] dselect/update: remove "-f" option as its not being used in
 the context of apt-get update

---
 dselect/update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dselect/update b/dselect/update
index 411033c..487fbf2 100755
--- a/dselect/update
+++ b/dselect/update
@@ -6,7 +6,7 @@ TEXTDOMAIN="apt"
 
 # Get the configuration from /etc/apt/apt.conf
 CLEAN="prompt"
-OPTS="-f"
+OPTS=""
 APTGET="/usr/bin/apt-get"
 APTCACHE="/usr/bin/apt-cache"
 DPKG="/usr/bin/dpkg"
-- 
1.8.3.2



Bug#719629: regression: apt: crashes with MALLOC_CHECK_ and MALLOC_PERTURB_ set

2013-08-13 Thread Michael Vogt
On Tue, Aug 13, 2013 at 08:16:58PM +0200, Paul Wise wrote:
> Package: apt
> Version: 0.9.10
> Severity: important
> Usertags: malloc
> 
> With the glibc malloc checks enabled, the new version of apt in unstable
> crashes with a SIGABRT on apt-get update and other operations. This is a
> regression from testing, which doesn't have this issue. After
> recompiling apt with debug symbols and no optimisation I obtained the
> backtrace listed below. This means that there is probably a new issue
> with uninitialised memory in apt from unstable.
[..]

Thanks! I can reproduce this and the following diff fixes it for me:

$ git diff
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 1c79ee7..99cedc7 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -60,7 +60,7 @@ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long
long Size)
   return;
}

-   d->Buffer = new char[Size];
+   d->Buffer = new char[Size+1];
d->Start = d->End = d->Buffer;
d->Done = false;
d->iOffset = 0;

But I need to investigate further to get to the root cause.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#718788: squid-deb-proxy-client: prefer the proxy on the local machine

2013-08-08 Thread Michael Vogt
On Mon, Aug 05, 2013 at 03:24:06PM +0200, Paul Wise wrote:
> Package: squid-deb-proxy-client
> Version: 0.7.2
> Severity: wishlist

Thanks for your bugreport.
 
> I am on a network with two _apt_proxy._tcp instances, one on my machine
> and one on another person's machine. I noticed that apt on my machine
> mainly used the other person's machine instead of mine. I think it
> should use my machine before the others, especially since I downloaded a
> full mirror before coming to this network.

I like this suggestion a lot, do you think its sufficient to special
case localhost and (always) prefer that or something more
sophisticated like measuring how long a connect to the port takes?

Cheers,
 Michael

> -- System Information:
> Debian Release: jessie/sid
>   APT prefers testing
>   APT policy: (700, 'testing'), (600, 'unstable'), (550, 'experimental')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages squid-deb-proxy-client depends on:
> ii  apt  0.9.8.2
> ii  avahi-utils  0.6.31-2
> ii  python   2.7.5-2
> 
> -- 
> bye,
> pabs
> 
> http://wiki.debian.org/PaulWise


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#717891: Apt 0.9.9.3 + Acquire::http::Proxy = 400 Bad Request

2013-07-26 Thread Michael Vogt
On Fri, Jul 26, 2013 at 09:29:51AM +0200, David Kalnischkies wrote:
> On Fri, Jul 26, 2013 at 7:51 AM,   
> wrot> This is a regression from the "Do not send a connection: keep-alive, at 
> all"
> commit ( 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 )
> [which wasn't included in the changelog by accident it seems].
[..]

Indeed, I ran git-dch --auto but did not carefully
enough check the changelog. Sorry for that.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#717615: 01autoremove-kernels is created too late

2013-07-23 Thread Michael Vogt
On Tue, Jul 23, 2013 at 01:59:47AM +0100, Ben Hutchings wrote:
> Package: apt
> Version: 0.9.9.2
> Severity: serious
> 
> The configuration file /etc/apt/apt.conf.d/01autoremove-kernels is
> only created when a kernel package is installed.  It must be created
> on upgrade of apt, otherwise all kernel packages are immediately
> auto-removable.

Thanks for your bugreport. This is fixed now in git and will be part
of the next upload.
 
> (But thanks for adding this, I've been wanting it for years!)

Indeed, its a really nice feature, kudos to Steve Langasek and Adam
Conrad!

Cheers,
 Michael

> Ben.
> 
> -- Package-specific info:
> 
> -- (no /etc/apt/preferences present) --
> 
> 
> -- (no /etc/apt/sources.list present) --
> 
> 
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
> Architecture: i386 (x86_64)
> Foreign Architectures: amd64
> 
> Kernel: Linux 3.10-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  debian-archive-keyring  2012.4
> ii  gnupg   1.4.12-7
> ii  libapt-pkg4.12  0.9.9.2
> ii  libc6   2.17-7
> ii  libgcc1 1:4.8.1-6
> ii  libstdc++6  4.8.1-6
> 
> apt recommends no packages.
> 
> Versions of packages apt suggests:
> pn  apt-doc 
> ii  aptitude0.6.8.2-1
> ii  dpkg-dev1.16.10
> ii  python-apt  0.8.9.1
> ii  synaptic0.80.2
> ii  xz-utils5.1.1alpha+20120614-2
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to deity-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/20130723005947.30241.31262.report...@deadeye.wl.decadent.org.uk
> 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#717616: apt-auto-removal includes debug symbol packages in kernel list

2013-07-23 Thread Michael Vogt
On Tue, Jul 23, 2013 at 02:07:46AM +0100, Ben Hutchings wrote:
> Package: apt
> Version: 0.9.9.2
> Severity: normal
> Tags: patch
[..]

Thanks for your bugreport and your patch. I merged it into the debian
git tree and it will be part of the next upload.

Cheers,
 Michael
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#711826: no more unattended upgrades since Wheezy is out

2013-07-14 Thread Michael Vogt
On Mon, Jul 08, 2013 at 12:09:24PM -0700, Andrew Pimlott wrote:
> Jumping into this bug...
> 
> It would definitely help me to have one unattended-upgrades
> configuration that works without change across multiple Debian releases,
> even when I choose to stay behind the current stable for a while.  The
> problem is, the archive/suite in Debian release files seems to be
> oldstable or stable, while ${distro_codename} is squeeze or wheezy.  So
> there's nothing I can put in Allowed-Origins to track my current
> release.
[..]

The current version of unattended-upgrades has the following lines:
"""
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,archive=${distro_codename},label=Debian-Security";
"""
This should fix the problem. As a workaround you can put oldstable
into the allowed origins for now.

> (By the way, the Allowed-Origins entries like
> 
> "${distro_id} ${distro_codename}-security"; 
> 
> seem to be meaningless for Debian and should probably be removed to
> reduce confusion.)

Its not in the debian package anymore.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#714980: apt: Please run dh_clean in debian/rules clean

2013-07-05 Thread Michael Vogt
On Thu, Jul 04, 2013 at 10:55:22PM -0700, Geoffrey Thomas wrote:
> Package: src:apt
> Version: 0.9.9
> Severity: wishlist

Thanks for your bugreprt.
 
> debian/rules clean doesn't run dh_clean, which means that if you do
> a build and clean in a directory and then do a source build, your
> source package ends up with the debian/$package/ tmpdirs (the
> results of the last build) inside it, as well as some debhelper temp
> files. This makes my debdiffs look silly. Running dh_clean manually
> fixes this, as you'd expect.
> 
> It also clears out autom4te.cache, which seems to have ended up in
> some tarballs (like those in Ubuntu's quantal-updates, at least,
> which is what I'm running -- the _presence_ of autom4te.cache in
> Ubuntu's source tarballs makes my debdiffs look differently silly if
> I run dh_clean before building my source tarball).
> 
> Can you call dh_clean from debian/rules clean?

Indded, this is now added in git and will be part of the next upload.

Cheers,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#712433: Please add a way to disable the udev code in apt-cdrom

2013-06-20 Thread Michael Vogt
On Sat, Jun 15, 2013 at 11:26:05PM +0100, Steve McIntyre wrote:
> Package: apt
> Version: 0.9.7.8
> Severity: important
> Justification: painful to debug problems

Thanks for your bugreport.

[..] 
> not find a CD drive on my machine via udev (nor in the VM where I
> first started to debug). So, please:
> 
> (a) if apt can't find a CD to add for some reason, please *say so*
> rather than just saying "Repeat this process..." It currently also
> returns 0, suggesting even more that everything worked fine.
>
> (b) add an option "Acquire::cdrom::UseUdev" or similar to allow people
> (me!) to disable the udev code and allow direct use of an
> already-mounted loopback ISO image or similar.

Thanks. Would a message like this have helped you? 
"""
  _error->Info(_("No CD-ROM could be auto-detected, using default
  "
 "mount path '%s'. See 'man apt-cdrom' for more ", 
 "information about CD-ROM auto-detection."),
   _config->Find("Acquire::cdrom::mount"));
"""

Plus the following man-page addition:
"""
  --no-auto-detect, --cdrom
   Do not try to auto-detect the CD-ROM path. Usually combined
   with
   the --cdrom option. Configuration Item:
   Acquire::cdrom::AutoDetect.
"""

If so, I will add it to the repo. David already fixed the exit code
and misleading "Repeat this process..." message in his branch.

Cheers,
 Michael
 
> Thanks!
> 
> -- Package-specific info:
> 
> -- apt-config dump --
> 
> APT "";
> APT::Architecture "amd64";
> APT::Build-Essential "";
> APT::Build-Essential:: "build-essential";
> APT::Install-Recommends "1";
> APT::Install-Suggests "0";
> APT::Authentication "";
> APT::Authentication::TrustCDROM "true";
> APT::Debug "";
> APT::Debug::aptcdrom "true";
> APT::NeverAutoRemove "";
> APT::NeverAutoRemove:: "^firmware-linux.*";
> APT::NeverAutoRemove:: "^linux-firmware$";
> APT::NeverAutoRemove:: "^linux-image.*";
> APT::NeverAutoRemove:: "^kfreebsd-image.*";
> APT::NeverAutoRemove:: "^linux-restricted-modules.*";
> APT::NeverAutoRemove:: "^linux-ubuntu-modules-.*";
> APT::NeverAutoRemove:: "^gnumach$";
> APT::NeverAutoRemove:: "^gnumach-image.*";
> APT::Never-MarkAuto-Sections "";
> APT::Never-MarkAuto-Sections:: "metapackages";
> APT::Never-MarkAuto-Sections:: "restricted/metapackages";
> APT::Never-MarkAuto-Sections:: "universe/metapackages";
> APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
> APT::Never-MarkAuto-Sections:: "oldlibs";
> APT::Never-MarkAuto-Sections:: "restricted/oldlibs";
> APT::Never-MarkAuto-Sections:: "universe/oldlibs";
> APT::Never-MarkAuto-Sections:: "multiverse/oldlibs";
> APT::Periodic "";
> APT::Periodic::Update-Package-Lists "1";
> APT::Periodic::Download-Upgradeable-Packages "0";
> APT::Periodic::AutocleanInterval "0";
> APT::Update "";
> APT::Update::Post-Invoke "";
> APT::Update::Post-Invoke:: "touch /var/lib/apt/periodic/update-success-stamp 
> 2>/dev/null || true";
> APT::Update::Post-Invoke-Success "";
> APT::Update::Post-Invoke-Success:: "[ ! -f /var/run/dbus/system_bus_socket ] 
> || /usr/bin/dbus-send --system --dest=org.debian.apt --type=signal 
> /org/debian/apt org.debian.apt.CacheChanged || true";
> APT::Archives "";
> APT::Archives::MaxAge "30";
> APT::Archives::MinAge "2";
> APT::Archives::MaxSize "500";
> APT::Architectures "";
> APT::Architectures:: "amd64";
> APT::Architectures:: "i386";
> APT::Compressor "";
> APT::Compressor::. "";
> APT::Compressor::.::Name ".";
> APT::Compressor::.::Extension "";
> APT::Compressor::.::Binary "";
> APT::Compressor::.::Cost "1";
> APT::Compressor::gzip "";
> APT::Compressor::gzip::Name "gzip";
> APT::Compressor::gzip::Extension ".gz";
> APT::Compressor::gzip::Binary "gzip";
> APT::Compressor::gzip::Cost "2";
> APT::Compressor::gzip::CompressArg "";
> APT::Compressor::gzip::CompressArg:: "-9n";
> APT::Compressor::gzip::UncompressArg "";
> APT::Compressor::gzip::UncompressArg:: "-d";
> APT::Compressor::bzip2 "";
> APT::Compressor::bzip2::Name "bzip2";
> APT::Compressor::bzip2::Extension ".bz2";
> APT::Compressor::bzip2::Binary "bzip2";
> APT::Compressor::bzip2::Cost "3";
> APT::Compressor::bzip2::CompressArg "";
> APT::Compressor::bzip2::CompressArg:: "-9";
> APT::Compressor::bzip2::UncompressArg "";
> APT::Compressor::bzip2::UncompressArg:: "-d";
> APT::Compressor::xz "";
> APT::Compressor::xz::Name "xz";
> APT::Compressor::xz::Extension ".xz";
> APT::Compressor::xz::Binary "xz";
> APT::Compressor::xz::Cost "4";
> APT::Compressor::xz::CompressArg "";
> APT::Compressor::xz::CompressArg:: "-6";
> APT::Compressor::xz::UncompressArg "";
> APT::Compressor::xz::UncompressArg:: "-d";
> APT::Compressor::lzma "";
> APT::Compressor::lzma::Name "lzma";
> APT::Compressor::lzma::Extension ".lzma";
> APT::Compressor::lzma::Binary "xz";
> APT::Compressor::lzma::Cost "5";
> APT::Compressor::lzma::CompressArg "";
> APT::Compressor::lzma::CompressArg:: "--format=lzma";
> APT::Compressor::lzma::CompressArg:: "

Bug#711568: synaptic: Freezes after mouse click, sometimes whole X

2013-06-16 Thread Michael Vogt
On Fri, Jun 07, 2013 at 10:46:41PM +0100, Joe Rowan wrote:
> Package: synaptic
> Version: 0.80.2
> Severity: important

Thanks for your bugreport.

> Dear Maintainer,
[..]
> Freeze occurs occasionally, after a mouse click. Sometimes just synaptic, 
> sometimes the whole display. Killing the synaptic process from another 
> console restores operation in the latter case. 
> Running synaptic again without logout or reboot repeats the same behaviour. 
> Number of clicks varies, sometimes 6, sometimes 20-30.
> Once an upgrade begins it runs without problems, it seems to freeze only on a 
> mouse click 
> I'm fairly sure this behaviour started after the last synaptic upgrade, as it 
> has been used heavily since the release.

Can you include some step to reproduce this problem? Is it important
to click on specific parts of the UI? While a upgrade is running? Or
just after synaptic started? Or anything else that I need to know to
reproduce? 

Thanks,
 Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



<    1   2   3   4   5   6   7   8   9   10   >