[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: netpbm vs. pbmplus



On Thu, 25 Jan 1996 Dirk.Eddelbuettel@qed.econ.queensu.ca wrote:

>   Chris>  Didn't you see my example of the Slackware sysadmin who would
>   Chris> rather ftp /usr/bin/netpbm.tar from a Debian box rather than
>   Chris> recompile from source?  Organized subdirectories make many things
>   Chris> easier, add flexibility, and make the system easier to explore.
> 
> That example didn't cut it in the first place. So now as you
> keep recalling it, here's my counter example: ever done "dpkg -L
> package"? Why don't you feed that into tar (maybe filter directories
> out)?

So how would you filter directories out?  

There's no certain way of distinguising a directory from a file.
Without certainty you're risking either missing some files or
incorrectly including an entire directory.

e.g. here's the output of 'dpkg -L par', a small package to serve as an
example:

/.
/usr
/usr/doc
/usr/doc/copyright
/usr/doc/copyright/par
/usr/doc/par
/usr/doc/par/par.doc
/usr/bin
/usr/bin/par


Which lines are the directories?  What algorithm do you use to identify
them?

"/." is the only line which can be eliminated immediately...the rest
could be either files or directories.  The only way to tell would be to
build up a tree in memory and check each input line against that tree.

Even so, that wouldn't pick up directory stubs - empty directories
created by the package (for whatever reason).  How would you identify
those as directories?


Craig

--
  cas@muffin.pronet.com                                cas@muffin.apana.org.au
   *       Unix Consulting:  Installation, Configuration, & Support.        *
   * --- Also, contact me if you need your Dos/Win/OS2 LAN connected to --- *
   * --- the Internet.                                                  --- *



Reply to: