Further removal of code generating config for the obsolete smart package manager
This commit is contained in:
parent
39af94aa1d
commit
32a0b172de
@ -709,8 +709,8 @@ generateStats(struct configTag *configtag,int arch)
|
||||
int
|
||||
generateHTMLMainIndex(struct configTag *configtag)
|
||||
{
|
||||
char indexfile[PATH_MAX],smartfile[PATH_MAX],buffer[PATH_MAX],smartpyfile[PATH_MAX];
|
||||
FILE *fout,*fsmart,*fsmartpy;
|
||||
char indexfile[PATH_MAX],buffer[PATH_MAX];
|
||||
FILE *fout;
|
||||
int i;
|
||||
|
||||
if (!configtag->configdefaults->html_basedir) {
|
||||
@ -725,26 +725,8 @@ generateHTMLMainIndex(struct configTag *configtag)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* create Smart Package Manager channel files */
|
||||
snprintf(smartfile,PATH_MAX,"%s%s.smart",
|
||||
configtag->configdefaults->html_basedir,
|
||||
configtag->configdefaults->distribution_name);
|
||||
snprintf(smartpyfile,PATH_MAX,"%s%s.smart.py",
|
||||
configtag->configdefaults->html_basedir,
|
||||
configtag->configdefaults->distribution_name);
|
||||
|
||||
if ((fsmart = fopen(smartfile, "w")) == NULL) {
|
||||
perror(smartfile);
|
||||
return 1;
|
||||
}
|
||||
if ((fsmartpy = fopen(smartpyfile, "w")) == NULL) {
|
||||
perror(smartpyfile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(fout,"<b>Available repositories:</b><br><br>\n");
|
||||
while (configtag) {
|
||||
|
||||
fprintf(fout,
|
||||
"<a href=\"%stag=%s\">%s</a>: %s<br>",
|
||||
configtag->configdefaults->url_prefix,
|
||||
@ -759,42 +741,9 @@ generateHTMLMainIndex(struct configTag *configtag)
|
||||
buffer[i-1]='\0';
|
||||
i--;
|
||||
}
|
||||
fprintf(fsmart, "#\n# %s %s channel configuration for Smart Package Manager\n#\n\n",
|
||||
configtag->configdefaults->distribution_name,
|
||||
configtag->tag);
|
||||
fprintf(fsmart, "[%s]\ntype = apt-rpm\n",
|
||||
configtag->tag);
|
||||
fprintf(fsmart, "name = %s\n",
|
||||
configtag->description);
|
||||
fprintf(fsmart, "disabled = yes\n");
|
||||
fprintf(fsmart, "baseurl = http://%s%s\n",
|
||||
configtag->configdefaults->url_address, buffer);
|
||||
fprintf(fsmart, "components = %s\n\n",
|
||||
configtag->arch[0]);
|
||||
fprintf(fsmartpy, "#\n# %s %s channel configuration for Smart Package Manager\n#\n\n",
|
||||
configtag->configdefaults->distribution_name,
|
||||
configtag->tag);
|
||||
fprintf(fsmartpy, "if not sysconf.get((\"channels\", \"%s\")):\n",
|
||||
configtag->tag);
|
||||
fprintf(fsmartpy, "\tsysconf.set((\"channels\", \"%s\"),\n",
|
||||
configtag->tag);
|
||||
fprintf(fsmartpy, "\t\t\t{\"alias\": \"%s\",\n",
|
||||
configtag->tag);
|
||||
fprintf(fsmartpy, "\t\t\t\"type\": \"apt-rpm\",\n");
|
||||
fprintf(fsmartpy, "\t\t\t\"name\": \"%s\",\n",
|
||||
configtag->description);
|
||||
fprintf(fsmartpy, "\t\t\t\"disabled\": \"yes\",\n");
|
||||
fprintf(fsmartpy, "\t\t\t\"baseurl\": \"http://%s%s\",\n",
|
||||
configtag->configdefaults->url_address, buffer);
|
||||
fprintf(fsmartpy, "\t\t\t\"components\": \"%s\"})\n\n",
|
||||
configtag->arch[0]);
|
||||
|
||||
configtag = configtag->next;
|
||||
|
||||
}
|
||||
fclose(fout);
|
||||
fclose(fsmart);
|
||||
fclose(fsmartpy);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user