On Fri, May 20, 2005 at 05:38:47PM +0200, Sebastien J. Gross wrote:
> On Fri, May 20, 2005 at 04:09:15PM +0200, [EMAIL PROTECTED] wrote:
> > Package: apt-file
> > Version: N/A; reported 2005-05-20
> > Severity: important
> > 
> > apt-file should provide sane defaults:
> 
> And user can read recommandations.

Still, I cannot understand why you cannot provide 2 standard lines:

wget_config=
curl_config=
pref_downloader=""

in the config file, and then 

if [ pref_downloader = "" ]; then
        if -x /usr/bin/wget
                pref_downloader=wget
        elseif -x /usr/bin/curl
                pref_downloader=curl
        fi
else
        use the other downloader
fi

Is that such a difficult code to write?

> > 1. should depend on wget | curl
> 
> Neigther wget nor curl are the only download tools

No, they are not, but they are wide and used enough that 90% of the users have
at least one of them. And having wget installed, it is a fscking no-brainer to
use it, instead of spitting an error saying that curl is not found.

Besides, apt-file is not a tool to have in a firewall/embeded/(put here your
favorite small footprint system installation), where you want to keep things
to a minimum, but to develop or to find a file in a debian package/repository.

433322 bytes occupied by wget are worth having them installed and used without
having to poke in the config file.

> If a user change its configuration and do not want neighter wget nor
> curl on is system, apt-file would be removed, which is a VERY BAD THING.

Then do not depend on any of them, but DO USE THE ONE THAT IS INSTALLED.

> >  (A way to do it would be to hardcode the curl | wget command lines in
> >  apt-file and 
> >  $c_retrieval= ( $conf::c_retrieval ? $conf::c_retrieval : 
> > $main::c_retrieval)
> >  and then find if we must use wget or curl:
> >  if -f /usr/bin/wget : $retrieval = $c_retrieval )
> 
> Hardcoding values is much worst than not providing them, this prevents
> from easy changes.

You can hardcode the default values in the binary (script) and override the
defaults if the user has configured some in the config file. That is an easy
change. For instance, abcde uses more than 10 different tools, and the default
values are in the abcde script, yet the user can override any of the binaries
and options for each binary in the config file.

> >  2.2 if the user has customised the command lines, use those provided
> 
> That's why a configuration file is done for.

Yet you dont use wget if it is already installed in the system. Not even with
some sane defaults defined by you.

> > 3. get a more comprehensive error message regarding the need of a retrieval
> > tool
> > 
> > Right now, apt-file is unusable out of the box, and it would not be so
> > difficult to make it.
> 
> Then user simply have to read information:
>       1/ in the package description: «Please read README file for curl
>          or wget instructions.»
>       2/ in the README file: «
> Please note that curl is need with _THIS_ configuration file only
> If you prefer using wget, it's up to you but you _MUST_ change the
> chanfinguration file according to your choice.
> This explains why nor wget nor curl are in the package dependances but
> on recommends.
> »

Yeah. You are so damn thickheaded that you preffer the user to read and
change a configuration file than adding some 10 lines of code to use wget with
some usable defaults and allow apt-file to work if wget is installed
out-of-the-box.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=307833&msg=19
http://bugs.debian.org/307833

I am not the first one opening such a trivial request and probably will not be
the last one.

> But now there are enougth warnings about the wget/curl dependences.

Sure:

lambert# apt-file update
sh: curl: command not found

Thanks.

-- 
Jesus Climent                                      info:www.pumuki.org
Unix SysAdm|Linux User #66350|Debian Developer|2.6.10|Helsinki Finland
GPG: 1024D/86946D69 BB64 2339 1CAA 7064 E429  7E18 66FC 1D7F 8694 6D69

I say you are Lord, and I should know. I've followed a few.
                --Arthur (Life of Brian)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to