This is the mail archive of the cygwin@cygwin.com 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]

Diff for generic readme and generic-build script to automatically generate pkg data and file listings


All,

Was wondering if this patch got dropped, or is it on a todo list?

Alan
-----Original Message-----
From: Alan Miles [mailto:miles0201@cox.net]
Sent: November 21, 2003 18:35
To: cygwin@cygwin.com
Subject: RE: Diff for generic readme and generic-build script


Igor,

New patch - basically I store the /usr/bin/basename of the Readme file
variable == > /tmp/%PKG%.README

Then I do an effective "mv -f /tmp/%PKG%.README
/usr/share/doc/Cygwin/%PKG%.README" operation. Hopefully that mitigates all
of your concerns.



-----Original Message-----
From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu]
Sent: November 19, 2003 11:55
To: alan.miles@ieee.org
Cc: cygwin@cygwin.com
Subject: RE: Diff for generic readme and generic-build script


Alan,

The bug with 'sed -i' was that if it's unable to write to (or, rather,
"creat") "/tmp/sedGARBAGE", it assumes that the file exists and tries
another name ("/tmp/sedMOREGARBAGE"), and so on (in a loop).  If /tmp is
not writeable at all, sed will loop indefinitely.  As long as your script
checks only once (and redirection is usually better at handling existing
files, since you never claimed your script is reentrant), you should be
ok.  You can simply replace "${ThePackageReadMeFile}.tmp" in your patch
with "/tmp/${ThePackageReadMeFile}.tmp" (or even "`mktemp -t
"${ThePackageReadMeFile}.XXXXXX"`", but you'd need to store that in a
variable).
	Igor

On Tue, 18 Nov 2003, Alan Miles wrote:

> Igor,
>
> With this change I discovered a very subtle problem - the files listed
will
> show two entries instead of one for the README:
>
> /usr/share/doc/Cygwin/%PKG%.README
> /usr/share/doc/Cygwin/%PKG%.README.tmp
>
> This is due to the way where I redirected the file to.
>
> There are two solutions:
> 1/ Put the redirected temp file under /tmp, i.e., /tmp/%PKG%.README and
then
> doing a 'mv -f /tmp/%PKG%.README /usr/share/doc/Cygwin/%PKG%.README'. The
> listing won't be affected since before and after will contain the same
file
> name.
>
> 2/ Adjusting the find command to filter-out the
> /usr/share/doc/Cygwin/%PKG%.README.tmp file in its listing.
>
> Which solution would be your preference? (Unless you have another one of
> course ...)
>
> Alan

Attachment: packaging_templates.diff
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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