Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 403841

Summary: dev-embedded/openocd-9999 - refactor and improve device support
Product: Gentoo Linux Reporter: Edwin Peer <edwin>
Component: New packagesAssignee: Markos Chandras (RETIRED) <hwoarang>
Status: RESOLVED FIXED    
Severity: normal CC: dev-embedded+disabled, peter, rainhead
Priority: Normal Keywords: EBUILD, PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=441856
https://bugs.gentoo.org/show_bug.cgi?id=469592
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: the ebuild
new USE flag descriptions
the ebuild diff

Description Edwin Peer 2012-02-15 08:39:58 UTC
Created attachment 302011 [details]
the ebuild

This new ebuild refactors the USE flags and handles the devices supported by OpenOCD in a more sane manner.

Before the changes, arbitrary devices were enabled by default and others were grouped together under the usb USE flag (removed) while some had their own individual USE flags. 

Now, each JTAG programmer gets its own USE flag and is treated in the same manner. In future, it might be an idea to investigate a USE_EXPAND for these optional hardware drivers.

This ebuild also supports the verbose configuration options that were not exposed before.

These changes include those in bug 403789.
Comment 1 Edwin Peer 2012-02-15 08:42:22 UTC
Created attachment 302013 [details]
new USE flag descriptions
Comment 2 Edwin Peer 2012-02-15 08:54:53 UTC
Created attachment 302015 [details]
the ebuild diff
Comment 3 Peter Stuge 2012-02-15 20:08:06 UTC
No please do not commit this as-is!

Both ebuild and metadata need significant cleanup. The metadata is full of typos and many USE flags are very poorly named.

The ebuild has incorrect dependencies in particular for libusb because the OpenOCD libusb situation is a mess. I'm the maintainer of libusb as well as one of the maintainers of OpenOCD.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-02-15 21:18:50 UTC
*** Bug 403789 has been marked as a duplicate of this bug. ***
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-02-15 21:20:39 UTC
(In reply to comment #3)
> No please do not commit this as-is!
> 
> Both ebuild and metadata need significant cleanup. The metadata is full of
> typos and many USE flags are very poorly named.
> 
> The ebuild has incorrect dependencies in particular for libusb because the
> OpenOCD libusb situation is a mess. I'm the maintainer of libusb as well as one
> of the maintainers of OpenOCD.

ACK. Feel free to submit a better patch
Comment 6 Edwin Peer 2012-02-16 05:07:08 UTC
(In reply to comment #4)

> *** Bug 403789 has been marked as a duplicate of this bug. ***

Since this patch isn't going to be accepted without a lot more work, could you commit the ebuild in bug #403789? The changes in that one are non-intrusive and are certainly no worse that what's currently in the repository, but at least it solves my problem (and anyone else who's trying to use an ST-LINK adapter).
Comment 7 Edwin Peer 2012-02-16 05:10:52 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > No please do not commit this as-is!
> > 
> > Both ebuild and metadata need significant cleanup. The metadata is full of
> > typos and many USE flags are very poorly named.
> > 
> > The ebuild has incorrect dependencies in particular for libusb because the
> > OpenOCD libusb situation is a mess. I'm the maintainer of libusb as well as one
> > of the maintainers of OpenOCD.
> 
> ACK. Feel free to submit a better patch

I don't know a lot about OpenOCD internals, so I'm not able to do much better. 

I'd argue that what I've submitted is better than what was there to start with so why can't we take an incremental path to get there and commit it as is?

Regarding the naming of the USE flags, I'd agree. I was just trying to follow the trend that had already been established in the existing ebuild.
Comment 8 Edwin Peer 2012-02-16 05:33:31 UTC
(In reply to comment #7)

> I don't know a lot about OpenOCD internals, so I'm not able to do much better. 

That is, I don't know what the issues with OpenOCD and libusb are. I simply assumed that if it was a USB adapter that it had a dependency on libusb. If someone can explain where the issues are, perhaps I can fix the ebuild accordingly.
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-08-17 22:24:49 UTC
I just bumped 0.6.0_rc1 so let me have a look at this patch again
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2012-09-29 09:54:42 UTC
So is anyone willing to submit a better patch?
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2012-09-29 09:55:47 UTC
*** Bug 305805 has been marked as a duplicate of this bug. ***
Comment 12 Peter Stuge 2012-09-29 10:58:02 UTC
(In reply to comment #10)
> So is anyone willing to submit a better patch?

Sure, in principle I am, but I have not found time to do it yet and I don't know when I will.

I hope that's not a reason to commit the proposed ebuild though; as I wrote the dependencies are plain incorrect.

Edwin, even if you don't know OpenOCD internals you can still look at configure.ac to find out what the actual dependencies are for each respective programmer. IMO it's not so cool to ask that someone else does that for you.
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2012-09-29 11:02:35 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > So is anyone willing to submit a better patch?
> 
> Sure, in principle I am, but I have not found time to do it yet and I don't
> know when I will.
> 
> I hope that's not a reason to commit the proposed ebuild though; as I wrote
> the dependencies are plain incorrect.
> 
> Edwin, even if you don't know OpenOCD internals you can still look at
> configure.ac to find out what the actual dependencies are for each
> respective programmer. IMO it's not so cool to ask that someone else does
> that for you.

No I won't commit the attached patch. I was kinda hoping to apply these fixes to the upcoming 0.6.0 ebuild but I guess I can do that in a future revision.
Comment 14 Markos Chandras (RETIRED) gentoo-dev 2012-11-05 11:09:19 UTC
0.6.1 is out so I will probably commit one based on the latest 0.5.X ebuild for now
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2013-05-24 22:19:45 UTC
I committed an updated 9999 ebuild that should enable most of the adapters by default. I need to do some more testing before I close this bug.
Comment 16 Markos Chandras (RETIRED) gentoo-dev 2013-05-25 09:13:38 UTC
Lets mark this as fixed now