Launchpad should provide dgettable URLs

Bug #130158 reported by William Grant
30
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Christian Reis

Bug Description

Ubuntu/Debian developers often use 'dget', this rather useful tool which can be used to grab an entire source package given the URL of a .dsc. It works well on the various Debian and Ubuntu mirrors, but fails on librarian due to the fact that librarian makes each file appear in its own directory. It would be much easier to fetch sources from LP a dgettable DSC URL was provided whenever we display DSCs.

Tags: lp-soyuz motu
Revision history for this message
Christian Reis (kiko) wrote :

The right way to solve this problem is to offer a virtual mapping of the librarian's dsc + orig + diff (and other dependencies) into a single directory. That shouldn't be too hard and we could actually stick it under sourcepackagerelease/+files/ or something like that. I suspect it could actually be implemented using "virtual" files that just redirected to the librarian URLs; that'd be easier than streaming the librarian content, but even that is pretty easy.

description: updated
Revision history for this message
LaserJock (laserjock) wrote :

Yeah, this bug is really annoying :-) Virtual files would probably be ok as long as they don't confuse wget.

Revision history for this message
Stuart Bishop (stub) wrote :

We cannot change the Librarian behavior - we need one directory per file to avoid namespace conflicts.

We could provide dget-able link in Launchpad as kiko suggests, although it is not optimal in that Launchpad serves everything via https at the moment.

Revision history for this message
Christian Reis (kiko) wrote :

So two questions for William (or other dget luminaries) to assist us in implementing this:

  - Does dget support HTTP redirects?
  - Does dget support HTTPS?

Revision history for this message
LaserJock (laserjock) wrote :

I'm not sure about HTTP redirects, my guess is no, but I'm not positive. dget uses curl (and wget if curl isn't available). I do see that dget has a --insecure option to not check SSL certs so I'm guessing HTTPS is ok.

Revision history for this message
Christian Reis (kiko) wrote : Re: [Bug 130158] Re: Launchpad should provide dgettable URLs

On Sat, Aug 04, 2007 at 09:03:21PM -0000, Jordan Mantha wrote:
> I'm not sure about HTTP redirects, my guess is no, but I'm not positive.
> dget uses curl (and wget if curl isn't available). I do see that dget

Both curl and wget know how to follow HTTP redirects, so I'd guess yes,
but it'd be really cool if somebody could test and come back with the
advice so we can move on with this :-)

Changed in soyuz:
importance: Undecided → Medium
status: New → Confirmed
Christian Reis (kiko)
Changed in soyuz:
assignee: nobody → kiko
milestone: 1.1.11 → 1.1.12
status: Confirmed → Incomplete
Revision history for this message
LaserJock (laserjock) wrote :

wget handles redirects just fine. With curl you have to pass it the -L flag to get it to follow. I dug around the dget script and found that it does use -L for curl, \o/

I did a simple test redirect dgetting a real source package on my server and it works for both the wget and curl backends. Looks like we're ready to go.

Changed in soyuz:
status: Incomplete → Confirmed
Revision history for this message
Christian Reis (kiko) wrote :

Okay, started on a patch that works.

Changed in soyuz:
status: Confirmed → In Progress
Revision history for this message
Christian Reis (kiko) wrote :

Wow, this is so easy to actually do. Fun! I need a test for it now, though.. and I'll need Celso to tell me how to test it.

Revision history for this message
Christian Reis (kiko) wrote :

So to confirm: if the DSC in Y/foo.dsc itself redirects to location X/foo.dsc, will dget try and find the files it refers to under Y or X?

Revision history for this message
William Grant (wgrant) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Reis wrote:
> So to confirm: if the DSC in Y/foo.dsc itself redirects to location
> X/foo.dsc, will dget try and find the files it refers to under Y
> or X?

I've just tested this, and it looks under where it was redirected from
(ie. Y), not the destination, which likely makes things significantly
easier for you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVLMAAc+S8KckfcURAn6UAJ4nfr7aMQJX+rOC9p4snS9YkkhkfACeIO8J
nXd6LFIUvJ8hcOn7fInCUY8=
=kM+7
-----END PGP SIGNATURE-----

Revision history for this message
Christian Reis (kiko) wrote :

Cool, that's what I had assumed. This patch will land today and you'll
be able to use it on edge by tomorrow.

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

\o/

Well done kiko!

Revision history for this message
Christian Reis (kiko) wrote :

Landed in RF 5298. Edge should update tonight and if so please take a look at the package downloads (not PPAs or the upload queue; those are next) and see if they work. I'd love feedback!

Changed in soyuz:
status: In Progress → Fix Committed
Changed in soyuz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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