apt_inst.debExtractArchive doesn't handle links.

Bug #130795 reported by spbike
4
Affects Status Importance Assigned to Milestone
the python apt bindings
Confirmed
Unknown
apt (Debian)
Confirmed
Unknown
apt (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

To reproduce:
>>> import apt_inst
>>> apt_inst.debExtractArchive(open("/tmp/sudo_1.6.8p12-4ubuntu5_amd64.deb"),"/tmp/cdr")
1

What should happen:
ar x /tmp/sudo_1.6.8p12-4ubuntu5_amd64.deb
tar tvzf data.tar.gz | grep "usr/bin/sudo"
hrwsr-xr-x root/root 0 2006-10-09 04:39 ./usr/bin/sudo link to ./usr/bin/sudoedit

What actually happens:
What does happen:
root@mirror:/tmp/cdr/usr/bin# ls -al
total 120
drwxr-xr-x 3 root root 4096 2007-08-06 20:12 .
drwxr-xr-x 6 root root 4096 2007-08-06 20:12 ..
drwxr-xr-x 2 root root 4096 2007-08-06 20:12 sudo

Sudo should be a link, not a directory.

Changed in python-apt:
status: Unknown → New
Changed in python-apt:
status: Unknown → New
Michael Vogt (mvo)
Changed in python-apt:
status: New → Triaged
Revision history for this message
Julian Andres Klode (juliank) wrote :

The bug is in apt, apt-inst/dirstream.cc:

      case Item::HardLink:
      case Item::SymbolicLink:
      case Item::CharDevice:
      case Item::BlockDevice:
      case Item::Directory:
      {

affects: python-apt (Debian) → apt (Debian)
affects: python-apt (Ubuntu) → apt (Ubuntu)
Changed in apt (Debian):
status: New → Confirmed
Changed in python-apt:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.