Hello,

On antradienis 05 Sausis 2010 03:11:02 Joey Hess wrote:
> Modestas Vainius wrote:
> > Since options to debhelper commands can be passed via
> > DH_INTERNAL_OPTIONS, DH_OPTIONS and command line, the first two are
> > typically not visible in the logs. Invisibility of DH_INTERNAL_OPTIONS is
> > especially bad since dh puts "black magic" in there. To better expose
> > this, dh should print a final command line of dh_* commands as they are
> > executed.
> 
> I don't think that DH_OPTIONS is a problem since the maintainer
> determines it themselves.
> 
> > My previous patch proposed dh_* to print their command line by
> > themselves. Now I attach a proof of concept implementation (sequencer,
> > aka dh, and dh_command)
> 
> Wow, that's so complicated!

What in particular do you dislike about my proposal? I guess you want to get 
rid of pipe() and fork() complexity. Ok, I figure dh command can simply print 
to dup()ed STDERR fd of dh rather than let fork of dh do it. What is more, 
this way dh_command still does not pollute its own STDERR which is what I 
wanted to achieve with pipe() in the first place.

Or do you dislike how detection of valid options is done? IMHO, that code is 
not that complicated.

Anyway, I attach a modified version of dh-output (as explained above). Please 
note that a good part of the example is generation of random options which is 
redundant for real implementation.

Btw, have you tested your solution to -Bbuild (#541773) problem? I don't see 
how -O solves it. And my test confirms it does not:

make[1]: Leaving directory `/home/modax/src/kde/attica-0.1.1-1/build'           
                                                             
   dh_install -O-Bbuild                                                         
                                                             
   dh_installdocs -O-Bbuild                                                     
                                                             
   dh_installchangelogs -O-Bbuild                                               
                                                             
   dh_installexamples -O-Bbuild                                                 
                                                             
   dh_installman -O-Bbuild                                                      
                                                             
   dh_installcatalogs -O-Bbuild                                                 
                                                             
   dh_installcron -O-Bbuild                                                     
                                                             
   dh_installdebconf -O-Bbuild                                                  
                                                             
   dh_installemacsen -O-Bbuild                                                  
                                                             
   dh_installifupdown -O-Bbuild                                                 
                                                             
   dh_installinfo -O-Bbuild                                                     
                                                             
   dh_pysupport -O-Bbuild                                                       
                                                             
   dh_installinit -O-Bbuild                                                     
                                                             
   dh_installmenu -O-Bbuild                                                     
                                                             
   dh_installmime -O-Bbuild                                                     
                                                             
   dh_installmodules -O-Bbuild                                                  
                                                             
   dh_installlogcheck -O-Bbuild                                                 
                                                             
   dh_installlogrotate -O-Bbuild                                                
                                                             
   dh_installpam -O-Bbuild                                                      
                                                             
   dh_installppp -O-Bbuild                                                      
                                                             
   dh_installudev -O-Bbuild                                                     
                                                             
   dh_installwm -O-Bbuild                                                       
                                                             
   dh_installxfonts -O-Bbuild                                                   
                                                             
   dh_bugfiles -O-Bbuild                                                        
                                                             
   dh_lintian -O-Bbuild                                                         
                                                             
   dh_gconf -O-Bbuild                                                           
                                                             
   dh_icons -O-Bbuild                                                           
                                                             
   dh_perl -O-Bbuild                                                            
                                                             
   dh_usrlocal -O-Bbuild                                                        
                                                             
   dh_link -O-Bbuild                                                            
                                                             
   dh_compress -O-Bbuild                                                        
                                                             
   dh_fixperms -O-Bbuild                                                        
                                                             
   dh_strip -O-Bbuild                                                           
                                                             
   debian/rules override_dh_makeshlibs                                          
                                                             
make[1]: Entering directory `/home/modax/src/kde/attica-0.1.1-1'                
                                                             
dh_makeshlibs -V 'libattica0 (>=0.1.1)'                                         
                                                             
dpkg-gensymbols: unknown option `ild'                                           
                                                             

Usage: dpkg-gensymbols [<option> ...]

Options:
  -p<package>              generate symbols file for package.
  -P<packagebuilddir>      temporary build dir instead of debian/tmp.
  -e<library>              explicitely list libraries to scan.
  -v<version>              version of the packages (defaults to
                           version extracted from debian/changelog).
  -c<level>                compare generated symbols file with the
                           reference file in the debian directory.
                           Fails if difference are too important
                           (level goes from 0 for no check, to 4
                           for all checks). By default checks at
                           level 1.
  -I<file>                 force usage of <file> as reference symbols
                           file instead of the default file.
  -O<file>                 write to <file>, not .../DEBIAN/symbols.
  -O                       write to stdout, not .../DEBIAN/symbols.
  -t                       write in template mode (tags are not
                           processed and included in output).
  -d                       display debug information during work.
  -h, --help               show this help message.
      --version            show the version.
dh_makeshlibs: dpkg-gensymbols -plibattica0 -Idebian/libattica0.symbols -
Pdebian/libattica0 ild returned exit code 2
make[1]: *** [override_dh_makeshlibs] Error 2
make[1]: Leaving directory `/home/modax/src/kde/attica-0.1.1-1'
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 
2


The problem here is bundling. So the solution would be to disable bundling 
while processing DH_INTERNAL_OPTIONS (assuming dh always passes through 
command options via DH_INTERNAL_OPTIONS, not only for overrides. Why not?). I 
think it's a good compromise that options passed through via dh cannot be 
bundled. -O does not help much in this case and just clutters output.

-- 
Modestas Vainius <[email protected]>

Attachment: dh-output-2.tar.gz
Description: application/compressed-tar

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to