[csw-users] bug in pkg-get

Klaus Heinz khfp.blastwave0704 at gmx.de
Fri Aug 29 08:50:36 CEST 2008


Hi,

I do not know whether this is a known issue, the bugtracking system requires a login even for read-only
access...

Using CSWpkgget 3.8.4 (hopefully the latest version) I see the following
behaviour:

  $ pwd
  /tmp
  $ cat catalog
  foobar1
  $ cat descriptions
  foobar2
  $ ls -al /var/pkg-get/*example.com
  -rw-r--r--   1 root root 191019 Jun 29 00:00 /var/pkg-get/catalog-example.com
  -rw-r--r--   1 root root  85516 Jun 29 00:00 /var/pkg-get/desc-example.com
  $ pkg-get -l
  WARNING: catalog out of date.
  Automatically updating catalog first
  Getting catalog...
  ...
  Updated description file
  ...
  $ pwd
  /tmp
  $ ls -l
  -rw-r--r--   1 root     root      191019 Aug 29 08:16 catalog
  -rw-r--r--   1 root     root       85516 Aug 29 08:16 descriptions.1
  $ cat catalog
  9menu 1.8,REV=2006.05.19 CSW9menu ...
  a2ps 4.13b CSWa2ps a2ps-4.13b-SunOS5.8-sparc-CSW.pkg.gz ...
  aalib 1.4.0,REV=2004.10.15_rev=rc5 CSWaalib ...
  ...
  $ cat descriptions.1
  9menu - A utility providing simple menus under X11
  a2ps - Any to PostScript filter
  aalib - Ascii art graphics library
  ...
  $ cat /var/pkg-get/desc-example.com
  foobar2

pkg-get destroys existing files "catalog" and "descriptions" in the
current directory when performing implicit updates of the catalog.

It removes "./catalog", loads a new file "catalog"  from the update-server
to the current directory and puts its content into
/var/pkg-get/catalog-example.com, leaving the new catalog file behind.

For "descriptions", it loads the current version from the update-server
to whatever name wget decides to use and moves the file "./descriptions"
to /var/pkg-get/desc-example.com.
This looks seriously wrong.

I suggest to use /usr/bin/mktemp which is included in the meta clusters
SUNWCmreq and up (checked for Solaris 9 and 10) and make sure  that
pkg-get only writes to /var/pkg-get and not to the current directory.

ciao
     Klaus

-- 
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03



More information about the users mailing list