[pull-lp-source] has arbitrary limit on file name length

Bug #769369 reported by Rolf Leggewie on 2011-04-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Low
Unassigned
python-launchpadlib (Ubuntu)
Undecided
Unassigned
ubuntu-dev-tools (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: ubuntu-dev-tools

ubuntu-dev-tools 0.99 on lucid: pull-lp-source has an arbitrary limit on length of the file name

pull-lp-source openoffice.org-style-human
Traceback (most recent call last):
  File "/usr/bin/pull-lp-source", line 70, in <module>
    spph = Distribution('ubuntu').getArchive().getSourcePackage(package, release, pocket)
  File "/usr/lib/pymodules/python2.6/ubuntutools/lp/lpapicache.py", line 287, in getSourcePackage
    status = state, exact_match = True)[0]
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 750, in __getitem__
    found_slice = self._get_slice(slice(key, key+1))
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 808, in _get_slice
    unicode(self._root._browser.get(page_url)))
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 316, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 260, in _request
    str(url), method=method, body=data, headers=headers)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 1129, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 154, in _request
    redirections, cachekey)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 954, in _request
    _updateCache(headers, response, content, self.cache, cachekey)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 396, in _updateCache
    cache.set(cachekey, text)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 664, in set
    f = file(cacheFullPath, "wb")
IOError: [Errno 36] File name too long: '/home/rolf/.launchpadlib/api.edge.launchpad.net/cache/api.edge.launchpad.net,1.0,ubuntu,+archive,primary,status=Published&ws.start=0&source_name=%22openoffice.org-style-hu,5d9574e79b38bb1dea8194a795f9043e'

Rolf Leggewie (r0lf) on 2011-04-23
description: updated
Stefano Rivera (stefanor) wrote :

I'm afraid I can't reproduce this on lucid. What filesystem are you using?

Also "openoffice.org-style-human" is not a source package.

On lucid:
$ pull-lp-source openoffice.org-style-human
E: The package 'openoffice.org-style-human' does not exist in the Ubuntu primary archive in 'natty'

$ ls ~/".launchpadlib/api.edge.launchpad.net/cache/api.edge.launchpad.net,1.0,ubuntu,+archive,primary,status=Published&ws.start=0&source_name=%22openoffice.org-style-hu,5d9574e79b38bb1dea8194a795f9043e"
/home/test/.launchpadlib/api.edge.launchpad.net/cache/api.edge.launchpad.net,1.0,ubuntu,+archive,primary,status=Published&ws.start=0&source_name=%22openoffice.org-style-hu,5d9574e79b38bb1dea8194a795f9043e

If anything this is a launchpadlib issue, I'll add a launchpadlib task

Rolf Leggewie (r0lf) wrote :

Stefano, thank you for having a look.

You are right, I can only reproduce this on one of my machines as well. Funny that you ask about my filesystems. You have a suspicion it may be connected to that? Not sure exactly which filesystem you are referring to, but on the computer where I have this problem the whole disk is encrypted and on top of that is sitting an LVM.

Stefano Rivera (stefanor) wrote :

> You have a suspicion it may be connected to that?

Yeah, because I can create filenames with that length but you can't. ecryptfs encrypts its filenames and I think there's some overhead. That's possibly to blame.

Although if it's likely that a user can't use filenames of this length, then launchpadlib is at fault for doing so.

Benjamin Drung (bdrung) on 2011-09-03
summary: - pull-lp-source has arbitrary limit on file name length
+ [pull-lp-source] has arbitrary limit on file name length
Changed in ubuntu-dev-tools (Ubuntu):
importance: Undecided → Medium
Stefano Rivera (stefanor) wrote :

Dropping importance, I really don't see much we can do about this in u-d-t.

Changed in ubuntu-dev-tools (Ubuntu):
importance: Medium → Low
Evan Broder (broder) wrote :

It looks like currently lplib's caching is controlled entirely by lazr.restfulclient, which as of 0.9.13 limited the length of filenames in the cache to 143 characters (ecryptfs's limit), so this should be fixed as of Maverick or so.

Rolf, can you still see this on anything newer than Lucid?

(http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/revision/86 and http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/revision/90)

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Incomplete
Changed in launchpadlib:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers