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

Re: drop or keep non-free - from users viewpoint



On Mon, Mar 08, 2004 at 11:03:43AM +0100, Wichert Akkerman wrote:
> You mean like the Origin tag that has been supported for a few years now?

Analogous, but different.

Origin is something which is a part of the package, not supplied at
retrieval time.

Maybe a proposed implementation (maybe not the greatest, but at least
somewhat concrete) would give you a better idea of what I'm thinking:

  Modify dpkg-deb to run /var/lib/dpkg/faux-headers at unpack time.
  The lines in the result of this script must match the regexp
	"^X-[A-Za-z0-9\-]+: "
  and are prepended to the control file which is obtained from the
  package.  (Note: I believe faux-headers should be run once per
  invocation of dpkg-deb, not once per package on the command line.)

  At build time, dpkg-deb automatically strips out any lines in
  the control file which match that regexp.

  Modify apt so that it provides the following environmental variables,
  when running dpkg:
     APT_DEB
     APT_URI
     APT_DISTRIBUTION
     APT_COMPONENT
     APT_DOWNLOAD_TIME

  /var/lib/dpkg/faux-headers is an executable shell script, and a
  config file:

#!/bin/sh
if set | grep ^APT_ >/dev/null; then cat <<___; fi
X-APT-DEB: ${APT_DEB-no}
X-APT-URI: ${APT_URI-local}
X-APT-Distribution: ${APT_DISTRIBUTION-none}
X-APT-Component: ${APT_COMPONENT-unknown}
X-APT-Download-Time: ${APT_DOWNLOAD_TIME-unknown}
___
date '+X-Unpack-Time: %Y-%m-%d %H:%M:%S'


______________________________________________________________________

And, of course, debian's tools would have to be modified [and tested]
to work with this scheme.

Thanks,

-- 
Raul



Reply to: