added doRmSource()
CVS patchset: 267 CVS date: 1996/02/14 20:07:09
This commit is contained in:
parent
b9c9a12286
commit
4e85ef055e
|
@ -633,5 +633,9 @@ int doBuild(Spec s, int flags)
|
|||
doSweep(s);
|
||||
}
|
||||
|
||||
if (flags & RPMBUILD_RMSOURCE) {
|
||||
doRmSource(s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
34
build/pack.c
34
build/pack.c
|
@ -945,3 +945,37 @@ int packageSource(Spec s)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************** Source Removal ********************/
|
||||
|
||||
int doRmSource(Spec s)
|
||||
{
|
||||
char filename[1024];
|
||||
struct sources *source;
|
||||
struct PackageRec *package;
|
||||
|
||||
/* spec file */
|
||||
sprintf(filename, "%s%s", getVar(RPMVAR_SPECDIR),
|
||||
strrchr(s->specfile, '/'));
|
||||
unlink(filename);
|
||||
|
||||
/* sources and patches */
|
||||
source = s->sources;
|
||||
while (source) {
|
||||
sprintf(filename, "%s/%s", getVar(RPMVAR_SOURCEDIR), source->source);
|
||||
unlink(filename);
|
||||
source = source->next;
|
||||
}
|
||||
|
||||
/* icons */
|
||||
package = s->packages;
|
||||
while (package) {
|
||||
if (package->icon) {
|
||||
sprintf(filename, "%s/%s", getVar(RPMVAR_SOURCEDIR),
|
||||
package->icon);
|
||||
unlink(filename);
|
||||
}
|
||||
package = package->next;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
void markBuildTime(void);
|
||||
int packageBinaries(Spec s);
|
||||
int packageSource(Spec s);
|
||||
int doRmSource(Spec s);
|
||||
|
||||
#endif _PACK_H_
|
||||
|
|
Loading…
Reference in New Issue