ALT Linux Bugzilla
– Attachment 664 Details for
Bug 5662
Дублирование куска спека в выводе rpm -bE
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патчик, который исправляет проблемму
rpm.patch (text/plain), 1.78 KB, created by
Kirill A. Shutemov
on 2004-12-10 16:13:54 MSK
(
hide
)
Description:
Патчик, который исправляет проблемму
Filename:
MIME Type:
Creator:
Kirill A. Shutemov
Created:
2004-12-10 16:13:54 MSK
Size:
1.78 KB
patch
obsolete
>--- rpm-4_0-4.0.4-orig/build/parseSpec.c 2002-03-26 01:09:32 +0200 >+++ rpm-4_0-4.0.4/build/parseSpec.c 2004-12-10 15:13:44 +0200 >@@ -16,6 +16,8 @@ > > /*@access FD_t @*/ /* compared with NULL */ > >+static FILE* temp_file;/*tempory file to output preprocessing spec*/ >+ > /** > */ > /*@unchecked@*/ >@@ -362,7 +364,7 @@ > > if ( '\n' == chomped[len-1] ) > chomped[len-1] = '\0'; >- puts( chomped ); >+ fprintf(temp_file, "%s\n", chomped ); > chomped = _free( chomped ); > } > >@@ -396,6 +398,10 @@ > { > rpmParseState parsePart = PART_PREAMBLE; > int initialPackage = 1; >+ char temp_filename_pattern[25]="preprocessed-spec.XXXXXX"; >+ int temp_fd; >+ char line[255]; >+ > #ifdef DYING > const char *saveArch; > #endif >@@ -416,6 +422,23 @@ > spec->fileStack = newOpenFileInfo(); > spec->fileStack->fileName = xstrdup(spec->specFile); > spec->preprocess_mode = preprocess; >+ >+ if (spec->preprocess_mode){ >+ temp_fd = mkstemp(temp_filename_pattern); >+ if (temp_fd == -1) { >+ rpmError(RPMERR_CREATE, _("Cannot open tempory file")); >+ return RPMERR_CREATE; >+ } >+ if (!(temp_file = fdopen(temp_fd, "w+b"))) { >+ rpmError(RPMERR_CREATE, _("Cannot create tempory file descriptor")); >+ return RPMERR_CREATE; >+ } >+ if (unlink(temp_filename_pattern) == -1) { >+ rpmError(RPMERR_UNLINK, _("Cannot delete tempory file")); >+ return RPMERR_UNLINK; >+ } >+ } >+ > if (buildRootURL) { > const char * buildRoot; > (void) urlPath(buildRootURL, &buildRoot); >@@ -636,5 +659,15 @@ > closeSpec(spec); > *specp = spec; > >+ if (spec->preprocess_mode){ >+ if (!fseek(temp_file,0,SEEK_SET)) >+ while(fgets(line,255,temp_file)) >+ printf("%s",line); >+ else{ >+ rpmError(RPMERR_FSEEK, _("Cannot seek tempory file")); >+ return RPMERR_FSEEK; >+ } >+ } >+ > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5662
:
664
|
671