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

Bug #769369 reported by Rolf Leggewie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Invalid
Low
Unassigned
lazr.restful (Ubuntu)
Fix Released
Low
Unassigned
python-launchpadlib (Ubuntu)
Invalid
Undecided
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'

Tags: lucid
Rolf Leggewie (r0lf)
description: updated
Revision history for this message
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

Revision history for this message
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.

Revision history for this message
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)
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Dan Streetman (ddstreet) wrote :

this is quite old and doesn't appear to be a problem still; should eb closed unless it's still reproducable

Changed in python-launchpadlib (Ubuntu):
status: New → Incomplete
Changed in launchpadlib:
status: Triaged → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I tried to reproduce this just now (did you, Dan?) and was unable to.

Closing as fixed.

Changed in ubuntu-dev-tools (Ubuntu):
status: Incomplete → Fix Released
affects: ubuntu-dev-tools (Ubuntu) → lazr.restful (Ubuntu)
Changed in launchpadlib:
status: Incomplete → Invalid
Changed in python-launchpadlib (Ubuntu):
status: Incomplete → Invalid
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.