<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>164800</bug_id>
          
          <creation_ts>2007-02-01 09:37 0000</creation_ts>
          <short_desc>sys-apps/pciutils - make update-pciids quieter</short_desc>
          <delta_ts>2007-07-27 08:58:11 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>prote@fmi.uni-stuttgart.de</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>caguiar@madeiratecnopolo.pt</cc>
    
    <cc>gentoo-bugzilla@shimi.net</cc>
    
    <cc>gentoobugs@hayward.uk.com</cc>
    
    <cc>jkt@gentoo.org</cc>
    
    <cc>sven.koehler@gmail.com</cc>
    
    <cc>toralf.foerster@gmx.de</cc>

      

      
          <long_desc isprivate="0">
            <who>prote@fmi.uni-stuttgart.de</who>
            <bug_when>2007-02-01 09:37:30 0000</bug_when>
            <thetext>On machines that have not installed some of the tools (e.g. curl) checked in
/etc/cron.monthly/update-pciids the cron daemon sends me the warning
  which: no curl in (/sbin:/bin:/usr/sbin:/usr/bin)

Fix: In /usr/sbin/update-pciids all
  which curl &gt;/dev/null
etc. should be changed to
  which curl &gt;/dev/null 2&gt;&amp;1

Reproducible: Always</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>prote@fmi.uni-stuttgart.de</who>
            <bug_when>2007-02-01 09:57:27 0000</bug_when>
            <thetext>And a second thing:
I don&apos;t call it a bug but I would prefer /etc/cron.monthly/update-pciids to
work silent if no error occurs. So I suggest adding the switches
  -q/--quiet    to wget
  -s/--silent   to curl
in /usr/sbin/update-pciids.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-02-01 16:04:51 0000</bug_when>
            <thetext>*** Bug 164859 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-02-10 00:30:29 0000</bug_when>
            <thetext>added a -q flag and the cronjob now uses it</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>prote@fmi.uni-stuttgart.de</who>
            <bug_when>2007-02-12 11:26:31 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; added a -q flag and the cronjob now uses it
Sorry! But that only removes the statistics of curl or wget. I still get
  # /usr/sbin/update-pciids -q
  which: no curl in (/sbin:/usr/sbin:...)
on machines without curl. I think there is no sense in telling me that I haven&apos;t tool A on my machine if an alternative tool B is used anyway.

So all the &quot;which tool &gt;/dev/null&quot; in /usr/sbin/update-pciids should be changed to &quot;which tool &gt;/dev/null 2&gt;&amp;1&quot; and only if none of the alternative tools is found an error should be reported.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-02-14 22:44:55 0000</bug_when>
            <thetext>give 2.2.4-r2 a spin eh</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flophousejoe-gentoo-bugzilla-ehx@halibutdepot.org</who>
            <bug_when>2007-02-22 01:32:37 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; give 2.2.4-r2 a spin eh

SpanKY: Yes, the new update-pciids is nice and quiet.  It doesn&apos;t cause unnecessary mail to be sent from the cron job.  Thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>prote@fmi.uni-stuttgart.de</who>
            <bug_when>2007-02-22 08:59:09 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; give 2.2.4-r2 a spin eh
&gt; 

Sorry, it&apos;s me again! And I once again reopened this bug because I still get
  # /usr/sbin/update-pciids -q
  which: no curl in (/sbin:/usr/sbin:...)
on machines without curl. &quot;which curl &gt;/dev/null&quot; (and all the other &quot;which ...&quot;)
was changed to &quot;which curl &gt;&amp;2 &gt;/dev/null&quot;. I&apos;m not an bash expert but isn&apos;t this:
  Duplicate stdout to stderr and redirect stdout to /dev/null.
And so stderr still is not sent to /dev/null.

As there is no executable &quot;tool&quot; on my machine I experimented a bit:
a) My original suggestion:
# which tool &gt;/dev/null 2&gt;&amp;1
# 
b) The current version:
# which tool &gt;&amp;2 &gt;/dev/null
which: no tool in (/sbin:/usr/sbin:...)
c) Alternative solution:
# which tool &gt;&amp;2 2&gt;/dev/null
# 

So maybe just a forgotten &apos;2&apos; at the first &apos;2&gt;/dev/null&apos; and the copy-and-paste?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tonich@artparade.ru</who>
            <bug_when>2007-04-12 15:49:09 0000</bug_when>
            <thetext>I think a very bad idea to activate by default ANY script that uploads that either from the Internet to your computer. In installation phase package should report about that feature, but did not activate it by default.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tonich@artparade.ru</who>
            <bug_when>2007-04-12 15:58:32 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; I think a very bad idea to activate by default ANY script that uploads that
&gt; either from the Internet to your computer. In installation phase package should
&gt; report about that feature, but did not activate it by default.
&gt; 

--- /root/update-pciids.orig    2007-04-12 19:55:07.000000000 +0400
+++ /etc/cron.monthly/update-pciids       2007-04-12 19:55:50.000000000 +0400
@@ -1,2 +1,9 @@
 #!/bin/sh
-exec /usr/sbin/update-pciids
+
+if [ -e /etc/conf.d/pciutils ]; then
+. /etc/conf.d/pciutils
+fi
+
+if [ &quot;$PCIUTILS_UPDATE_IDS&quot; == &quot;yes&quot; ]; then
+       exec /usr/sbin/update-pciids
+fi
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-04-13 09:22:31 0000</bug_when>
            <thetext>this bug has nothing to do with the network issue</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-04-13 09:34:52 0000</bug_when>
            <thetext>fixed quiet issue in 2.2.4-r3</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>prote@fmi.uni-stuttgart.de</who>
            <bug_when>2007-04-13 10:15:01 0000</bug_when>
            <thetext>Now I like it.
Many thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-06-01 09:43:37 0000</bug_when>
            <thetext>*** Bug 180530 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo-bugzilla@shimi.net</who>
            <bug_when>2007-06-01 10:20:14 0000</bug_when>
            <thetext>
Since my bug was dup&apos;d against this bug, is there any chance that the newer package that doesn&apos;t have the bug, will be marked stable if that&apos;s the only change, or for the very least, an -r3 will be provided for 2.2.3 to fix this? After all, this bug is there for 4 months now...

Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-06-01 14:36:42 0000</bug_when>
            <thetext>it&apos;s been around long enough, we can stabilize ... i&apos;ll file a stabilization bug</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-06-18 13:19:14 0000</bug_when>
            <thetext>*** Bug 182439 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-07-27 08:58:11 0000</bug_when>
            <thetext>*** Bug 186764 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
    </bug>

</bugzilla>