[wpkg-users] What happens if assigned packages disappear - proof of concept

Falko Trojahn ftrojahn at smi-softmark.de
Thu Jun 15 06:36:00 CEST 2006


>> But if I rename the 2nd package e.g. to firefox-ext-webdevelop (could
>> be an writing error, hence) this package is instantly removed.
>>
>> _Is this really intended behaviour?_
>>
>> I think, the following would be smoother/more correct:
>>
>> Provided that a host is assigned to a profile, a package is included
>> in this profile, and the package is installed on a workstation.
>> If in this situation the package disappears, but the
>> host/profile/package assignement is intact, wpkg should assume an
>> error and should _not_ remove this package!
>>
>> What do you mean? I wouldn't like to wake up one morning with
>> hundred's  of workstations without office ;-)
> 
> 
> Actually, something similar happend to me once :)
> You're totally right.
> 
That's nice. But at the moment I have no clue how to solve this.

There are some other ideas this morning :) -

In debug mode, lots of lines fly over the screen, we have to search thru
them for errors. Perhaps instead/adding an array with all the errors and
an exit function which prints the error summary - if there are errors -
at end could help.

Something with the line ends is broken - an "dos2unix wpkg.js" and
"unix2dos wpkg.js" should do.

There are lots of constructs like these:

----------------------------------------------
// * Global variables
...
var quitonerror;
...

...
    // process property named arguments that set values
    if (isArgSet(argv, "/debug") || isArgSet(argv, "/verbose")) {
        debug = true;
    } else {
        debug = false;
    }
...
    // process property named arguments that set values
    if (isArgSet(argv, "/quitonerror")) {
        quitonerror = true;
    } else {
        quitonerror = false;
    }
----------------------------------------------

For some of them, I think it would be better to not declare them
implicitly but do

-----------------------------------------------
var debug = false;
var quitonerror = false
...

    if (isArgSet(argv, "/debug") || isArgSet(argv, "/verbose")) {
        debug = true;
    }
...
    if (isArgSet(argv, "/quitonerror")) {
        quitonerror = true;
    }
-----------------------------------------------

So the code would be a bit clearer, no uninitialized variables, and
we can set in the Global Variables section what args we want for each
and every install.

Just my 2¢.

Falko




More information about the wpkg-users mailing list