This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cyginstall - /etc/setup/$pkg.lst.gz content


I'm just writing a cmdline tool in perl for faster setup for the power-user. It's named cyginstall and has the usual rpm options
and the smart features. It can not bootstrap a fresh cygwin install of course, as it requires cygwin perl bash gzip coreutils tar.


Problem:
/etc/setup/$pkg.lst.gz contains dirs also, as with
`tar xfvj $tar | gzip -c /etc/setup/$pkg.lst.gz`

I can handle that, but I wonder if I should just write the existing files and symlinks, not the dirs, so that the uninstall somewhen in the future is simplier and setup has less to do.
i.e.
install:
/usr/bin/tar xvfj $tar -C / |\
perl -ne'chomp; print "$_\n" if -f "/$_"' |\
gzip -c > /etc/setup/$name.lst.gz
test -e /etc/postinstall/$name.sh && \
(. /etc/postinstall/$name.sh;
mv /etc/postinstall/$name.sh /etc/postinstall/$name.sh.done)


Grossly simplified, without no lock handling, installed.db update and all the rest.

uninstall:
  test -e /etc/preremove/$name.sh && \
    (. /etc/preremove/$name.sh;
     mv /etc/preremove/$name.sh /etc/preremove/$name.sh.done)

  for f in `zcat /etc/setup/$name.lst.gz`; do
    test -f "/\$f" && rm "/\$f"
  done
=>
  pushd /
  rm `zcat /etc/setup/$pkg.lst.gz` 2>/dev/null
  popd

Can existing setup handle those /etc/setup/$pkg.lst.gz without dirs also?
I want to stay completely compatible with the existing setup database.

In work: http://rurban.xarch.at/software/cygwin/cyginstall
Usage sample: install all cygports gtk2 packages

$ cd /usr/src/down/ftp%3a%2f%2fsunsite.dk%2fprojects%2fcygwinports
$ find -name \*gtk2\*.tar.bz2 -a ! -path \*/_obsolete/\*  |\
  xargs cyginstall -U --test

I haven't coded the dependency resolution, downloading and mirror handling yet.
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]