Re: iTunes 4.8 installer bug.
Re: iTunes 4.8 installer bug.
- Subject: Re: iTunes 4.8 installer bug.
- From: Peter Bierman <email@hidden>
- Date: Wed, 18 May 2005 12:18:30 -0700
As far as I know, $USER is an exceptionally common environment
variable used by all sorts of code throughout the system.
As you point out, there is no documented API or environment for these scripts.
Apple tests them in the environment created by the Software Update
app and the Install framework. If you replace either of those
components, the burden of matching the prerequisites moves to you.
But all that aside, I'm left wondering why $USER isn't already set
correctly in your environment.
-pmb
At 12:04 AM -0400 5/18/05, Joe Ridge wrote:
So it's not about what I can and cannot do. It's about adherence to the API.
The requirement of $USER, is undocumented, and sure once I hit the
bug, I can code
in a bug fix to my code, but then another Apple group can make
another assumption
about the environment that I will have to hit debug and code in. And
then it's a whole monolithic mess.
Using $USER is like using part of an undocumented API, If I go
and change the implementation to one that strictly adheres to the
published API, and does not have
the undocumented feature, then the problem is with the code that
used the undocumented feature not the code that didn't implement it.
Now it would be perfectly OK for the group responsible for the
installer program
to publish a list of environmental variable that were safe to use,
and a list of environmental variables that anything that calls
installer must provide. Then in my case the people responsible for
softwareupdate would then have to ensure that either they ensure
those variables are set or publish the environmental requirements
and as
requirements for softwareupdate. And if that happened, I would
happily vouch safe my environment against the published requirements
that I was given, by the program I was using.
On May 14, 2005, at 5:53 PM, Peter Bierman wrote:
At 1:58 AM -0400 5/14/05, Joe Ridge wrote:
Why can't the iTunes group make an installer that is not broken?
The preinstall and preupgrade scripts both contain a bug that
prevents execution from an
automated environment. They use "su ${USER} -c ...." to execute a
command, but if the installer
is being run through cron or as a startup item the ${USER} variable
is not defined. and the su doesn't execute the command and instead
becomes a shell that will never exit.
Since you're creating the crontab or startup item in this case, why
can't your code/script make sure that $USER is defined?
And in both cases, I don't know why $USER wouldn't be defined already.
'man 5 crontab' suggests that $USER is one of the environment vars
set by cron.
-pmb
On May 14, 2005, at 1:58 AM, Joe Ridge wrote:
Why can't the iTunes group make an installer that is not broken?
The preinstall and preupgrade scripts both contain a bug that
prevents execution from an
automated environment. They use "su ${USER} -c ...." to execute a
command, but if the installer
is being run through cron or as a startup item the ${USER}
variable is not defined. and the su doesn't execute the command
and instead becomes a shell that will never exit.
The worst part about this is that I reported the same exact bug
with the 4.7 installer.
Maybe if they aren't going to write good packages we should
petition the people who write the installer to populate the
environment before they hand off to the packages scripts.
But I'm not bitter.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list
(<mailto:email@hidden>email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to <mailto:email@hidden>email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden