Allow Launchpad Git URLs

Bug #1599125 reported by Daniel Holbach
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Won't Fix
Medium
Unassigned

Bug Description

Snapcraft should understand URLs of this format by default:

git://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm
git+ssh://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm
https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm

(Stolen from https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm)

Revision history for this message
Daniel Holbach (dholbach) wrote :

This is relevant in the parser: paste.ubuntu.com/18529081/

tags: added: bitesize
Simon Quigley (tsimonq2)
Changed in snapcraft:
assignee: nobody → Simon Quigley (tsimonq2)
status: New → In Progress
Revision history for this message
Simon Quigley (tsimonq2) wrote :

@Daniel git:// URLs should already be autodetected. For git+ssh:// URLs, I would like to see a use case of an anonymous clone of a source (which is what Snapcraft does) with that URL prefix, because imho it's not common enough (if even present) to autodetect.

As for https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm , we could have a solution of autodetecting http(s)://git* URLs. Another possibility would be to autodetect http(s)://git.launchpad.net* URLs, which I don't like because that would mean we have to add every exception out there to Snapcraft, which isn't feasable. So I would prefer the http(s)://git* solution.

Thoughts from anyone?

Revision history for this message
Daniel Holbach (dholbach) wrote :

I don't have much of an opinion on this one. It'd just be nice if all possible URLs advertised on LP (https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tpm) work automatically.

Leo Arias (elopio)
Changed in snapcraft:
status: In Progress → Triaged
importance: Undecided → Medium
assignee: Simon Quigley (tsimonq2) → nobody
tags: added: sources
Revision history for this message
mase (i-lp-f) wrote :
Download full text (3.5 KiB)

I noticed this is tagged with 'bitesize'. I'd like to attempt to resolve this one however I need a bit more info on how I can reproduce this.

I have cloned https://github.com/snapcore/snapcraft but I can't see the:

/bin/snapcraft-parser file listed in Daniels' pastebin entry.

Where does this come from ?

```daniel@daydream:/tmp/test$ ~/dev/snappy/snapcraft/bin/snapcraft-parser -d -i https://wiki.ubuntu.com/snapcraft/parts?action=raw
Processing part 'qt5conf'
Klone nach '/tmp/qt5conf' ...
1remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 4 (delta 0), pack-reused 0
Entpacke Objekte: 100% (5/5), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'qt4conf'
Klone nach '/tmp/qt4conf' ...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 2 (delta 0), pack-reused 0
Entpacke Objekte: 100% (5/5), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'gtkconf'
Klone nach '/tmp/gtkconf' ...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
^Tremote: Total 5 (delta 0), reused 4 (delta 0), pack-reused 0
Entpacke Objekte: 100% (5/5), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'curl'
Klone nach '/tmp/curl' ...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 3 (delta 0), pack-reused 0
Entpacke Objekte: 100% (4/4), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'mqtt-paho'
Klone nach '/tmp/mqtt-paho' ...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Entpacke Objekte: 100% (3/3), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'ffmpeg'
Klone nach '/tmp/ffmpeg' ...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Entpacke Objekte: 100% (4/4), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'desktop'
Klone nach '/tmp/desktop' ...
remote: Counting objects: 36, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 36 (delta 5), reused 24 (delta 2), pack-reused 0
Entpacke Objekte: 100% (36/36), Fertig.
Prüfe Konnektivität ... Fertig.
Processing part 'tpm-tools'
Traceback (most recent call last):
  File "/home/daniel/dev/snappy/snapcraft/bin/snapcraft-parser", line 29, in <module>
    snapcraft.internal.parser.main()
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/internal/parser.py", line 77, in main
    return run(args)
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/internal/parser.py", line 248, in run
    master_parts_list = _process_index(output)
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/internal/parser.py", line 222, in _process_index
    parts_list, after_parts = _process_entry(data)
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/internal/parser.py", line 182, in _process_entry
    sources.get(origin_dir, None, options)
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/internal/sources.py", line 352, in get
    handler_class = _get_source_handler(source...

Read more...

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

we have source-type for this

Changed in snapcraft:
status: Triaged → Won't Fix
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.