Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebuild doesnt fetch file: wget does [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Fri Nov 30, 2012 4:17 pm    Post subject: ebuild doesnt fetch file: wget does [solved] Reply with quote

I've written an ebuild in a private overlay.

Code:

# xf86-video-sis671-0.10.3.ebuild

EAPI=4
inherit autotools

DESCRIPTION="SiS 671 video driver (derivate of xf86-sisimedia, latest tested
version). Module name is 'sisimedia'."

HOMEPAGE="http://aur.archlinux.org/packages.php?ID=34256"

BRANCH="sis-671-fix"
#SRC_URI="https://gitorious.org//${BRANCH}/archive-tarball/${P} -> ${P}.tgz"
SRC_URI="https://gitorious.org/${PN}/${BRANCH}/archive-tarball/${PV} ->
${P}.tgz"
S="${WORKDIR}/${PN}-${BRANCH}"

KEYWORDS="x86"
SLOT="0"

DEPEND="
        ~x11-base/xorg-drivers-1.12
        x11-proto/xf86dgaproto
        x11-libs/libdrm
        media-libs/mesa
"

src_prepare() {
        eautoreconf
}

src_configure() {
    econf --disable-static
}

When I run

ebuild xf86-video-sis671-0.10.3.ebuild fetch

Quote:

>>> Downloading 'http://distfiles.gentoo.org/distfiles/xf86-video-sis671-0.10.3.tgz'
--2012-11-30 17:12:24-- http://distfiles.gentoo.org/distfiles/xf86-video-sis671-0.10.3.tgz
Resolving distfiles.gentoo.org... 216.165.129.135, 140.211.166.134, 64.50.236.52, ...
Connecting to distfiles.gentoo.org|216.165.129.135|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-11-30 17:12:25 ERROR 404: Not Found.

>>> Downloading 'https://gitorious.org/xf86-video-sis671/sis-671-fix/archive-tarball/0.10.3'
--2012-11-30 17:12:25-- https://gitorious.org/xf86-video-sis671/sis-671-fix/archive-tarball/0.10.3
Resolving gitorious.org... 87.238.52.168
Connecting to gitorious.org|87.238.52.168|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://gitorious.org/xf86-video-sis671/sis-671-fix/trees/HEAD [following]
--2012-11-30 17:12:27-- https://gitorious.org/xf86-video-sis671/sis-671-fix/trees/HEAD
Reusing existing connection to gitorious.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 10732 (10K) [text/html]
Saving to: ‘/mnt/portage/distfiles/xf86-video-sis671-0.10.3.tgz’

100%[=================================================================================================================================================>] 10.732 --.-K/s in 0s

2012-11-30 17:12:28 (66,5 MB/s) - ‘/mnt/portage/distfiles/xf86-video-sis671-0.10.3.tgz’ saved [10732/10732]

!!! Fetched file: xf86-video-sis671-0.10.3.tgz VERIFY FAILED!
!!! Reason: Filesize does not match recorded size
!!! Got: 10732
!!! Expected: 670442
Refetching... File renamed to '/mnt/portage/distfiles/xf86-video-sis671-0.10.3.tgz._checksum_failure_.r7rww4'

!!! Couldn't download 'xf86-video-sis671-0.10.3.tgz'. Aborting.



On the other hand, there is no problem with:
wget https://gitorious.org/xf86-video-sis671/sis-671-fix/archive-tarball/xf86-video-sis671-0.10.3
Quote:
--2012-11-30 17:08:58-- https://gitorious.org/xf86-video-sis671/sis-671-fix/archive-tarball/xf86-video-sis671-0.10.3
Resolving gitorious.org... 87.238.52.168
Connecting to gitorious.org|87.238.52.168|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 670442 (655K) [application/x-gzip]
Saving to: ‘xf86-video-sis671-0.10.3’

100%[=================================================================================================================================================>] 670.442 604KB/s in 1,1s

2012-11-30 17:09:01 (604 KB/s) - ‘xf86-video-sis671-0.10.3’ saved [670442/670442]


Probably I am doing something wrong in the ebuild, but I have no idea what.
Any suggestions


Last edited by javeree on Mon Dec 03, 2012 11:11 am; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Fri Nov 30, 2012 4:57 pm    Post subject: Reply with quote

It is not possible to use a tarball from gitorious, since it is different on every download.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9523
Location: beyond the rim

PostPosted: Mon Dec 03, 2012 10:02 am    Post subject: Reply with quote

Also you're passing wget a different URL than used in the ebuild. The URL in the ebuild redirects to a HTML page.
Back to top
View user's profile Send private message
Cynede
Retired Dev
Retired Dev


Joined: 30 Nov 2012
Posts: 56

PostPosted: Mon Dec 03, 2012 11:02 am    Post subject: Reply with quote

Sure it will be better to for enduser to download archives but

I think that using git-2 eclass will be the best solution for case of using code from vcs hosting. (Specially if you have no place where to host it). (Maybe you can ask on bugs.gentoo.org if someone from developers can host and maintain it).

(For stabily builds you can still create tags and branches though.)
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Mon Dec 03, 2012 11:08 am    Post subject: Reply with quote

@Genone

You're correct, I somehow mixed up while translating the correct URL into ebuild variables.
Replacing the correct variables seems to work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum