Don't include architecture in package links names
This reverts commit a491e591c86cec4b2ce52df86f7b0d32545b4169.
This commit is contained in:
parent
1feaa8ab7e
commit
941ec45913
@ -56,30 +56,17 @@ PackageLinkDirectory::Init(Directory* parent, Package* package)
|
||||
// + 1 for the '-'
|
||||
}
|
||||
|
||||
const char* architecture = package->ArchitectureName();
|
||||
if (architecture != NULL) {
|
||||
size += 1 + strlen(architecture);
|
||||
// + 1 for the '-'
|
||||
}
|
||||
|
||||
// allocate the name and compose it
|
||||
char* name = (char*)malloc(size);
|
||||
if (name == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
memcpy(name, package->Name(), nameLength + 1);
|
||||
|
||||
if (version != NULL) {
|
||||
name[nameLength] = '-';
|
||||
version->ToString(name + nameLength + 1, size - nameLength - 1);
|
||||
}
|
||||
|
||||
if (architecture != NULL) {
|
||||
nameLength += strlen(name + nameLength);
|
||||
name[nameLength] = '-';
|
||||
strlcpy(name + nameLength + 1, architecture, size - nameLength - 1);
|
||||
}
|
||||
|
||||
// init the directory/node
|
||||
status_t error = Init(parent, name, NODE_FLAG_KEEP_NAME);
|
||||
if (error != B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user