Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287005 - net-print/hplip-3.9.8 - ebuild improvements
Summary: net-print/hplip-3.9.8 - ebuild improvements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-30 01:18 UTC by Daniel Pielmeier
Modified: 2009-10-14 18:03 UTC (History)
4 users (show)

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


Attachments
hplip-3.9.8-r1.diff (hplip-3.9.8-r1.diff,7.33 KB, patch)
2009-09-30 01:18 UTC, Daniel Pielmeier
Details | Diff
metadata.diff (metadata.diff,1.99 KB, patch)
2009-09-30 01:19 UTC, Daniel Pielmeier
Details | Diff
hplip-3.9.8-r1.diff (hplip-3.9.8-r1.diff,7.35 KB, patch)
2009-09-30 12:27 UTC, Daniel Pielmeier
Details | Diff
metadata.diff (metadata.diff,1.75 KB, patch)
2009-10-10 00:42 UTC, Daniel Pielmeier
Details | Diff
hplip-3.9.8-r1.diff (hplip-3.9.8-r1.diff,10.43 KB, patch)
2009-10-10 00:46 UTC, Daniel Pielmeier
Details | Diff
hplip-3.9.8-r1.ebuild (hplip-3.9.8-r1.ebuild,7.26 KB, text/plain)
2009-10-10 00:47 UTC, Daniel Pielmeier
Details
hplip-3.9.8-r1.diff (hplip-3.9.8-r1.diff,10.35 KB, text/plain)
2009-10-10 01:16 UTC, Daniel Pielmeier
Details
hplip-3.9.8-r1.ebuild (hplip-3.9.8-r1.ebuild,7.26 KB, patch)
2009-10-10 01:16 UTC, Daniel Pielmeier
Details | Diff
hplip-3.9.8-r1.diff (hplip-3.9.8-r1.diff,10.38 KB, patch)
2009-10-10 03:27 UTC, Daniel Pielmeier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pielmeier gentoo-dev 2009-09-30 01:18:28 UTC
The hplip ebuild needs some love. The attached ebuild is completely untested. I add it here to let others know I am currently working on it.

The main issue is that there are now two drivers (hpcups and hpijs). For both it is possible to use static or dynamic PPD's [1]. The current ebuild does not reflect this properly. It recommends USE="cups -cupsddk -ppds" this will result in disabling both the static and dynamic ppds for hpcups and hpijs (--disable-foomatic-ppd-install --disable-foomatic-drv-install --disable-cups-ppd-install --disable-cups-drv-install). With this configuration printing was not possible here. It took me some time to find out that I need USE="cups cuppsddk" to get the full functionality back.

To simplify things I have removed the minimal USE flag for the time being.

[1] http://hplipopensource.com/hplip-web/release_notes.html
See Release notes for 3.9.6 which explain the possible combinations for both drivers.
Comment 1 Daniel Pielmeier gentoo-dev 2009-09-30 01:18:54 UTC
Created attachment 205633 [details, diff]
hplip-3.9.8-r1.diff
Comment 2 Daniel Pielmeier gentoo-dev 2009-09-30 01:19:09 UTC
Created attachment 205634 [details, diff]
metadata.diff
Comment 3 Daniel Pielmeier gentoo-dev 2009-09-30 12:27:22 UTC
Created attachment 205662 [details, diff]
hplip-3.9.8-r1.diff

Disable static use flag with use default. Remove traces of the former dynamic use flag.
Comment 4 Denis Dupeyron (RETIRED) gentoo-dev 2009-09-30 14:14:41 UTC
Daniel,

You're a developer now, so don't be shy. ;o) You should update your ebuild for the latest upstream version and commit it. If you want to discuss hplip you can also contact flameeyes (email is best) as he told me he wanted to clean that ebuild too. I should be able to help again on hplip in a few weeks.

Denis.
Comment 5 Daniel Pielmeier gentoo-dev 2009-09-30 14:44:14 UTC
(In reply to comment #4)
> Daniel,
> You're a developer now, so don't be shy. ;o) You should update your ebuild for
> the latest upstream version and commit it. If you want to discuss hplip you can
> also contact flameeyes (email is best) as he told me he wanted to clean that
> ebuild too. I should be able to help again on hplip in a few weeks.
> Denis.

I know :) I just want to share my work here to avoid doing things twice and everybody who is interested knows what is going on. This is why i CC'ed flameeyes here as I recognized he is interested in improving the ebuild.

The ebuild is not ready and untested and I don't have time to work on it in the next few days. So if anybody has further improvements or recommendations he can add them here. 

Good to hear you will be back soon. I have not much experience with hplip, plus I can only test printing stuff.
Comment 6 Matt Whitlock 2009-10-03 20:16:21 UTC
I'm trying to use the patched ebuild to install hplip-3.9.8, but cupsddk-1.2.3 won't install due to the following file collisions:

 * net-print/cups-1.4.1                                                  
 *      /usr/bin/ppdc                                                    
 *      /usr/bin/ppdhtml                                                 
 *      /usr/bin/ppdi                                                    
 *      /usr/bin/ppdmerge                                                
 *      /usr/bin/ppdpo                                                   
 *      /usr/include/cups/driver.h                                       
 *      /usr/libexec/cups/filter/commandtoescpx                          
 *      /usr/libexec/cups/filter/commandtopclx                           
 *      /usr/libexec/cups/filter/rastertoescpx                           
 *      /usr/libexec/cups/filter/rastertopclx                            
 *      /usr/share/man/man1/ppdc.1.bz2                                   
 *      /usr/share/man/man1/ppdhtml.1.bz2                                
 *      /usr/share/man/man1/ppdi.1.bz2                                   
 *      /usr/share/man/man1/ppdmerge.1.bz2                               
 *      /usr/share/man/man1/ppdpo.1.bz2                                  
 *      /usr/share/man/man5/ppdcfile.5.bz2                               

Should I file a separate bug report for this collision?
Comment 7 Matt Whitlock 2009-10-04 17:33:00 UTC
A note to whomever is working on this ebuild: You really need to add an einfo message to the ebuild telling the user that the "usb" CUPS back-end does NOT work with HPLIP and that they MUST use the "hp" back-end instead.  I've wasted two days trying to get my LaserJet 1012 to work with hpcups 3.9.8 until I finally decided to try the loser-friendly "hp-setup" program instead of adding the printer myself in CUPS.

An even better solution would be to have CUPS default to the "hp" back-end when adding an hpcups printer through its web interface.
Comment 8 Daniel Pielmeier gentoo-dev 2009-10-10 00:41:58 UTC
(In reply to comment #6)
> I'm trying to use the patched ebuild to install hplip-3.9.8, but cupsddk-1.2.3
> won't install due to the following file collisions:
> 
[snip]
> 
> Should I file a separate bug report for this collision?
> 

Looks more like a problem between cupsddk-1.2.3 and cups-1.4.1. Do you have the same problem with hplip-3.9.8 which is in the tree?

(In reply to comment #7)
> A note to whomever is working on this ebuild: You really need to add an einfo
> message to the ebuild telling the user that the "usb" CUPS back-end does NOT
> work with HPLIP and that they MUST use the "hp" back-end instead.  I've wasted
> two days trying to get my LaserJet 1012 to work with hpcups 3.9.8 until I
> finally decided to try the loser-friendly "hp-setup" program instead of adding
> the printer myself in CUPS.
> 
> An even better solution would be to have CUPS default to the "hp" back-end when
> adding an hpcups printer through its web interface.
> 

The elog from the ebuild already states you should use hp-setup when installing and upgrading hplip.
Comment 9 Daniel Pielmeier gentoo-dev 2009-10-10 00:42:59 UTC
Created attachment 206598 [details, diff]
metadata.diff
Comment 10 Daniel Pielmeier gentoo-dev 2009-10-10 00:46:28 UTC
Created attachment 206600 [details, diff]
hplip-3.9.8-r1.diff

Here is something i consider ready for tree inclusion. If you have time please take a look at it, maybe i got something wrong or things could be done better. If there are no remarks i will commit this ebuild in the next few days.
Comment 11 Daniel Pielmeier gentoo-dev 2009-10-10 00:47:45 UTC
Created attachment 206602 [details]
hplip-3.9.8-r1.ebuild

Here the complete ebuild to save the patching.
Comment 12 Matt Whitlock 2009-10-10 00:51:33 UTC
(In reply to comment #8)
> Looks more like a problem between cupsddk-1.2.3 and cups-1.4.1. Do you have the
> same problem with hplip-3.9.8 which is in the tree?

The hplip in the Portage tree doesn't require cupsddk, so no.  The existing
hplip ebuild has a dependency on cupsddk OR cups equal to or newer than 1.4. 
Maybe cupsddk functionality was merged into cups in version 1.4 and is no
longer needed separately?

> The elog from the ebuild already states you should use hp-setup when installing
> and upgrading hplip.

It'd be nice if it said why.  Linux users, especially Gentoo users, like to do
things the manual way, not via some luser-friendly, hold-my-hand wizard.  I'm
sure I could have set up my HP printer successfully through the CUPS interface
if I only knew I had to use the "hp" backend rather than the "usb" backend.
Comment 13 Daniel Pielmeier gentoo-dev 2009-10-10 01:16:02 UTC
Created attachment 206606 [details]
hplip-3.9.8-r1.diff

Use minimal mixed up.
Comment 14 Daniel Pielmeier gentoo-dev 2009-10-10 01:16:20 UTC
Created attachment 206607 [details, diff]
hplip-3.9.8-r1.ebuild
Comment 15 Daniel Pielmeier gentoo-dev 2009-10-10 01:36:22 UTC
(In reply to comment #12)
> The hplip in the Portage tree doesn't require cupsddk, so no.  The existing
> hplip ebuild has a dependency on cupsddk OR cups equal to or newer than 1.4. 
> Maybe cupsddk functionality was merged into cups in version 1.4 and is no
> longer needed separately?

But the old ebuild should have installed cupsddk. The recommended driver is now hpcups with dynamic ppds which needs cupsddk. In the new ebuild i removed the cups-1.4.1 dependency as stable cups-1.3.10 works fine for me.

> It'd be nice if it said why.  Linux users, especially Gentoo users, like to do
> things the manual way, not via some luser-friendly, hold-my-hand wizard.  I'm
> sure I could have set up my HP printer successfully through the CUPS interface
> if I only knew I had to use the "hp" backend rather than the "usb" backend.
> 

With cups interface you mean the webinterface?
If this is the case it looks to me as if the configuration is the same and equal in loser-friendliness compared to hp-setup.

If you think about lpadmin, i must confess that i have never used it myself.
Comment 16 Matt Whitlock 2009-10-10 01:42:50 UTC
(In reply to comment #15)
> But the old ebuild should have installed cupsddk. The recommended driver is now
> hpcups with dynamic ppds which needs cupsddk. In the new ebuild i removed the
> cups-1.4.1 dependency as stable cups-1.3.10 works fine for me.

What am I using right now?  I can print.

# emerge -ptv hplip cupsddk

These are the packages that would be merged, in reverse order:

Calculating dependencies ... done!
[ebuild  N    ] net-print/cupsddk-1.2.3  USE="-fltk" 0 kB
[ebuild   R   ] net-print/hplip-3.9.8  USE="cups dbus gtk ppds qt4 -cupsddk -doc -fax -minimal -parport -policykit -qt3 -scanner -snmp" 0 kB

> With cups interface you mean the webinterface?
> If this is the case it looks to me as if the configuration is the same and
> equal in loser-friendliness compared to hp-setup.

I must confess that I did mean the web interface.  Even so, I'd guess there might be people who would prefer to use lpadmin over hp-setup, particularly if their print server is headless.
Comment 17 Daniel Pielmeier gentoo-dev 2009-10-10 02:02:15 UTC
(In reply to comment #16)
> What am I using right now?  I can print.
> 
> # emerge -ptv hplip cupsddk
> 
> These are the packages that would be merged, in reverse order:
> 
> Calculating dependencies ... done!
> [ebuild  N    ] net-print/cupsddk-1.2.3  USE="-fltk" 0 kB
> [ebuild   R   ] net-print/hplip-3.9.8  USE="cups dbus gtk ppds qt4 -cupsddk
> -doc -fax -minimal -parport -policykit -qt3 -scanner -snmp" 0 kB

With this configuration i was not able to print on my Business Inkjet. The printer started with printing one line on the first paper (can not remember the contents) and then continued to pull through paper (without printing anything) until the tray got empty. Adding cupsddk to my use flags solved it. In the new ebuild i changed the use flags a bit which enables the default options as recommended by the hplip developers.
Comment 18 Matt Whitlock 2009-10-10 02:41:45 UTC
(In reply to comment #17)
> Adding cupsddk to my use flags solved it.

So should a separate bug report be filed about the collision so cupsddk-1.2.3 and cups-1.4.1 can be installed at the same time?
Comment 19 Daniel Pielmeier gentoo-dev 2009-10-10 03:27:13 UTC
Created attachment 206610 [details, diff]
hplip-3.9.8-r1.diff

(In reply to comment #18)
> So should a separate bug report be filed about the collision so cupsddk-1.2.3
> and cups-1.4.1 can be installed at the same time?

No, it looks like cupsddk has been merged into cups-1.4, as the cups-1.4 ebuilds are blocking cupsddk. I changed the dependencies to either use cupsddk or cups > 1.4.
Comment 20 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-14 15:43:11 UTC
Finally I found the time to test this, and it's now in tree, Daniel if you wish to add yourself as maintainer together with me and Denis, I have no problem and I'm pretty sure he has none either ;)
Comment 21 Daniel Pielmeier gentoo-dev 2009-10-14 18:03:35 UTC
(In reply to comment #20)
> Finally I found the time to test this, and it's now in tree, Daniel if you wish
> to add yourself as maintainer together with me and Denis, I have no problem and
> I'm pretty sure he has none either ;)
> 

Thanks for adding the ebuild and opening the keyword request. This was on my todo for yesterday, but it slipped through somehow :) I have added myself to the maintainers of hplip now.


I diffed your ebuild against mine.

Renaming static with static-ppds makes perfect sense. This makes the meaning of the flag more clear and it wont confuse with the static flag which is used for static linking.

You have added the foomatic use flag but if you look into the ebuild this flag is not mentioned anywhere. I tied the foomatic-filters dependency to the --enable-hpcups-install configure switch as only the hpijs driver needs foomatic-filters. The foomatic use flag should go into hplip-3.9.8 instead of the r1 I guess. I have changed this.


All in all I think the ebuild is in good shape now, besides the src_prepare part if we do not bring parts of this upstream it will grow ad infinitum

This is just nitpicking but we should use consistent syntax in metadata.xml. Use spaces or tabs for indention, line breaks at 80 chars or not, dots at the end of the description or not, etc...

Also someone should take a look at the open bugs. I can close the obvious ones which are at least 240660, 259763, 259820 and 286382.