Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 10347
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Nicholas Jones (RETIRED) <carpaski@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: CJ Kucera <pez@apocalyptech.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
nofetch-portage.diff Diff of /usr/lib/python-2.2/site-packages/portage.py patch CJ Kucera 2002-11-06 16:25 0000 468 bytes Details | Diff
nofetch-ebuild.diff Diff of /usr/lib/portage/ebuild.sh patch CJ Kucera 2002-11-06 16:26 0000 416 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 10347 depends on: Show dependency tree
Bug 10347 blocks: 10350
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-11-06 16:13 0000
I was creating an ebuild today which requires the manual download of a package.
 I had a nice message that would display on src_unpack() which told the users
where to go to download the package, and all was well.  I was about to upload it
here when I noticed that the digest file was zero-length.  After playing around
with the ebuild a bit more, I found that the only way to get the digest file to
contain an accurate digest of the file was to add in the filename to SRC_URI.

Unfortunately, when there's anything in the SRC_URI function, Portage will try
to download the package, fail, and end with an error message.  I tried putting
my check for the file in both pkg_setup() and src_unpack(), to no avail.  Next,
I tried adding 'RESTRICT="fetch"' to the ebuild, but that only displays an
uninformative message telling the user to "look at the ebuild for details."

So, unless I'm missing something big, you can *either:*
  1) Have a digest for the to-be-manually-downloaded file, or
  2) Have a nice message to tell the user where to download the file from.

Ideally, I'd like to be able to do both.  I think that the nicest solution would
be to create another user-overrideable function along the lines of src_fetch(),
and then ebuild authors could put the necessary messages in there.  Or possibly,
change the behavior of setting RESTRICT="fetch" so that it executes a
src_nofetch() command from tthe ebuild . . .  There are probably some other
solutions as well.  Anyway, what does everyone think?

------- Comment #1 From CJ Kucera 2002-11-06 16:25:24 0000 -------
Created an attachment (id=5429) [details]
Diff of /usr/lib/python-2.2/site-packages/portage.py

I figured I might as well take a look to see how easy it would be to implement
something like this.  I'm probably doing a few things wrong here, but this
solution does work.

If RESTRICT="fetch" is defined in the ebuild, and the distfile is NOT present
in /usr/portage/distfiles, it'll execute the function "pkg_nofetch" (if it
exists) from the ebuild, wherein the ebuild author can provide a more
meaningful error message.  This patch I'm attaching now should be applied to
/usr/lib/python-2.2/site-packages/portage.py.  There's another patch which I'll
upload in a second which should be applied to /usr/lib/portage/bin/ebuild.sh.

------- Comment #2 From CJ Kucera 2002-11-06 16:26:16 0000 -------
Created an attachment (id=5430) [details]
Diff of /usr/lib/portage/ebuild.sh

This patch is for /usr/lib/portage/ebuild.sh.

Like I said, simple stuff, but it does work.  Let me know what I'm doing wrong.
 :)

------- Comment #3 From SpanKY 2003-01-08 13:53:20 0000 -------
ebuild.sh now supports pkg_nofetch

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug