Signed-off-by: Aleksei Nikiforov <darktemp...@altlinux.org>
---
 lib/rpmte.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/rpmte.c b/lib/rpmte.c
index 40aa5e9..238c8b6 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -39,6 +39,7 @@ struct rpmte_s {
     char * arch;               /*!< Architecture hint. */
     char * os;                 /*!< Operating system hint. */
     int isSource;              /*!< (TR_ADDED) source rpm? */
+    uint32_t autoinstalled;    /*! Indicates whether package was installed 
just as dependency satisfier or not */
 
     rpmte depends;              /*!< Package updated by this package (ERASE 
te) */
     rpmte parent;              /*!< Parent transaction element. */
@@ -191,6 +192,8 @@ static int addTE(rpmte p, Header h, fnpyKey key, 
rpmRelocation * relocs)
     if (p->type == TR_ADDED)
        p->pkgFileSize = headerGetNumber(h, RPMTAG_LONGSIGSIZE) + 96 + 256;
 
+    p->autoinstalled = headerGetNumber(h, RPMTAG_AUTOINSTALLED);
+
     rc = 0;
 
 exit:
@@ -576,6 +579,11 @@ static int rpmteOpen(rpmte te, int reload_fi)
            rc = 1;
        }
        
+       if (rc)
+       {
+               rc = (headerPutUint32(h, RPMTAG_AUTOINSTALLED, 
&(te->autoinstalled), 1) == 1);
+       }
+
        rpmteSetHeader(te, h);
        headerFree(h);
     }
-- 
2.10.4

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to