aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs7
1 files changed, 7 insertions, 0 deletions
diff --git a/URPM.xs b/URPM.xs
index df55e84..4fd71b1 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -123,6 +123,9 @@ typedef struct s_Package* URPM__Package;
#define FLAG_RATE_INVALID 0
+#define FILENAME_TAG 1000000
+#define FILESIZE_TAG 1000001
+
#define FILTER_MODE_ALL_FILES 0
#define FILTER_MODE_CONF_FILES 2
@@ -1266,6 +1269,10 @@ update_header(char *filename, URPM__Package pkg, int keep_all_tags, int vsflags)
size = fdSize(fd);
Fclose(fd);
+ /* this is only kept for compatibility with older distros
+ (where ->filename on "unpacked" URPM::Package rely on FILENAME_TAG) */
+ headerAddEntry(header, FILENAME_TAG, RPM_STRING_TYPE, basename != NULL ? basename + 1 : filename, 1);
+
if (pkg->h && !(pkg->flag & FLAG_NO_HEADER_FREE)) headerFree(pkg->h);
pkg->h = header;
pkg->flag &= ~FLAG_NO_HEADER_FREE;