swpackage.cxx (swbis-1.13.1) | : | swpackage.cxx (swbis-1.13.2) | ||
---|---|---|---|---|
skipping to change at line 3428 | skipping to change at line 3428 | |||
retval = 0; | retval = 0; | |||
} else { | } else { | |||
// error | // error | |||
// why are we here. | // why are we here. | |||
retval = -1; | retval = -1; | |||
} | } | |||
return retval; | return retval; | |||
} | } | |||
static | ||||
int | ||||
add_state_attribute_to_filesets(swExStruct * swexdistribution) | ||||
{ | ||||
swExStruct * prod_ex = NULL; | ||||
swExStruct * file_ex = NULL; | ||||
int prod_index = 0; | ||||
int file_index = 0; | ||||
prod_ex = swexdistribution->containedByIndex(prod_index++); | ||||
while(prod_ex) { | ||||
if (::strcmp(SW_A_product, prod_ex->getObjectName()) == 0) { | ||||
file_index = 0; | ||||
file_ex = prod_ex->containedByIndex(file_index++); | ||||
while(file_ex) { | ||||
if (::strcmp(SW_A_fileset, file_ex->getObjectName | ||||
()) == 0) { | ||||
file_ex->getReferer()->vremove(SW_A_state | ||||
); | ||||
} | ||||
file_ex = prod_ex->containedByIndex(file_index++) | ||||
; | ||||
} | ||||
} | ||||
prod_ex = swexdistribution->containedByIndex(prod_index++); | ||||
} | ||||
return 0; | ||||
} | ||||
int | int | |||
main(int argc, char **argv) | main(int argc, char **argv) | |||
{ | { | |||
int c; | int c; | |||
int optret = 0; | int optret = 0; | |||
int psf_source_ifd = STDIN_FILENO; | int psf_source_ifd = STDIN_FILENO; | |||
int e_argc = 1; | int e_argc = 1; | |||
int w_argc = 1; | int w_argc = 1; | |||
int ret; | int ret; | |||
int tmpret; | int tmpret; | |||
skipping to change at line 6570 | skipping to change at line 6596 | |||
make_uuid(tmp, wopt_uuid); | make_uuid(tmp, wopt_uuid); | |||
swexdistribution->getReferer()->add("uuid", strob_str(tmp)); | swexdistribution->getReferer()->add("uuid", strob_str(tmp)); | |||
// | // | |||
// Generate and add the "instance_id" attribute. | // Generate and add the "instance_id" attribute. | |||
// | // | |||
SWP_E_DEBUG(""); | SWP_E_DEBUG(""); | |||
add_instance_id_attributes(swexdistribution, SW_A_product "|" SW_A_bundle ); | add_instance_id_attributes(swexdistribution, SW_A_product "|" SW_A_bundle ); | |||
// | // | |||
// Add the state attribute to each fileset with value | ||||
// of "available" | ||||
// | ||||
add_state_attribute_to_filesets(swexdistribution); | ||||
// | ||||
// enforce that both product and fileset control_directories | // enforce that both product and fileset control_directories | |||
// be empty or both be not empty | // be empty or both be not empty | |||
// | // | |||
if (check_for_invalid_layout(swexdistribution)) { | if (check_for_invalid_layout(swexdistribution)) { | |||
swlib_doif_writef(verboseG, SWC_VERBOSE_1, NULL, get_stderr_fd(), | swlib_doif_writef(verboseG, SWC_VERBOSE_1, NULL, get_stderr_fd(), | |||
"invalid package layout\n"); | "invalid package layout\n"); | |||
exit(1); | exit(1); | |||
} | } | |||
::init_serial_package(swexdist); | ::init_serial_package(swexdist); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 35 lines changed or added |