aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-28 13:29:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-28 13:29:23 +0000
commitdb9832322d92e764c7d9ebc9f9f0040cceb6f60f (patch)
treee8a2b6258b7d71753a2e5ed32baff877a38b6cf0
parente5728c5f01e551e6056936ca167d33c63d28410d (diff)
downloadperl-URPM-db9832322d92e764c7d9ebc9f9f0040cceb6f60f.tar
perl-URPM-db9832322d92e764c7d9ebc9f9f0040cceb6f60f.tar.gz
perl-URPM-db9832322d92e764c7d9ebc9f9f0040cceb6f60f.tar.bz2
perl-URPM-db9832322d92e764c7d9ebc9f9f0040cceb6f60f.tar.xz
perl-URPM-db9832322d92e764c7d9ebc9f9f0040cceb6f60f.zip
- restore FILENAME_TAG in generated hdlist (to be compatible with older
distros where ->filename can rely on it) (thanks to Nanar)
-rw-r--r--NEWS3
-rw-r--r--URPM.xs7
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 7078c45..9f27586 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- restore FILENAME_TAG in generated hdlist (to be compatible with older
+ distros where ->filename can rely on it) (thanks to Nanar)
+
Version 3.10 - 26 February 2008, by Pascal "Pixel" Rigaux
- add filesize to synthesis, add ->filesize to get it, and add
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;