Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 354463 - lyaman don't check for errors when cloning [git] repository
Summary: lyaman don't check for errors when cloning [git] repository
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Brian Dolbec (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 11:37 UTC by Vladimir
Modified: 2011-02-11 16:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir 2011-02-11 11:37:21 UTC
The command reports about successfull addition of new overlay
when it was failed to obtain. Example below:

* Running... # /usr/bin/git clone git://git.overlays.gentoo.org/proj/kde-sunset.git /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
git.overlays.gentoo.org[0: 66.219.59.40]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
* Running... # /usr/bin/git clone http://git.overlays.gentoo.org/gitroot/proj/kde-sunset.git/ /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
* Successfully added overlay "kde-sunset".


Reproducible: Always

Steps to Reproduce:
1.Disable access to repository layman wants to acess (using firewall or just being offline)
2. Try to add new overlay
3. See the result: success

Actual Results:  
add overlay command finished successfuly

Expected Results:  
An error displayed about inability of layman to access remote service
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2011-02-11 15:49:56 UTC
From a little testing I've done.  I was able to reproduce similar results by doing a conrtol-C during the clone.  It then proceeded to use the next source listing and successfully clone kde-sunset.

Looking at your output, it did the same for you, so it did succeed and correctly report that.

However, I will add some extra info printed before it tries any of the other sources to indicate that it is trying again.

big_daddy portage # layman -a kde-sunset
* Running... # /usr/bin/git clone git://git.overlays.gentoo.org/proj/kde-sunset.git /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
remote: Counting objects: 7665, done.
remote: Compressing objects: 100% (3794/3794), done.
^C* Interrupted manually(6439/7665), 2.87 MiB | 13 KiB/s      
* Running... # /usr/bin/git clone http://git.overlays.gentoo.org/gitroot/proj/kde-sunset.git/ /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
* Successfully added overlay "kde-sunset".
big_daddy portage #
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2011-02-11 16:07:15 UTC
Vladimir, which layman version do you use?
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2011-02-11 16:20:38 UTC
Ignore my last comment..

Layman tries 3 different protocols for git.
1) git://
2) http://
3) git+ssh://

In your case it tries git:// first, this fails due to your firewall restrictions.
As next it tries http:// which was successfully so it added the kde-sunset overlay successfully as well.

It will not add the overlay if all 3 protocols failed:
layman -a kde-sunset
* Running... # /usr/bin/git clone git://git.overlays.gentoo.org/proj/kde-sunset.git /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
git.overlays.gentoo.org[0: 192.168.1.55]: errno=No route to host
fatal: unable to connect a socket (No route to host)
* Running... # /usr/bin/git clone http://git.overlays.gentoo.org/gitroot/proj/kde-sunset.git/ /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
error: Failed connect to git.overlays.gentoo.org:80; Operation now in progress while accessing http://git.overlays.gentoo.org/gitroot/proj/kde-sunset.git/info/refs

fatal: HTTP request failed
* Running... # /usr/bin/git clone git+ssh://git@git.overlays.gentoo.org/proj/kde-sunset.git /var/lib/layman/kde-sunset
Cloning into /var/lib/layman/kde-sunset...
ssh: connect to host git.overlays.gentoo.org port 22: No route to host
fatal: The remote end hung up unexpectedly
* Failed to add overlay "kde-sunset".
* Error was: Adding overlay "kde-sunset" failed!