View previous topic :: View next topic |
Author |
Message |
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Thu Jan 27, 2011 7:51 pm Post subject: patch fails in ebuild, not by hand |
|
|
I'd like to have an ebuild download say, mirror://gentoo//gcc-core-${SOMEVERSION}.tar.bz2 but if it isn't present on any mirrors, have that satisfied by downloading (either through emerge or with a fetch restriction) http://vendor.org/downloads/gcc_with_a_different_name.tgz
Anyone know how to do this?
see below for the current patch issue
Last edited by redgsturbo on Mon Jan 31, 2011 11:35 pm; edited 2 times in total |
|
Back to top |
|
|
[n00b@localhost] Apprentice
Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Thu Jan 27, 2011 8:31 pm Post subject: |
|
|
I don't think you can currently.
If a file is present on a vendor's website with a particular name, it should also have that name on all the gentoo mirrors. Emerge will automatically try all the mirrors and if it can't find the file on any revert to downloading from the vendor's website.
I am struggling to see where this would be useful. Could you give an example? |
|
Back to top |
|
|
phajdan.jr Retired Dev
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Thu Jan 27, 2011 8:50 pm Post subject: |
|
|
I think you can download the file manually and put it inside /usr/portage/distfiles with a different name. _________________ http://phajdan-jr.blogspot.com/ |
|
Back to top |
|
|
Mousee Apprentice
Joined: 29 Mar 2004 Posts: 291 Location: Illinois, USA
|
Posted: Thu Jan 27, 2011 8:56 pm Post subject: |
|
|
If you modify the ebuild yourself and toss it into a local overlay, or if you're just creating an ebuild for an app not in portage already, you would just set the SRC_URI (in the ebuild) to whatever upstream's download URI is ("http://vendor.org/downloads/gcc_with_a_different_name.tgz" in your example). The ebuild will first attempt to fetch from upstream and, if that fails, check the gentoo mirrors next.
Otherwise if you're trying to do this for packages in portage without modifying them as I explained above - then I'm unaware of any method for doing so, and I'm fairly certain one doesn't exist as you'd still have to have a coded SRC_URI for upstream, which not all packages have (several fetch purely from the mirrors). |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Thu Jan 27, 2011 10:11 pm Post subject: |
|
|
the reason is I need core gcc stuff to add in ada.
1. gcc-core-X.X.X is less than half the size of regular gcc <- current way its done
2. if a given gcc-core doesn't exist I'd like to revert to the vendor gcc package, or the full blown gcc which should still work <- fall back if there is no core, however probably the better way anyway... less tarballs to maintain |
|
Back to top |
|
|
[n00b@localhost] Apprentice
Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Thu Jan 27, 2011 11:00 pm Post subject: |
|
|
If I understand you correctly could you not just create a gcc-core ebuild and have gcc-ada depend on either like Code: | DEPEND="|| (sys-devel/gcc-core sys-devel/gcc)" | ? |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Fri Jan 28, 2011 4:05 pm Post subject: |
|
|
[n00b@localhost] wrote: | If I understand you correctly could you not just create a gcc-core ebuild and have gcc-ada depend on either like Code: | DEPEND="|| (sys-devel/gcc-core sys-devel/gcc)" | ? |
I believe that is what I was looking for. Can I assume that will attempt to satisfy the first argument first?
Crap wait... now I need something like Code: | SRC_URI="|| (sys-devel/gcc-core sys-devel/gcc)" |
Will that work? I need the sources, not the compiled code |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9530 Location: beyond the rim
|
Posted: Fri Jan 28, 2011 8:23 pm Post subject: |
|
|
redgsturbo wrote: | Crap wait... now I need something like Code: | SRC_URI="|| (sys-devel/gcc-core sys-devel/gcc)" |
Will that work? |
No, it won't work. Even if it would work you'd have problems in src_unpack as you wouldn't know which tarball was fetched. |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Fri Jan 28, 2011 10:20 pm Post subject: |
|
|
Genone wrote: | redgsturbo wrote: | Crap wait... now I need something like Code: | SRC_URI="|| (sys-devel/gcc-core sys-devel/gcc)" |
Will that work? |
No, it won't work. Even if it would work you'd have problems in src_unpack as you wouldn't know which tarball was fetched. |
I can address that though (already taken care of in eclass)
Current problem:
"by hand install" I'd do this
Code: | # cd gcc-src
gcc-src # patch -p0 < ../gnat-src/gcc-patch.dif | and it works ask expected patching files in the ./gcc src directory, however trying to accomplish in the ebuild... some patch hunks claim to apply, some fail. However if I go into the directory and manually patch after an emerge failure, everything patches perfectly and nothing seems to have been patched... printing out directories and such everything seems to be correct, and its definitely finding the patch, and the patch is definitely good. the log claims to have saved rejects to file.rej, but I can find no such files |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Mon Jan 31, 2011 10:39 pm Post subject: patch fails in ebuild, not by hand |
|
|
Is there any reason why a patch command, executed exactly is listed in the enviroment file of the portage tmp dir, would work, where it fails during the emerge? Very strange behaviour. Some hunks succeed, some fail. Immediatly following the emerge failure, I can move into the temp dir and patch the file with out error. Any thoughts?? |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Tue Feb 01, 2011 12:49 am Post subject: |
|
|
also, if I patch manually, zip up, and take the patch logic out of the ebuild, everything works flawlessly |
|
Back to top |
|
|
redgsturbo Apprentice
Joined: 24 Jun 2005 Posts: 283
|
Posted: Tue Feb 01, 2011 9:01 pm Post subject: |
|
|
no joy?
currently if you install gnat-gcc, it downloads the appropriate gcc-core, and then adds gcc-ada, patches, and builds. emergeing gnat-gpl fetches a gcc/adacore ada source and patchset tarball already applied. This means more packages to distribute and maintain that aren't needed, and further, gnat-gpl's sources will apply to gcc-4.3 or gcc-4.5, the only difference being the gcc you fetch and the patches you apply. The modular design I'm working on is more efficient, and easer to maintain as the versions progress...
I already have a perfect gnat-gpl-4.3.6.2010, but I want to fix it right and then submit. But, I need help with this patching issue. Nothing in the logs, environment, or process are sticking out |
|
Back to top |
|
|
|