- headerGetEntry() should return count of 1 when returning
strings plucked from i18n strings
- do not remove comments in scripts
+ - save/restore existing arch when done with buildarch
2.4.108 -> 2.4.109:
- remove icons with --rmsource
int parsePart = PART_PREAMBLE;
int initialPackage = 1;
char *name, *arch, *os;
+ char *saveArch;
Package pkg;
int x, index;
Spec spec;
while (x < spec->buildArchitectureCount) {
if (rpmMachineScore(RPM_MACHTABLE_BUILDARCH,
spec->buildArchitectures[x])) {
+ rpmGetMachine(&saveArch, NULL);
+ saveArch = strdup(saveArch);
rpmSetMachine(spec->buildArchitectures[x], NULL);
if (parseSpec(&(spec->buildArchitectureSpecs[index]),
specFile, buildRoot, 1,
freeSpec(spec);
return RPMERR_BADSPEC;
}
+ rpmSetMachine(saveArch, NULL);
+ free(saveArch);
index++;
}
x++;
/* if either are NULL, they are set to the default value (munged uname())
pushed through a translation table (if appropriate) */
void rpmSetMachine(char * arch, char * os);
+void rpmGetMachine(char **arch, char **os);
/** **/
return 0;
}
+void rpmGetMachine(char **arch, char **os)
+{
+ if (arch) {
+ *arch = current[ARCH];
+ }
+
+ if (os) {
+ *os = current[OS];
+ }
+}
+
void rpmSetMachine(char * arch, char * os) {
int transOs = os == NULL;
int transArch = arch == NULL;